用VHDL语言编写时序电路

Posted lhkhhk

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用VHDL语言编写时序电路相关的知识,希望对你有一定的参考价值。

触发器:

(1)D锁存器

library ieee;

use ieee.std_logic_1164.all;

entity dff1 is

port(clk:in std_logic;

d:in std_logic;

q:out std_logic

);

end;

architecture bhv of dff1 is

signal q1:std_logic;

process(clk)

begin

if clk‘event and clk=‘1‘

then q1<=d;

end if;

q<=q1;

end process;

end bhv;

法2:

library ieee;

use ieee.std_logic_1164.all;

entity test1 is

port(

clk,d:in bit;

q:out bit

);

end;

architecture bhv of test1 is

begin

process(clk,d)

begin

if rising_edge(clk) then q<=d;

end if;

end process;

end bhv;

 

 

以上是关于用VHDL语言编写时序电路的主要内容,如果未能解决你的问题,请参考以下文章