据我了解,PROCESS 中的所有语句都是按顺序执行的。那么并发信号分配(<=)会发生什么?它的工作方式是否与顺序赋值 (:=) 相同,还是在 delta 延迟后执行?
如果它在一个delta延迟之后执行,那么PROCESS内部的所有语句如何被称为顺序?
如果它立即执行,那么进程中的 := 和 <= 之间有什么区别吗?
最佳答案
信号赋值 (<=) 在进程中的所有顺序代码执行完毕后执行。这是该时间步的所有事件进程完成的时间。
举个例子,为什么会这样:
Suppose you have an event that triggers 2 processes. These 2 processes use the same signal, but one of them changes the value of that signal. The simulator is only be able to perform one process at the time due to a sequential simulation model (not to confuse with the concurrent model of vhdl). So if process A is simulated first and A changes the signal, B would have the wrong signal value. Therefore the signal can only be changed after all the triggered processes are done.
变量赋值 (:=) 立即执行并可用于例如在进程中临时存储一些数据。
关于vhdl - 进程语句中的(并发)信号分配是顺序的还是并发的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19209773/