if reset='1' and rising_edge(clk) then
if h="001" then
s1<='1'; ------------------s1,s2,s3为信号的
end if;
if h="010" then
s2<='1';
end if;
if h="011" then
s3<='1';
end if; end if;
上面的程序可以实现功能仿真,但是时序仿真s1,s2,s3始终为0,请大家帮我看看是什么原因啊?
从程序上看没有问题,你需要reset=1,上升沿并h满足条件时才为1,而且你的if不完整,没有else,所以会生成latch,锁存else的条件。故一旦满足条件对应的s就会为1 了。