首页 > 解决方案 > Process 中的执行顺序以及 if else :VHDL

问题描述

我试图在一个时钟周期内做某事。我的方法是:

process begin
if rising_edge(clk) then

if (condition) then 
values of variables a and b are generated;
end if;

Here I want to use these freshly generated values of a and b.

end if;
end process;

问题是:我可以这样做吗,或者这些 a 和 b 的值将在过程结束时更新?或者也欢迎任何其他方法。

标签: vhdl

解决方案


如果您想要 a 和 b 的立即值,则 a 和 b 必须是变量。如果 a 和 b 是信号,那么它们将成为流水线中的寄存器,并将在下一个时钟周期可用。


推荐阅读