1. 用4位二进制计数器74HC161实现一个六十七进制计数器。 用VHDL层次结构设计方法设计程序并仿真,底层器件是74HC161和逻辑门。...

本文通过VHDL实现了一个六十七进制计数器,利用4位二进制计数器74HC161及逻辑门进行层次化设计,并详细展示了各组件的代码,包括74HC161、与非门、非门和与门的VHDL实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

--第一个底层设计实体  74HC161
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity v74x161 is
port(
    clk,clr_l,ld_l,enp,ent:in std_logic;
    d:in unsigned(3 downto 0);
    q:out unsigned(3 downto 0);
    rco:buffer std_logic);
end v74x161;
architecture v74x161_arch of v74x161 is
signal iq:unsigned(3 downto 0);
begin
process(clk,ent,iq)
 begin
  if clr_l='0' then iq<=(others=>'0');--异步清零
  elsif clk'event and clk='1' then
    if ld_l='0' then iq <= d;--置数
    elsif rco='1' then iq<=(others=>'0');
    elsif(ent and enp)='1' then iq<=iq+1;--计数
    end if;
  end if;
  if (iq=15) and (ent='1') then rco<='1';
  else rco<='0';
  end if;
  q<=iq;
&n

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值