HDLbits 刷题 --7420

The 7400-series integrated circuits are a series of digital chips with a few gates each. The 7420 is a chip with two 4-input NAND gates.

Create a module with the same functionality as the 7420 chip. It has 8 inputs and 2 outputs.

译:

7400系列集成电路是一系列每个都包含几个逻辑门的数字芯片。7420是一款带有两个4输入NAND门的芯片。

我们可以创建一个模块,其功能与7420芯片相同。这个模块将有8个输入和2个输出。以下是使用Verilog HDL创建这样一个模块的示例代码

复制代码
module top_module ( 
    input p1a, p1b, p1c, p1d,
    output p1y,
    input p2a, p2b, p2c, p2d,
    output p2y );
    assign p1y = ~(p1a & p1b & p1c & p1d);
	assign p2y = ~(p2a & p2b & p2c & p2d);
endmodule

运行结果:

相关推荐
女神下凡11 小时前
芯参谋(119):凌阳(Sunplus)_开发指南
linux·arm开发·stm32·单片机·嵌入式硬件
LabVIEW开发12 小时前
FPGA 目标未填 Resource Name 无法运行
fpga开发
Brilliantwxx2 天前
【STM32】 DAC 数模转换器(理论 + 外设 + 四个实验案例)
笔记·stm32·单片机·嵌入式硬件
无敌贵点大王2 天前
从寄存器层面重学STM32(15)——IIC理论
stm32·单片机·嵌入式硬件
en.en..2 天前
STM32 HAL 库 | 外设双结构体机制(外设句柄结构体+外设初始化结构体)
stm32·单片机·嵌入式硬件
元器件BOM超人3 天前
ATMEGA32A-AU TQFP-44 Microchip 8位AVR MCU 选型指南
单片机·嵌入式硬件
en.en..3 天前
STM32 GPIO 复用功能寄存器 AFRL/AFRH 原理
单片机·嵌入式硬件
shimly1234563 天前
(done) 野火嵌入式 (16) STM32中断应用概览
stm32·单片机·嵌入式硬件
橘为己有4413 天前
STM32:SPI(1)
stm32·单片机·嵌入式硬件
en.en..3 天前
STM32 定时器 | 输入捕获单元与输出比较单元
单片机·嵌入式硬件