[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

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

相关推荐
爱吃汽的小橘3 小时前
FPGA分频器
fpga开发
Eloudy20 小时前
Ubuntu 搭建 Chisel 开发环境备忘
ic·fpga
上班最快乐1 天前
基于FPGA的APS6404L-3SQR QSPI PSRAM驱动设计(2)
fpga开发
FPGA-ADDA1 天前
第一篇:软件无线电(SDR)基础与FPGA的角色
fpga开发·fpga·数字电路·dsp·软件无线电
Fpga_User1 天前
基于Zynq UltraScale+的FLASH固化问题记录
嵌入式硬件·fpga开发
FPGA-ADDA1 天前
高速数据记录仪19EG_4NVME_EXT_V1.2存储板
fpga开发·fpga·高速存储·mpsoc·大容量存储
Saniffer_SH1 天前
【每日一题】PCIe链路协商的时候进入Polling compliance如何排错?
服务器·人工智能·驱动开发·嵌入式硬件·测试工具·fpga开发·自动化
亮锅锅来啦1 天前
Synplify_2023综合时报错clk_out is not input pin
fpga开发
浩子智控1 天前
航天高可靠性设备开发—抗辐射
嵌入式硬件·fpga开发·硬件工程
XPii1 天前
FPGA工程师面试资料【1】
fpga开发·面试·职场和发展