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

从F到0 - From F to 0

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

Quartus Verilog HDL/FPGA 实现 74HC20/74LS20 二组四输入端与非门 芯片电路源码

[复制链接]
发表于 2022-3-2 18:19:34 | 显示全部楼层 |阅读模式
main.png
  1. module hc20(                //74HC20 二组四输入端与非门 GND:Pin7 VCC:Pin14
  2.         input inA1,                //Pin1
  3.         input inA2,                //Pin2
  4.         input inA3,                //Pin4
  5.         input inA4,                //Pin5
  6.         input inB1,                //Pin9
  7.         input inB2,                //Pin10
  8.         input inB3,                //Pin12
  9.         input inB4,                //Pin13
  10.         output outA,        //Pin6
  11.         output outB                //Pin8
  12. );
  13. assign outA = !(&{inA1,inA2,inA3,inA4});
  14. assign outB = !(&{inB1,inB2,inB3,inB4});

  15. endmodule

  16. module main(
  17.         input clk,
  18.         output reg led
  19. );

  20. wire outA;
  21. wire outB;

  22. hc20 hc20(
  23.         .inA1(1'b1),
  24.         .inA2(1'b0),
  25.         .inA3(1'b1),
  26.         .inA4(1'b0),
  27.         .inB1(1'b1),
  28.         .inB2(1'b0),
  29.         .inB3(1'b1),
  30.         .inB4(1'b0),
  31.         .outA(outA),
  32.         .outB(outB)
  33. );

  34. always @(posedge clk) begin
  35.         led <= !(outA && outB);
  36. end
  37. endmodule
复制代码

相关帖子

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

本版积分规则

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

腾讯云安全认证

GMT+8, 2024-4-27 01:45 , Processed in 2.429139 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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