各位仁兄:以下是很简单的一段程序,烦请各位瞧一瞧,帮小弟答疑解惑。
问1:在结构体中,对信号的赋初值,是否有效?
问2:进程中的敏感信号,没有发生更新,只是在结构体中进行定义时赋于了初值,如:init,那么,进程能否启动?
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity led is
port(ledout1: out std_logic;
ledout: out std_logic
);
end entity;
architecture behavior of led is
signal init:std_logic:='1';--此处对信号的赋初值是有效的。
begin
process(init) is
begin
if(init='0') then
--init<='0';
ledout<='1';
ledout1<='0';
elsif init='1' then
ledout<='0';
ledout1<='1';
elsif init='X' then
ledout<='X';
ledout1<='X';
else
ledout<='1';
ledout1<='1';
end if;
end process;
end architecture;
我在QUARTUS II中进行仿真后的结果,赋初值是有效的,并且,进程能够启动?按语法,进程中的敏感信号,更新后才能启动?