[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

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

相关推荐
洋洋Young16 小时前
【Xilinx FPGA】DDR3 SDRAM 控制器
fpga开发·xilinx
碎碎思17 小时前
在 FPGA 里跑 SDR 和 FT8:一个 32 MHz 全频谱无线电的硬核实现
fpga开发
EVERSPIN19 小时前
USB3.0接口转换高性能图像传感和数据采集方案
fpga开发·usb3.0·接口转换·usb3.0接口转换
Macbethad19 小时前
串口服务器技术报告:从RS232/485到MODBUS TCP的工业通信演进
fpga开发
GateWorld1 天前
FPGA DSP模块使用中不易察觉的坑
fpga开发·ip·实战经验·fpga dsp使用
minglie11 天前
用vio_uart测试verilog
fpga开发
Terasic友晶科技1 天前
6-DE10-Nano的HDMI方块移动案例——使用Modelsim仿真I2C控制器
fpga开发·仿真·modelsim·hdmi·i2c_controller
我爱C编程2 天前
【仿真测试】基于FPGA的2ASK扩频通信链路实现,包含帧同步,定时点,扩频伪码同步,信道,误码统计
fpga开发·帧同步·定时点·ask·扩频通信·扩频伪码同步
minglie12 天前
Wokwi组件
fpga开发
qq_337599462 天前
FPGA知识点
经验分享·fpga开发