首页 > 编程语言 > 详细

用VHDL语言编写时序电路

时间:2019-11-09 19:52:59      阅读:91      评论:0      收藏:0      [点我收藏+]

触发器:

(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语言编写时序电路

原文:https://www.cnblogs.com/lhkhhk/p/11827370.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!