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

运行结果:

相关推荐
嵌入式小站8 小时前
STM32 零基础可移植教程 17:USART + DMA + IDLE,串口不定长接收怎么做
stm32·单片机·嵌入式硬件
史蒂芬_丁8 小时前
Cortex-M内核中断保护机制详解:PRIMASK寄存器的正确使用方法
单片机·嵌入式硬件
崇山峻岭之间9 小时前
单片机传感器实验
单片机·嵌入式硬件
芯岭技术12 小时前
PY32F030国产32位MCU,应用场景广泛,宽工作电压、丰富外设
单片机·嵌入式硬件·物联网
第二层皮-合肥14 小时前
【数据采集专栏】利用TDC提高外部触发精度
fpga开发
尤老师FPGA15 小时前
HDMI数据的接收发送实验(十三)
fpga开发
信看16 小时前
常见通信接口
单片机·嵌入式硬件
Rsingstarzengjx18 小时前
STM32-F103ZET6开发板
stm32·单片机·嵌入式硬件
我先去打把游戏先18 小时前
VMware NAT 模式 Ubuntu 虚拟机「宿主机能上网、虚拟机 ping 不通外网 + apt 更新卡死」全故障复盘
linux·运维·vscode·单片机·嵌入式硬件·ubuntu·keil5
aini_lovee18 小时前
STM32 串口转CAN + WiFi模块实现WiFi转CAN网关
stm32·单片机·嵌入式硬件