求教:如何用VHDL编程实现两个相位相差90度的方波啊
RT,如何用VHDL编程实现两个相位相差90度的方波啊,求达人指导。 你是说两路脉冲进行正交吧,这个简单,在用modelsim仿真时对激励信号,可以人为设置其正交的。。。。。。。 回复 2# liujilei311我要的是输出额,不是激励额 我知道,这和激励信号的设置有关的。。。。。。。。 不知这个能不能满足你的要求
library ieee;
use ieee.std_logic_1164.all;
entity counter20 is
port (clk:in std_logic;
rst:in std_logic;
y1:out std_logic;
y2:out std_logic
);
end counter20;
architecture hav of counter20 is
signal y1_temp:std_logic;
signal y2_temp:std_logic;
begin
y1<=y1_temp;
y2<=y2_temp;
process(clk,rst)
variable counter:integer range 0 to 1;
begin
if (rst='1') then
y1_temp<='0';
y2_temp<='0';
counter:=0;
else
if (clk'event and clk='1')then
if (counter=0)then
y1_temp<=not y1_temp;
counter:=counter+1;
elsif counter=1 then
y2_temp<=not y2_temp;
counter:=0;
end if;
end if;
end if;
end process;
end architecture; 恩,学习一下!!!!!!!!!!!! 回复 5# wenlimin
我自己实现了,不过还是i非常感谢额
页:
[1]