[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

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

相关推荐
千宇宙航5 小时前
闲庭信步使用图像验证平台加速FPGA的开发:第九课——图像插值的FPGA实现
图像处理·计算机视觉·缓存·fpga开发
尤老师FPGA7 小时前
LVDS系列20:Xilinx 7系ISERDESE2原语(一)
fpga开发
最好有梦想~20 小时前
LVDS TX RX IP调试笔记
fpga·lvds
XINVRY-FPGA1 天前
XCZU47DR-2FFVG1517I Xilinx FPGA AMD ZynqUltraScale+ RFSoC
人工智能·嵌入式硬件·fpga开发·信息与通信·信号处理·射频工程·fpga
forgeda1 天前
如何将FPGA设计的验证效率提升1000倍以上(3)
fpga开发·在线调试·硬件断点
千宇宙航2 天前
闲庭信步使用图像验证平台加速FPGA的开发:第六课——测试图案的FPGA实现
图像处理·计算机视觉·fpga开发
顾北川_野2 天前
Android ttyS2无法打开该如何配置 + ttyS0和ttyS1可以
android·fpga开发
霖002 天前
C++学习笔记三
运维·开发语言·c++·笔记·学习·fpga开发
千宇宙航2 天前
闲庭信步使用图像验证平台加速FPGA的开发:第七课——获取RAW图像
图像处理·计算机视觉·fpga开发
hahaha60162 天前
xilinx fpga芯片的结温
fpga开发