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

运行结果:

相关推荐
少司府5 小时前
嵌入式外设篇(二)GPIO·二:GPIO输出与LED控制
linux·stm32·单片机·嵌入式硬件·mcu·51单片机·系统
Flying Bear9 小时前
Keithley 2450 SourceMeter源表上位机开发笔记
笔记·单片机·嵌入式硬件
无敌贵点大王11 小时前
从寄存器层面重学STM32(11)——ADC理论
stm32·单片机·嵌入式硬件
希和202716 小时前
代码讲解:STM32F103C8T6 驱动 HC-SR04 超声波测距
stm32·单片机·嵌入式硬件
编程小白菜12318 小时前
STM32L0 ADC串扰揭秘:充电电压如何“伪造”压力数据
stm32·单片机·嵌入式硬件
菜鸟~noob23319 小时前
[AI]间章:系列走到这里,聊聊后面的规划、造卡需要的软件平台,以及为什么我要先暂停更新
人工智能·python·fpga开发·django·pygame
橘为己有4411 天前
STM32:USART 串口(2)
stm32·单片机·嵌入式硬件
少司府1 天前
嵌入式外设篇(一)GPIO·一:认识GPIO
linux·单片机·嵌入式硬件·mcu·系统·rtos·嵌入式软件
国科安芯2 天前
星载姿轨控单元RISC-V MCU的存储、时基与辐射韧性——AS32S601ZIT2在商业卫星控制与配电单元中的应用
单片机·嵌入式硬件·mcu·risc-v·低轨卫星·抗辐射
en.en..2 天前
STM32 定时器预分频器 TIMx_PSC 详解
单片机·嵌入式硬件