logo
  • 世界杯预选赛瑞典
HDLBITS笔记15:组合逻辑之7420芯片

由于组合逻辑电路中前面的部分过于简单,这里不做介绍。给出更多逻辑门(链接:Gates - HDLBits (01xz.net)的代码:

module top_module(

input a, b,

output out_and,

output out_or,

output out_xor,

output out_nand,

output out_nor,

output out_xnor,

output out_anotb

);

assign out_and = a&b;//与门

assign out_or = a|b;//非门

assign out_xor = a^b;//异或门

assign out_nand = !(a & b);//先与后非门

assign out_nor = !(a|b);//先或后非门

assign out_xnor = !(a^b);//同或门

assign out_anotb = a&!b;b输入取非再与a&

endmodule

7400系列集成电路是一系列数字芯片,每个芯片有几个门。7420 是一款具有两个 4 输入 NAND 门的芯片。

创建一个与 7420 芯片具有相同功能的模块。它有8个输入和2个输出。

代码如下:

module top_module (

input p1a, p1b, p1c, p1d,

output p1y,

input p2a, p2b, p2c, p

Copyright © 2088 1990世界杯_世界杯竞猜 - xindsw.com All Rights Reserved.
友情链接