[HDLBits] Mt2015 muxdff

Taken from ECE253 2015 midterm question 5

Consider the sequential circuit below:

Assume that you want to implement hierarchical Verilog code for this circuit, using three instantiations of a submodule that has a flip-flop and multiplexer in it. Write a Verilog module (containing one flip-flop and multiplexer) named top_module for this submodule.

复制代码
module top_module (
	input clk,
	input L,
	input r_in,
	input q_in,
	output reg Q);
	wire D;
    assign D = L ? r_in : q_in;
    always@(posedge clk) Q<=D;
endmodule

这里体现出来,必须分开分步写各个器件。

相关推荐
謓泽4 小时前
【6.26】芯片测试入门 从零搭自动化测试框架|PyVISA+OOP 保姆级教程
stm32·单片机·fpga开发·雷达·tr
乌恩大侠6 小时前
【AI-RAN】面向电信行业的 NVIDIA DGX BasePOD
人工智能·fpga开发·o-ru
传感器与混合集成电路1 天前
伺服数据采集控制模块系统集成实战手册:接口设计要点、上电顺序与开发环境配置全解析
fpga开发
xxLearn2 天前
Vivado 2025.2 下载程序时提示:“ERROR : invalid command name ps7_init“
fpga开发
科恒盛远2 天前
【无标题】
fpga开发·硬件工程·信号处理
千寻xun3 天前
一、理论篇-NVME协议学习笔记
笔记·学习·fpga开发·nvme ssd·nvme协议
AndyHeee3 天前
【PCIe中的BAR、MMIO、MMU、mmap函数与页表】
fpga开发
nuoxin1143 天前
HR4988替代A4988-富利威
网络·人工智能·嵌入式硬件·fpga开发·dsp开发
一口一口吃成大V3 天前
vivado的bit 和 bin的区别
fpga开发
尤老师FPGA4 天前
HDMI数据的接收发送实验(十八)
fpga开发