![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vhdl
364.99°
忙中岁月忙中遣,我本愚来性不移
展开
-
VHDL——8位双向移位寄存器
1.逻辑元件符号CLR:复位控制输入端LOD:预置控制输入端S:以为方向控制输入端:s=1,,右移移位寄存器s=0,左移移位寄存器DIR:右移串入输入信号DIL:左移串入输入信号2.VHDL语言LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL; ENTITY rlshift ISPORT(clr,lod,clk,s,dir,dil:IN BIT; d:IN BIT_VECTOR(7 DOWNTO 0); q:BUFFER BIT_VE原创 2021-04-20 12:53:50 · 6737 阅读 · 0 评论 -
VHDL——分频器设计
1.简介1.在数字电路设计的过程中,常常需要对较高频率的时钟信号进行分频操作,从而得到较低频率的时钟信号。一个硬件电路,如果时钟信号设计的不对,将会导致整个硬件电路设计的失败。2.分频器:完成对时钟信号的2分频,4分频,8分频和16分频2.分频器设计...原创 2021-04-20 10:22:43 · 10712 阅读 · 2 评论 -
VHDL——JK触发器
1.管脚图2.真值表3.VHDL语言library ieee;use ieee.std_logic_1164.all;entity jkff is port(j,k,clk : in std_logic; q,nq : out std_logic);end jkff;architecture behave of jkff is signal q_s,nq_s : std_logic;begin process(clk,j,k) begin i原创 2021-04-19 20:47:58 · 7567 阅读 · 2 评论 -
VHDL——异步/同步复位的上升沿D触发器
1.管脚图2.异步复位library ieee;use ieee.std_logic_1164.all;entity dffyibu is port(d,clk,reset : in std_logic; q,qb : out std_logic);end dffyibu;architecture behave of dffyibu isbegin process(clk,reset) begin if(reset = '0')then q原创 2021-04-19 20:25:19 · 5638 阅读 · 0 评论 -
VHDL——8位单向总线驱动器
1.逻辑元件图微型计算机的总线驱动中常常用到单线缓冲器,它由多个三态门组成2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity trl_buf8 is port(en : in std_logic; din : in std_logic_vector(7 downto 0); dout : out std_logic_vector(7 downto 0));end trl_buf8;archite原创 2021-04-19 17:23:23 · 816 阅读 · 0 评论 -
VHDL——三态门设计
1.逻辑元件图 三态门都有一个EN控制使能端,来控制门电路的通断2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity tristate is port(din,en : in std_logic; dout : out std_logic);end tristate;architecture behave of tristate isbegin process(en) begin if en原创 2021-04-19 16:41:29 · 2315 阅读 · 0 评论 -
VHDL——8位乘法器
1.引脚图a[7…0]和b[7…0]是被乘数和乘数输入端,q[15…0]是乘积输出端2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity mul is port(a,b : in integer range 0 to 255; q : out integer range 0 to 65535);end mul;architecture behave of mul is begin q <= a原创 2021-04-19 16:12:17 · 2695 阅读 · 0 评论 -
VHDL——1—8多路分配器
1.管脚图多路分配器的作用:为输入信号选择输出2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity dmux1to8 is port(data,enable : in std_logic; --分别为输入端口和使能端口 s : in std_logic_vector(2 downto 0); --选择信号端口 y0,y1,y2,y3,y4,y5,y6,y7:OUT STD_LOGIC --输出端口原创 2021-04-19 15:54:00 · 2005 阅读 · 0 评论 -
VHDL——七段译码显示器
1.真值表2.管脚图3.VHDL语言library ieee;use ieee.std_logic_1164.all;entity decoder7 is port(d : in std_logic_vector(3 downto 0); x : out std_logic_vector(6 downto 0));end decoder7;architecture behave of decoder7 isbegin with d select x原创 2021-04-19 15:15:55 · 11284 阅读 · 1 评论 -
VHDL——含异步清零和同步使能的加法计数器源程序
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;--------------------------------------------------------------------entity counter is port( clk,ret,en : in std_logic; --定义时钟、异步复位、同步使能信号原创 2021-04-18 15:54:50 · 13164 阅读 · 4 评论 -
VHDL——8—3优先编码器
1.真值表2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity pe8_3 is port(a : in std_logic_vector(0 to 7); y : out std_logic_vector(2 downto 0));end pe8_3;architecture behave of pe8_3 is begin process(a) begin if a(7) = '0'原创 2021-04-18 15:49:42 · 10389 阅读 · 0 评论 -
VHDL——4位移位寄存器
1.电路图移位寄存器:具有存储代码,移位功能移位:寄存器里所储存的代码能够在移位脉冲的作用下,依次左移或右移2.VHDL语言2.1 D触发器library ieee;use ieee.std_logic_1164.all;entity dff1 is port( clk,d:in std_logic; q:out std_logic );end dff1;architecture behavior of dff1 is begin process(c原创 2021-04-17 15:28:17 · 12041 阅读 · 0 评论 -
VHDL——设计4输入端的与非与非电路(元件例化)
1.思路利用2输入端与非门元件,设计4输入端的与非与非电路1.11.21.32.实现过程2.1 设计2输入端与非门library ieee;use ieee.std_logic_1164.all;entity nd2 is port(a,b : in std_logic; c : out std_logic);end nd2;architecture nd2bahave of nd2 is begin c <= a nand b; en原创 2021-04-17 11:07:12 · 5839 阅读 · 1 评论 -
VHDL——4选1多路选择器
1.条件信号赋值语句library ieee;use ieee.std_logic_1164.all;entity mux4 is port(i0,i1,i2,i3,a,b : in std_logic; q : out std_logic);end mux4;architecture rtl of mux4 is signal sel : std_logic_vector(1 downto 0);begin sel <= b&a; q &原创 2021-04-17 09:19:03 · 8262 阅读 · 0 评论 -
VHDL——含异步清零的4状态同步有限状态机
1.VHDL语言package mtype is --定义一个包,包中包含的通用定义可以在整个VHDL或多个设计中共享使用。 type state_t is (s1,s2,s3,s0);end mtype;library ieee;use ieee.std_logic_1164.all;use work.mtype.all;entity s4_machine is port(clk,inc,al,bl : in std_原创 2021-04-17 08:52:57 · 947 阅读 · 0 评论 -
VHDL设计进阶2.0(思维导图)
原创 2021-04-16 19:45:19 · 122 阅读 · 0 评论 -
VHDL——8位奇偶校验电路
1.引脚图a:长度为8的标准逻辑适量位适量;z:输出校验位2.VHDL语言原创 2021-04-16 13:32:19 · 8708 阅读 · 0 评论 -
VHDL——74LS138译码器
1.功能描述功能描述:该3-8译码器有六个输入端:S1,S2,S3为控制信号,a0,a1,a2为三个输入信号。一个输出端口y为八位总线,表示译码结果。2.真值表3.VHDL语言原创 2021-04-16 09:05:27 · 7123 阅读 · 1 评论 -
VHDL——4选1数据选择器
1.端口图2.VHDL语言原创 2021-04-15 20:50:33 · 15942 阅读 · 0 评论 -
VHDL——描述电路
1.逻辑电路2.真值表3.VHDL语言library ieee;use ieee.std_logic_1164.all;entity discribe is port(a,b,c : in boolean; y : out boolean);end discribe;architecture logc of discribe isbegin process(a,b,c) variable ot : boolean; begin if原创 2021-04-15 20:22:44 · 567 阅读 · 0 评论 -
VHDL——二选一电路
1.思路使用(完整)if控制语句:当sel=‘1’,将端口d0数据传给端口q,反之,将端口d1数据传给端口q,从而实现二选一电路2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity mux2 is port(d0 : in std_logic_vector(3 downto 0); --定义长度为0~8的变量 d1 : in std_logic_vector(3 downto 0); sel: in s原创 2021-04-15 19:57:12 · 2461 阅读 · 0 评论 -
VHDL——异步清除十进制加法计数器
library ieee;use ieee.std_logic_1164.all;entity adderT is port(clr : in std_logic; clk : in std_logic; cnt : buffer integer range 9 downto 0);end adderT;architecture behavior of adderT isbeginprocess(clr,clk) begin if clr =原创 2021-04-15 17:10:02 · 4078 阅读 · 0 评论 -
VHDL设计进阶1.0(思维导图)
原创 2021-04-15 10:50:00 · 163 阅读 · 0 评论 -
VHDL——锁存器
1.端口图2.VHDL语言library ieee;use ieee.std_logic_1164.all;entity latch1 isport( d : in std_logic ; q : out std_logic; ena : in std_logic);end latch1;architecture example of latch1 issignal sig_save : std_logic := '0' ; begin process(d,ena)原创 2021-04-14 19:04:40 · 3380 阅读 · 0 评论 -
VHDL设计初步(思维导图)
原创 2021-04-12 17:41:00 · 239 阅读 · 0 评论 -
VHDL——4位二进制加法计数器的实现
VHDL语言library ieee;use ieee.std_logic_1164.all;entity cnt4_1 is port(clk : in bit; q : buffer integer range 15 downto 0); --整数大小范围0~15end cnt4_1;architecture behave of cnt4_1 isbegin process(clk) begin if clk'event and clk = '1' then -原创 2021-04-12 17:21:05 · 11003 阅读 · 5 评论 -
VHDL——全加器的实现(元件例化)
1.逻辑电路原创 2021-04-12 15:18:59 · 5680 阅读 · 2 评论 -
VHDL——D触发器
1.端口2.VHDL语言2.1引入信号:library ieee;use ieee.std_logic_1164.all;entity dff1 is port( clk,d:in std_logic; q:out std_logic );end dff1;architecture behavior of dff1 is signal q1:std_logic; --引进内部节点信号 begin process(clk) --进程语句以及原创 2021-04-10 16:17:45 · 6327 阅读 · 0 评论 -
VHDL——2选1多路通道
1.逻辑电路2.端口3.VHDL语言3.1使用并行语句library ieee;use ieee.std_logic_1164.all;entity mux21 is port( a,b,s:in bit; q:out bit );end mux21;architecture mux of mux21 isbegin q <= a when s ='0' else b;end mux; 3.2使用布尔方程表达式architecture原创 2021-04-10 15:19:05 · 904 阅读 · 0 评论 -
VHDL——1位半加器的实现
1.真值表2.逻辑电路3.端口4.VHDL语言library ieee;use ieee.std_logic_1164.all;entity h_adder is port (a,b:in STD_LOGIC; co,so:out STD_LOGIC);end h_adder;architecture fh of h_adder issignal sel:STD_LOGIC_VECTOR(1 downto 0); begin sel <= a原创 2021-04-10 15:03:01 · 5016 阅读 · 0 评论