什么时候必须将信号插入到进程的敏感列表中 [英] When must a signal be inserted into the sensitivity list of a process

查看:39
本文介绍了什么时候必须将信号插入到进程的敏感列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对何时必须将架构中声明的信号插入到进程的敏感列表中感到困惑.

I am confused about when a signal declared in an architecture must be inserted into the sensitivity list of a process.

是否有任何情况下都可以遵循的一般规律?

Is there is a general law that can be followed in any situation?

当我必须在进程敏感列表中包含信号时,我真的很难理解.

I have real difficulties understanding when I have to include a signal in a process sensitivity list.

推荐答案

一般规律"就是

您的流程需要了解的关于变更的任何信息都需要在敏感列表中.

anything that your process needs to know about changes of needs to be in the sensitivity list.

<小时>

对于具有同步复位的典型可综合寄存器:


For a typical synthesisable register with a synchronous reset:

process (clk) is
begin
    if rising_edge(clk) then
        if reset = '1' then
             -- do reset things
        else
             -- read some signals, assign some outputs
        end if;
    end if;
end process;

只有时钟需要在列表中,因为其他所有内容都只在时钟变化时查看(由于 ifrising_edge(clk) 语句.

Only the clock needs to be in the list, as everything else is only looked at when the clock changes (due to the if rising_edge(clk) statement.

如果您需要异步重置:

process (clk, reset) is
begin
    if reset = '1' then
        -- do reset things
    elsif rising_edge(clk) then
        -- read some signals, assign some outputs
    end if;
end process;

那么 reset 信号也必须在灵敏度列表中,因为您的设计需要在每次更改时检查它的值,而不管时钟在做什么.

then the reset signal must also be in the sensitivity list, as your design needs to check the value of it every time it changes, irrespective of what the clock is doing.

对于组合逻辑,我完全避免使用进程,因为保持敏感列表是最新的问题,以及模拟的潜在行为与合成代码不同.VHDL-2008 中的 all 关键字已经简化了这一点,但我仍然没有发现自己想要编写长而复杂的组合逻辑,这样一个过程就会有所帮助.

For combinatorial logic, I avoid using processes completely because of the problems keeping the sensitivity list up-to-date, and the potential for simulation then behaving differently to the synthesised code. This has been eased by the all keyword in VHDL-2008, but I still haven't found myself wanting to write long complicated combinatorial logic such that a process would help.

这篇关于什么时候必须将信号插入到进程的敏感列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆