[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

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

相关推荐
ooo-p2 小时前
FPGA学习篇——Verilog学习Led灯的实现
学习·fpga开发
嵌入式-老费3 小时前
Zynq开发实践(FPGA之选择开发板)
fpga开发
风_峰6 小时前
PuTTY软件访问ZYNQ板卡的Linux系统
linux·服务器·嵌入式硬件·fpga开发
电子凉冰18 小时前
FPGA入门-状态机
fpga开发
Aczone2818 小时前
硬件(十)IMX6ULL 中断与时钟配置
arm开发·单片机·嵌入式硬件·fpga开发
晓晓暮雨潇潇1 天前
Serdes专题(1)Serdes综述
fpga开发·serdes·diamond·latticeecp3
XINVRY-FPGA1 天前
XCKU15P-2FFVA1760I AMD 赛灵思 Xilinx Kintex UltraScale+ FPGA
arm开发·嵌入式硬件·阿里云·fpga开发·云计算·硬件工程·fpga
嵌入式-老费1 天前
Zynq开发实践(FPGA之第一个vivado工程)
fpga开发
贝塔实验室1 天前
两种常用的抗单粒子翻转动态刷新方法
论文阅读·经验分享·笔记·科技·学习·程序人生·fpga开发
minglie12 天前
zynq arm全局计时器和私有定时器
fpga开发