[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

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

相关推荐
Yesheldon3 小时前
Cadence 高速系统设计流程及工具使用三
嵌入式硬件·fpga开发·硬件架构·硬件工程·智能硬件
搬砖的小码农_Sky6 小时前
FPGA:Xilinx Kintex 7实现DDR3 SDRAM读写
fpga开发·硬件架构·硬件工程
小眼睛FPGA10 小时前
why FPGA喜欢FMC子卡?
fpga开发
tiantianuser12 小时前
NVMe简介1
fpga开发·nvme·可编程逻辑·verilogy
FPGA_ADDA13 小时前
基于RFSOC ZU28DR+DSP 6U VPX处理板
fpga开发·dsp·rfsoc28dr·zu28dr·射频采集
搬砖的小码农_Sky16 小时前
FPGA: Xilinx Kintex 7实现PCIe接口
fpga开发·硬件架构·硬件工程
9527华安16 小时前
紫光同创FPGA实现AD9280数据采集转UDP网络传输,分享PDS工程源码和技术支持和QT上位机
网络·fpga开发·udp·紫光同创·qt上位机·ad9280
9527华安1 天前
紫光同创FPGA实现AD7606数据采集转UDP网络传输,提供PDS工程源码和技术支持和QT上位机
网络·qt·fpga开发·udp·紫光同创·ad7606
szxinmai主板定制专家1 天前
基于TI AM6442+FPGA解决方案,支持6网口,4路CAN,8个串口
arm开发·人工智能·fpga开发
7yewh1 天前
FPGA前瞻篇-计数器设计与实现实例
arm开发·驱动开发·嵌入式硬件·fpga开发·硬件架构·硬件工程·精益工程