【发布时间】:2013-07-15 16:29:55
【问题描述】:
我的问题是关于以下代码:
library ieee;
use ieee.std_logic_1164.all;
entity exam is port (
I,CLK,RESET : in std_logic;
Q : out std_logic
);
end entity;
architecture exam_arc of exam is
signal temp_sig : std_logic;
begin
process (CLK,RESET)
begin
if RESET = '1' then
temp_sig <='0';
elsif CLK'event and CLK='1' then
temp_sig <= I;
end if;
Q <= temp_sig;
end process;
end exam_arc;
似乎这段代码模拟了一个在时钟上升沿运行的 D 触发器,但是这个问题的答案 [这个问题来自考试] 声称这个 D 触发器在时钟的下降沿运行时钟。
这个 VHDL 代码模拟了什么样的触发器?
【问题讨论】:
-
正确的代码缩进可以预防眼癌——我听说..
标签: vhdl