[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

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

相关推荐
9527华安16 小时前
FPGA实现Aurora 64B66B图像视频点对点传输,基于GTH高速收发器,提供2套工程源码和技术支持
fpga开发·音视频·aurora·gth·高速收发器·64b66b
XINVRY-FPGA1 天前
EPM240T100I5N Altera FPGA MAX II CPLD
人工智能·嵌入式硬件·fpga开发·硬件工程·dsp开发·射频工程·fpga
第二层皮-合肥1 天前
FPGA实现ETH接口
单片机·嵌入式硬件·fpga开发
璞致电子1 天前
【PZ-ZU47DR-KFB】璞致FPGA ZYNQ UltraScalePlus RFSOC QSPI Flash 固化常见问题说明
嵌入式硬件·fpga开发·fpga·软件无线电·sdr
陌夏微秋1 天前
FPGA硬件设计2 最小芯片系统-ZYNQ7020/7010
嵌入式硬件·fpga开发·硬件架构·硬件工程·信息与通信·智能硬件
风已经起了2 天前
FPGA学习笔记——IIC协议简介
笔记·学习·fpga开发
逐梦之程2 天前
FPGA-Vivado2017.4-建立AXI4用于单片机与FPGA之间数据互通
fpga开发
XINVRY-FPGA3 天前
10CL016YF484C8G Altera FPGA Cyclone
嵌入式硬件·网络协议·fpga开发·云计算·硬件工程·信息与通信·fpga
嵌入式-老费3 天前
产品开发实践(常见的软硬结合方式)
fpga开发
FakeOccupational4 天前
【电路笔记 通信】AXI4-Lite协议 FPGA实现 & Valid-Ready Handshake 握手协议
笔记·fpga开发