cufaqi.vhd
来自「一些很好的FPGA设计实例」· VHDL 代码 · 共 28 行
VHD
28 行
---在process,function和procedure内部的代码都是顺序执行的,当作为一个整体时,他们与
---外部其他代码都是并发执行的
---变量只能在顺序代码中使用,相对于信号而言,变量是局部的,他的值不能传到process,function和procedure的外部
-------------------------------------------------
---带有异步复位端的d触发器
---当时钟信号发生变化(上升沿或下降沿)时,输出信号q的值将于当前的输入信号相同
-------------------------------------
library ieee;
use ieee.std_logic_1164.all;
-------------------------------------
entity cufaqi is
port (d,clk,rst: in std_logic;
q: out std_logic);
end cufaqi;
-------------------------------------
architecture behavior of cufaqi is
begin
process(clk,rst)
begin
if (rst = '1')then
q <= '0';
elsif (clk 'event and clk ='1')then
q <= d;
end if;
end process;
end behavior;
-----------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?