[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

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

相关推荐
nuoxin11412 小时前
WILX1200HC-5TG144I替代 LCMXO2-1200HC-5TG144I(富利威)
人工智能·嵌入式硬件·fpga开发·电脑·硬件工程·dsp开发
Bahair_14 小时前
【FPGA】使用fdatool设计滤波器系数,使用FIR Compiler导入系数联合滤波
fpga开发
qq_4112624217 小时前
硬件是ESP32-P4连接LAN8720A,正常初始化之后,设备DHCP失败
stm32·单片机·fpga开发
第二层皮-合肥1 天前
【数据采集专栏】时钟同步(有时钟卡方案)
fpga开发
XINVRY-FPGA1 天前
XCKU035-2FBVA676I AMD Xilinx Kintex UltraScale FPGA
arm开发·嵌入式硬件·网络安全·fpga开发·硬件工程·信号处理·fpga
米琪脆脆屋1 天前
0-1学习FPGA之底层资源——LUT
fpga开发·fpga
TTGGGFF1 天前
ModelSim SE 10.1c 超详细安装与激活保姆级教程(图文详解 2026 仅供学习)
学习·fpga开发
Aaron15881 天前
无人机反制中AOA+TDOA联合定位技术与雷达探测定位技术的应用对比分析
arm开发·嵌入式硬件·fpga开发·硬件工程·无人机·信息与通信·信号处理
暴风雨中的白杨2 天前
fpga复位电平与资源消耗对比测试
fpga开发
ALINX技术博客2 天前
【黑金云课堂】FPGA技术教程Linux开发:NVMe/Qt/OpenCV人脸检测
linux·qt·fpga开发