[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

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

相关推荐
ZYNQRFSOC1 天前
基于XCKU5P纯逻辑 NVME测试
fpga开发
FPGA小迷弟2 天前
使用FPGA开发高速AD/DA芯片的接口学习
fpga开发
stars-he2 天前
FPGA学习笔记(6)逻辑设计小结与以太网发送前置
笔记·学习·fpga开发
燎原星火*2 天前
FPGA 逻辑级数
fpga开发
175063319452 天前
Vivado Zynq7020 生成正弦波(查表法) + 行为级仿真
fpga开发
Terasic友晶科技2 天前
4-DE10-Nano的HDMI方块移动案例——I2C通信协议
fpga开发·i2c·hdmi·de10-nano·i2c通信协议
莫问前程_满城风雨2 天前
verilog 可变范围的bit选择
运维·服务器·verilog
云雾J视界3 天前
FPGA在AI时代的角色重塑:硬件可重构性与异构计算的完美结合
fpga开发·边缘计算·gpu·vitis·ai推理·azure云·异构编程
s09071363 天前
FPGA中CIC设计注意事项
算法·fpga开发·cic滤波器
Aaron15883 天前
RFSOC+VU13P在无线信道模拟中的技术应用分析
数据结构·人工智能·算法·fpga开发·硬件架构·硬件工程·射频工程