[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

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

相关推荐
forgeda5 小时前
如何将FPGA设计验证效率提升1000倍以上(2)
fpga开发·前沿技术·在线调试·硬件断点·时钟断点·事件断点
9527华安16 小时前
FPGA实现40G网卡NIC,基于PCIE4C+40G/50G Ethernet subsystem架构,提供工程源码和技术支持
fpga开发·架构·网卡·ethernet·nic·40g·pcie4c
search718 小时前
写Verilog 的环境:逻辑综合、逻辑仿真
fpga开发
search71 天前
Verilog 语法介绍 1-1结构
fpga开发
小眼睛FPGA1 天前
【RK3568+PG2L50H开发板实验例程】Linux部分/FPGA dma_memcpy_demo 读写案例
linux·运维·科技·ai·fpga开发·gpu算力
幸运学者1 天前
xilinx axi datamover IP使用demo
fpga开发
搬砖的小码农_Sky1 天前
XILINX Zynq-7000系列FPGA的架构
fpga开发·架构
热爱学习地派大星2 天前
FPGA矩阵算法实现
fpga开发
热爱学习地派大星2 天前
Xilinx FPGA功耗评估
fpga开发·verilog·vivado·fpga功耗·xpe
搬砖的小码农_Sky2 天前
XILINX Ultrascale+ Kintex系列FPGA的架构
fpga开发·架构