敏感性列表的概念是每次进程都被“调用”
列表中的项目更改状态。
对于您修改过程,唯一的项目
实际上导致动作的列表是时钟,由于时钟的事件
在“if”声明中。
在原始流程中,还有其他任务
当时钟没有切换时发生的事情。
问题是
合成器无法弄清楚如何构建实现的逻辑
这种行为。
在写入的新过程中,添加更多信号
灵敏度列表不会改变行为,除了增加模拟
时间由于不必要的“调用”过程。
然而,对于合成而言
只是混淆合成器,它使用“模板”来查找顺序
它知道如何实现的逻辑类型,如D触发器。
新的
过程适合具有同步复位的D触发器模板。
至于删除你的“tmp”网并在计时过程中直接分配S,
这不是我想做的方式(除非我在可以接受的地方写Verilog)
使用输出端口的反馈)。
我通常会将端口作为输入或
输出而不是输出。
这使得连接性更加明显
通过错误推断的“双向”避免不必要的合成问题
信号或“内部三态”。
问候,
的Gabor
- Gabor
以上来自于谷歌翻译
以下为原文
The idea of a sensitivity list is that the process gets "called" every time any
items in the list change state. For your revised process, the only item in the
list that actually causes action is the clock, due to the clock'event term
in the "if" statement. In the original process, there were other assignments
that happened when the clock did not toggle. The problem with that is
that the synthesizer cannot figure out how to build logic that implements
this behavior. In the new process as written, adding more signals to the
sensitivity list would not change the behavior, except to increase simulation
time due to unnecessary "calls" to the process. For synthesis, however it
just confuses the synthesizer, which uses "templates" to find sequential
logic types that it knows how to implement, like D flip-flops. The new
process fits a D flip-flop template with synchonous reset.
As for removing your "tmp" net and assigning S directly in the clocked process,
it's not the way I would do it (unless I was writing Verilog where it is acceptable
to use feedback from output ports). I would generally leave the ports as input or
output and not inout. This makes the connectivity more apparent and also
avoids unnecessary synthesis problems with incorrectly inferred "bidirectional"
signals or "internal tristates".
Regards,
Gabor
-- Gabor