|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
大家好,小弟刚在学习状态机的VHDL建模,看到一例子,其VHDL的描述如下:
type state is (step1, step2, step3);
signal current_state, next_state : state;
STATE_REG : process(clk) is
begin
if rising_edge(clk) then
if reset = '1' then
current_state <= step1;
else
current_state <= next_state;
end if;
end if;
end process STATE_REG;
NEXT_STATE_REG : process (start) is
begin
case current_state is
when step1 =>
if start = '0' then
next_state <= step1;
else
next_state <= step2;
end if;
when step2 =>
next_state <= step3;
when step3 =>
next_State <= step1;
end case;
end process NEXT_STATE_REG;
对这个例子有一个疑问,为什么进程NEXT_STATE_REG 需要加入start敏感信号量,我记得进程是只有敏感信号量变化才会启动执行的,但事实上,在状态2到状态3的转化,并不需要敏感信号量start变化,这是为什么呢? |
|