[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

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

相关推荐
芯门4 小时前
FPGA商用级ISP(三):自动白平衡(AWB)算法实现与 FPGA 架构解析
图像处理·计算机视觉·fpga开发
jz_ddk15 小时前
[实战] 从冲击响应函数计算 FIR 系数
python·fpga开发·信号处理·fir·根升余弦·信号成形
不吃橘子的橘猫17 小时前
《集成电路设计》复习资料2(设计基础与方法)
学习·算法·fpga开发·集成电路·仿真·半导体
不吃橘子的橘猫18 小时前
《集成电路设计》复习资料4(Verilog HDL概述)
学习·算法·fpga开发·集成电路·仿真·半导体
ShiMetaPi1 天前
GM-3568JHF丨ARM+FPGA异构开发板应用开发教程:13 PN532 NFC读卡案例
arm开发·fpga开发
国科安芯1 天前
空间站机械臂中MCU与CANFD抗辐照芯片的集成研究
单片机·嵌入式硬件·fpga开发·架构·risc-v
ShiMetaPi2 天前
GM-3568JHF丨ARM+FPGA异构开发板应用开发教程:11 RS485读写案例
arm开发·fpga开发·rk3568
156082072192 天前
国产时钟AU5615芯片调试记录
fpga开发
嵌入式-老费2 天前
Linux camera驱动开发(特殊的cpu+fpga芯片)
图像处理·驱动开发·fpga开发
ShiMetaPi2 天前
GM-3568JHF丨ARM+FPGA异构开发板应用开发教程:10 以太网测试案例
网络·arm开发·fpga开发·rk3568