[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

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

相关推荐
stars-he19 小时前
FPGA学习笔记(8)以太网UDP数据报文发送电路设计(二)
网络·笔记·学习·fpga开发
FPGA_小田老师20 小时前
FPGA例程(3):按键检测实验
fpga开发·verilog·vivado·led灯·按键测试
博览鸿蒙21 小时前
想考研到电子类,未来从事 FPGA/IC方向,目前该怎么准备?
考研·fpga开发
m0_5557629021 小时前
FPGA + AD7768-4 实现数据采集的可能方案
fpga开发
whik119421 小时前
Xilinx ZYNQ-7000系列FPGA选型指南
fpga·xilinx·zynq·选型·高速接口·资源
ShiMetaPi21 小时前
GM-3568JHF丨ARM+FPGA异构开发板系列教程:外设教程 09 CAN
arm开发·fpga开发·fpga·rk3568
XXYBMOOO1 天前
内核驱动开发与用户级驱动开发:深度对比与应用场景解析
linux·c++·驱动开发·嵌入式硬件·fpga开发·硬件工程
白狐_7982 天前
数字集成电路设计核心考点与 Verilog 实战指南
fpga开发
FPGA_ADDA2 天前
ORIN+FPGA 高速采集AI 智能处理板
人工智能·fpga开发
卡姆图拉夫2 天前
基于米尔 MYD-YM90X 开发板的项目测评与技术分享
fpga开发