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

运行结果:

相关推荐
Brilliantwxx16 小时前
【STM32】 DAC 数模转换器(理论 + 外设 + 四个实验案例)
笔记·stm32·单片机·嵌入式硬件
无敌贵点大王1 天前
从寄存器层面重学STM32(15)——IIC理论
stm32·单片机·嵌入式硬件
en.en..1 天前
STM32 HAL 库 | 外设双结构体机制(外设句柄结构体+外设初始化结构体)
stm32·单片机·嵌入式硬件
元器件BOM超人1 天前
ATMEGA32A-AU TQFP-44 Microchip 8位AVR MCU 选型指南
单片机·嵌入式硬件
en.en..2 天前
STM32 GPIO 复用功能寄存器 AFRL/AFRH 原理
单片机·嵌入式硬件
shimly1234562 天前
(done) 野火嵌入式 (16) STM32中断应用概览
stm32·单片机·嵌入式硬件
橘为己有4412 天前
STM32:SPI(1)
stm32·单片机·嵌入式硬件
en.en..2 天前
STM32 定时器 | 输入捕获单元与输出比较单元
单片机·嵌入式硬件
倔强的胡萝卜2 天前
基于STM32F103C8T6的计算器设计(二)
stm32·单片机·嵌入式硬件
仰望星空的凡人2 天前
瑞萨RH850/U2A 时钟系统深度解析:从时钟源、PLL 到外设时钟树的架构与应用
单片机·嵌入式硬件