敏感度列表中的哪个信号触发该过程 [英] Which signal in the sensitivity list triggers the process
问题描述
在 VHDL 中,在模拟测试平台时,我有一个过程和一个敏感度列表.是否可以查看敏感度列表中的哪个信号触发了该过程?我知道这可能取决于工具.我正在使用赛灵思 ISE.模拟器是否提供此信息?
In VHDL, when simulating a testbench, I have a process and a sensitivity list. Is it possible to see which signal in the sensitivity list has triggered the process? I understand that this may be dependent on the tools. Im using Xilinx ISE. Does the simulator give this information?
推荐答案
您可以将 'transaction
属性与 'event
结合使用来确定哪些信号具有当前增量周期中的交易:
You can use the 'transaction
attribute in conjunction with 'event
to determine which signals have had a transaction in the current delta cycle:
process(a, b) is
begin
if a'transaction'event then
report "Transaction on a";
end if;
if b'transaction'event then
report "Transaction on b";
end if;
end process;
'transaction
属性创建一个新的 bit 类型信号,该信号在每个事务上切换.该信号上的 'event
属性标识父信号上何时发生任何事务.
The 'transaction
attribute creates a new signal of type bit that toggles on each transaction. The 'event
attribute on that signal identifies when any transaction has happened on the parent signal.
您还可以使用 not
来确定敏感度列表中的哪些信号自上一个时间步以来进行了交易:
You can also use not <signal name>'quiet(0 ns)
to determine which signals from a sensitivity list have had a transaction since the last time step:
process(a, b) is
begin
if not a'quiet(0 ns) then
report "Transaction on a";
end if;
if not b'quiet(0 ns) then
report "Transaction on b";
end if;
end process;
如果您不想处理在不同 delta 周期上发生的事件顺序,后者可能更有用.
The latter may be more useful if you don't want to deal with sequencing of events that happen on different delta cycles.
这篇关于敏感度列表中的哪个信号触发该过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!