[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

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

相关推荐
Shang1809893572611 小时前
T31ZX 君正/INGENIC智能视频处理器T31ZX可提供软硬件资料T31Z采用先进的低功耗设计
嵌入式硬件·fpga开发·音视频·t31zx智能视频处理器
通信小呆呆15 小时前
各具神通——Vivado中不同系列的IP核差异详解
网络协议·tcp/ip·fpga开发
做一个快乐的小傻瓜1 天前
XCKU5P引脚约束
fpga开发
水云桐程序员1 天前
FPGA开发需要的环境配置
fpga开发
LCMICRO-133108477461 天前
长芯微LPS6288完全P2P替代TPS61288,是一款具有 15A 开关电流的全集成同步升压转换器
stm32·单片机·嵌入式硬件·fpga开发·硬件工程·同步升压转换器
Soari2 天前
FPGA开发:Vivado 打开工程的两种方式详解(.xpr vs Tcl)
fpga开发
星华云2 天前
[FPGA] ISE DDS IP核简单记录使用
fpga开发
Kong_19942 天前
芯片开发学习笔记·二十五——UCIe
fpga开发·芯片开发
发发就是发2 天前
I2C适配器与算法:从一次诡异的时序问题说起
服务器·驱动开发·单片机·嵌入式硬件·算法·fpga开发
ALINX技术博客2 天前
【黑金云课堂】FPGA技术教程FPGA基础:流水灯实验
fpga开发·fpga