[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

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

相关推荐
落chen2 小时前
基于FPGA的SDRAM开发-进阶篇
fpga开发
飞猫的边缘AI8 小时前
边缘AI-5: 了解最灵活的计算芯片FPGA
人工智能·fpga开发·ai芯片·边缘ai·计算芯片·边缘ai芯片·titanium edge
badboy12110 小时前
Xilinx Vitis Core Development Kit 2025.2.1_Win+Linux
linux·fpga开发·xilinx
海盐nnn1 天前
面向 AI 的 FPGA 开发流程:别急着让它写代码,先把方向定好
fpga开发
zlinear数据采集卡1 天前
数据采集卡从入门到精通(38):上位机开发实战——Python/QT/LabVIEW的技术选型与分层架构
python·单片机·嵌入式硬件·qt·fpga开发·开源·labview
zlinear数据采集卡2 天前
数据采集卡从入门到精通(42):项目实战三——设备预测性维护系统,从布点到预警
开发语言·单片机·嵌入式硬件·安全·fpga开发
国科安芯2 天前
ASL706S:让 MCU 不再“失忆跑飞“的守护芯片
分布式·单片机·嵌入式硬件·安全·fpga开发·架构
明德扬2 天前
多路MIPI摄像头如何同步聚合?一文看懂FPGA视频汇聚方案
fpga开发·音视频
松小白song2 天前
FPGA开发三大铁律:位宽、逻辑与连接,为何仿真通过上板却挂?
fpga开发
FPGA小徐3 天前
FPGA 时钟频率计算与单位换算
fpga开发