vhdl中的敏感性列表

时间:2015-07-24 17:42:57

标签: vhdl

在下面的代码中,如果灵敏度lis中缺少(select),模拟结果会是什么?

process(a,b,select)
begin
if (select = '1') then 
output <= a;
else
output<=b;
end if;
end process;

1 个答案:

答案 0 :(得分:1)

您将获得一个锁存器,而不是多路复用器。

如果sel发生更改,您的流程目前正在运行,因为它位于敏感度列表中。然后,该过程决定是应将a还是b路由到输出;这是一个经典的多普勒。只要absel发生变化,输出就会发生变化,而且它完全是组合的。

如果从敏感度列表中取出sel,则sel更改时,该过程将不会运行。代码只会在sela更改时检查b的当前状态;它在任何时候都被忽略了。这样做(在物理硬件方面)是复杂的,但请注意必须涉及内存。模拟器(或正确的硬件)在sela更改时有效记忆b的值,然后忽略sel的当前值,直到有a为止bapplication: mysite version: 1 runtime: php55 api_version: 1 handlers: # Static files - url: /images/* static_dir: images - url: /css/* static_dir: css - url: /js/* static_dir: js # Special case, route requests for the root document - url: / script: /index.php # If the request ends in [something].php, route to that file directly - url: /(.+\.php)$ script: /\1 # Map all other requests to scripts of the same name # so that, eg, /thispage (or /thispage/) routes to /thispage.php - url: /(.*?)/?$ script: /\1.php 上的其他更改。