[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

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

相关推荐
ZYNQRFSOC18 小时前
基于安路PH2A系列FPGA的JESD204B接口测试
嵌入式硬件·fpga开发
szxinmai主板定制专家20 小时前
基于RK3588超小体积,轻巧,长续航的无人机AI模块,支持视频跟踪
arm开发·人工智能·嵌入式硬件·fpga开发·无人机
unicrom_深圳市由你创科技1 天前
多 FPGA 之间如何同步与通信?
fpga开发
LCMICRO-133108477462 天前
长芯微LCMDC7616完全P2P替代AD7616,16通道16位模数转换器(ADC)
stm32·嵌入式硬件·fpga开发·硬件工程·模数转换器adc·电力线监测
又菜又爱玩的东哥2 天前
【Verilog 3-8译码器设计与仿真:深入理解case语句与组合逻辑】
fpga开发
Risehuxyc2 天前
<= 是Verilog中的非阻塞赋值操作符
fpga开发
扣脑壳的FPGAer2 天前
傅里叶级数、傅里叶变换、Z变换、数字滤波器
fpga开发·信号处理
Risehuxyc2 天前
HDL中assigned 与 always 有什么区别?
fpga开发
我爱C编程2 天前
【3.5】固定旋转因子系数乘法模块的FPGA实现1——45°旋转因子和高阶蝶形修正因子
fpga开发·固定旋转因子·旋转因子
Terasic友晶科技2 天前
答疑解惑 | DE25-Nano开发板串口在访问FPGA端外设LED时卡死,无任何反应
fpga开发·串口·led·de25-nano