【发布时间】:2013-12-08 22:51:48
【问题描述】:
我有这个 VHDL 代码。我想要的是在 sw'event 时首先上升,然后,首先是自行下降。但是当我模拟这个时,rst 永远不会下降!
process(rst,clk,sw)
begin
if (clk'EVENT and clk='1') then
if (rst='1') then
rst<='0';
elsif (sw'event) then
rst<='1';
elsif (my_counter="11") then
deb_sw<=sw;
end if;
end if;
end process;
【问题讨论】:
-
此代码是否也可用于 FPGA(综合代码),还是仅用于仿真(测试台)?
标签: vhdl