[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

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

相关推荐
Hello-FPGA26 分钟前
Xilinx KU040 FPGA Camera Link 图像采集
c++·fpga开发
明德扬28 分钟前
AD采集卡应用示例交流:从传感器采集到高速信号验证
fpga开发
傻童:CPU1 小时前
PS与PL之间的交互
fpga开发
神奇元创13 小时前
商用级光路加速卡:大模型推理的极速落地方案
python·神经网络·fpga开发·dsp开发
FPGA小徐1 天前
深度神经网络FPGA设计进展、实现与展望
fpga开发
FPGA小徐1 天前
FPGA数字信号处理(一)数字混频实现详解|NCO/DDS原理、有符号数避坑、直流滤除工程实战
fpga开发
Passionate.Z1 天前
基于FPGA的CLAHE自适应限制对比度直方图均衡算法硬件verilog实现
图像处理·嵌入式硬件·算法·fpga开发·fpga
Szime2 天前
AD9694 国产替代方案:四通道高速 ADC 在通信与雷达项目中的选型参考
单片机·嵌入式硬件·fpga开发
kaizq2 天前
在线MakerChip虚拟FPGA设计动态仿真实践
fpga开发·mulerun·makerchip·virtualfpgalab·在线动态仿真·imacopilot
FPGA小徐2 天前
OV5640 摄像头 DDR3 缓存 HDMI/VGA 显示系统详解与
fpga开发