在下面的代码中,如果灵敏度lis中缺少(select),模拟结果会是什么?
process(a,b,select)
begin
if (select = '1') then
output <= a;
else
output<=b;
end if;
end process;
答案 0 :(得分:1)
您将获得一个锁存器,而不是多路复用器。
如果sel
发生更改,您的流程目前正在运行,因为它位于敏感度列表中。然后,该过程决定是应将a
还是b
路由到输出;这是一个经典的多普勒。只要a
,b
或sel
发生变化,输出就会发生变化,而且它完全是组合的。
如果从敏感度列表中取出sel
,则sel
更改时,该过程将不会运行。代码只会在sel
或a
更改时检查b
的当前状态;它在任何时候都被忽略了。这样做(在物理硬件方面)是复杂的,但请注意必须涉及内存。模拟器(或正确的硬件)在sel
或a
更改时有效记忆b
的值,然后忽略sel
的当前值,直到有a
为止b
或application: 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
上的其他更改。