一个进程中能不能有两个wait语句?
时间:10-02
整理:3721RD
点击:
我加了两个wait 语句,也能进行仿真,但是我看不明白结果!我这样加对吗?
entity dd is
Port (d : in std_logic ;
clk : in std_logic ;
q ,q1: out std_logic );
end dd;
architecture Behavioral of dd is
signal r : std_logic ;
begin
process
begin
wait until clk = '1' and clk'event ;
r <= d ;
q1 <= d;
wait until clk = '1' and clk'event ;
q <= r ;
end process;
entity dd is
Port (d : in std_logic ;
clk : in std_logic ;
q ,q1: out std_logic );
end dd;
architecture Behavioral of dd is
signal r : std_logic ;
begin
process
begin
wait until clk = '1' and clk'event ;
r <= d ;
q1 <= d;
wait until clk = '1' and clk'event ;
q <= r ;
end process;
一个进程中能不能有两个wait语句?
如果用来仿真的话,可以的。
一个进程中能不能有两个wait语句?
但是结果不对,前两个周期结果对,从第三个周期开始就不对了,是不是不能这样设计啊?可是我看别的书上有这样设计的!
一个进程中能不能有两个wait语句?
程序肯定是对的,问题是并不是你想象的那种功能。再仔细想想吧。:)
一个进程中能不能有两个wait语句?
是啊,我想明白了,谢谢!我最大的毛病是不爱动脑,以后我一定先动脑,实在不会再问!^_^
想明白了 告诉大家哇
VHDL? 大学教过 不过现在企业大多用Verilog
