设为首页收藏本站淘宝杂货铺

从F到0 - From F to 0

 找回密码
 注册已关闭
搜索
查看: 133|回复: 0
收起左侧

Quartus Verilog HDL/FPGA 实现 CD4515/74HC4515 具有4位透明锁存器的4线至16线译码器

[复制链接]
发表于 2023-11-18 08:39:08 | 显示全部楼层 |阅读模式
main.png
  1. module cd4515(                //具有4位透明锁存器的4线至16线译码器 VCC:Pin24 GND:Pin12
  2.         input A,                        //译码地址A (低位) Pin2
  3.         input B,                        //译码地址B Pin3
  4.         input C,                        //译码地址C Pin21
  5.         input D,                        //译码地址D (高位) Pin22
  6.         input INH,                //低电平使能译码 Pin23
  7.         input STB,                //高电平译码透明 低电平锁存 Pin1
  8.         output [15:0] Q        //[16位宽] 译码输出Q                Pin:15,16,13,14,19,20,17,18,4,5,6,7,8,10,9,11
  9. );

  10. wire [3:0] i = STB ? {D,C,B,A} : i;
  11. assign Q = ~(INH ? 16'd0 : 16'd1<<i);
  12. endmodule

  13. module main(
  14.         input A,
  15.         input B,
  16.         input C,
  17.         input D,
  18.         input INH,
  19.         input STB,
  20.         output [15:0] Q
  21. );

  22. cd4515 U1(
  23.         .A(A),
  24.         .B(B),
  25.         .C(C),
  26.         .D(D),
  27.         .INH(INH),
  28.         .STB(STB),
  29.         .Q(Q)
  30. );

  31. endmodule
复制代码

相关帖子

您需要登录后才可以回帖 登录 | 注册已关闭

本版积分规则

QQ|手机版|Archiver|从F到0 ( 蒙ICP备17002595号-1 )
蒙公网安备15010402000325号

腾讯云安全认证

GMT+8, 2024-4-27 18:16 , Processed in 0.748043 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表