[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

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

相关推荐
LabVIEW开发11 小时前
LabVIEW振动信号采集分析
fpga开发·labview·labview知识·labview功能·labview程序
发光的沙子11 小时前
FPGA----vitis生成静态链接库
fpga开发
FPGA小迷弟11 小时前
FPGA工程师面试题汇总(二十四)
网络协议·tcp/ip·fpga开发·verilog·fpga
cici158741 天前
基于FPGA的任意四位除法器设计与实现
fpga开发
guygg881 天前
基于STM8S的FreeModbus协议移植指南
fpga开发
kanhao1002 天前
从 Vectorless 到 SAIF 再到板级实测:HLS Kernel 功耗估计全流程实战
嵌入式硬件·fpga开发
yongui478342 天前
基于FPGA的频率计与串口通信系统设计与实现
fpga开发
FPGA_ADDA2 天前
国产复旦微FPGA+DSP 6U VPX处理板
fpga开发·全国产·复旦微690t·ft6678dsp·6u vpx板卡·jfm7vx690t36
fengfuyao9852 天前
基于FPGA的简易电子密码锁设计(Verilog实现)
fpga开发
北城笑笑2 天前
Frontend 与 FPGA 深度融合实战解析:从技术协同到多场景落地( 前端和现场可编程门阵列 )
前端·websocket·3d·vue·fpga