[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

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

相关推荐
gaoxcv16 小时前
TDC相关的一些方法
fpga开发
我爱C编程16 小时前
【3.4】双口RAM模块的FPGA实现
fpga开发·fpga·fft·双口ram
三万棵雪松17 小时前
【嵌入式刷题硬件设计基础(一)】
fpga开发·嵌入式·硬件基础
扣脑壳的FPGAer17 小时前
Xilinx远程更新之watchdog Timer1/ Timer2
fpga开发
ALINX技术博客18 小时前
【黑金云课堂】FPGA技术教程Linux开发:Petalinux安装
linux·运维·fpga开发
豆包公子1 天前
虚拟机配置共享文件&烧录FPGA bit文件
fpga开发
c-u-r-ry301 天前
pll/mmcm输入时钟配置页面警告
经验分享·fpga开发
逻辑诗篇1 天前
硬核算力集结!TMS320C6678、XC7K690T等、匠行科技SBC819模拟信号采集处理板,解锁高端测控新标杆
科技·fpga开发
狂奔蜗牛(bradley)2 天前
FPGA基础知识:深度剖析异步复位同步释放
fpga开发
发发就是发2 天前
USB系统架构概述:从一次诡异的枚举失败说起
驱动开发·单片机·嵌入式硬件·算法·fpga开发