Verilog刷题HDLBits——Exams/ece241 2014 q7a
Verilog刷题HDLBits——Exams/ece241 2014 q7a
- 题目描述
- 代码
- 结果
题目描述
Design a 1-12 counter with the following inputs and outputs:
Reset Synchronous active-high reset that forces the counter to 1
Enable Set high for the counter to run
Clk Positive edge-triggered clock input
Q[3:0] The output of the counter
c_enable, c_load, c_d[3:0] Control signals going to the provided 4-bit counter, so correct operation can be verified.
You have the following components available:
the 4-bit binary counter (count4) below, which has Enable and synchronous parallel-load inputs (load has higher priority than enable). The count4 module is provided to you. Instantiate it in your circuit.
logic gates
module count4(input clk,input enable,input load,input [3:0] d,output reg [3:0] Q
);
The c_enable, c_load, and c_d outputs are the signals that go to the internal counter’s enable, load, and d inputs, respectively. Their purpose is to allow these signals to be checked for correctness.
代码
module top_module (input clk,input reset,input enable,output [3:0] Q,output c_enable,output c_load,output [3:0] c_d
); //always@(posedge clk)beginif(reset||(enable&&Q==12))Q<=1;elseif(enable)Q<=Q+1;endassign c_enable = enable;assign c_load = reset||(enable&&Q==12);assign c_d = c_load?1:0;count4 the_counter (clk, c_enable, c_load, c_d /*, ... */ );endmodule
结果
Verilog刷题HDLBits——Exams/ece241 2014 q7a相关推荐
- Verilog刷题HDLBits——Tb/tff
Verilog刷题HDLBits--Tb/tff 题目描述 代码 结果 题目描述 You are given a T flip-flop module with the following decla ...
- 【小罗的hdlbits刷题笔记2】补码运算中溢出的问题(Exams/ece241 2014 q1c)
关于补码运算中进位溢出的问题及延伸,hdlbits中Exams/ece241 2014 q1c给出了很好的解释,首先来看问题: Assume that you have two 8-bit 2's c ...
- FPGA学习: Verilog刷题记录(15)
FPGA学习: Verilog刷题记录(14-1) 刷题网站 : HDLBits 第三章 : Circuits 第二节 :Sequential Logic 第一节:Finite State Machi ...
- FPGA学习: Verilog刷题记录(10)
FPGA学习: Verilog刷题记录(10) 刷题网站 : HDLBits 第三章 : Circuits 第二节 :Sequential Logic 第一节:Latches and Flip-Flo ...
- 【Verilog刷题篇】硬件工程师从0到入门2|组合逻辑
Verilog从0到入门2-组合逻辑 前言 Q1:4位数值比较器电路 Q2:4bit超前进位加法器电路 Q3:优先编码器电路① Q4:用优先编码器①实现键盘编码电路 Q5:优先编码器Ⅰ Q6:使用8线 ...
- HDLBits Exams/ece241 2013 q4 水库题
题目和简述 题目内容翻译: 大型水库可为多个用户提供服务.为了使水位足够高,三个传感器以5英寸的间隔垂直放置.当水位高于最高传感器(S3)时,输入流量应为零.当液位低于最低传感器(S1)时,流量应最大 ...
- 牛客网verilog刷题_VL47 格雷码计数器
格雷码(gray code)的使用 在产生FIFO满信号时,要将写指针和读指针进行比较,由于两个指针分别在各自的时钟域,彼此之间是异步的,在使用二进制进行计数器实现指针时,就会导致用于比较的指针取样错 ...
- Exams/ece241 2014 q4经验
总结:模块命名注意不能与内置模块同名 Given the finite state machine circuit as shown, assume that the D flip-flops are ...
- IC笔试牛客网verilog刷题总结四
47.格雷码计数器 reg [3:0] bin_out;wire [3:0] gray_wire;//格雷码转二进制always@(posedge clk or negedge rst_n)begin ...
最新文章
- Asp.net Mvc 多级控制器 路由重写 及 多级Views目录 的寻找视图的规则 (多级路由) 如:Admin/Test/Index...
- Openssl:构建CA的过程并实现web服务基于https访问的网络架构
- PSSH远程套件工具
- mysql表数据以本地文件方式导入Hive
- 链接和作用域2 - C++快速入门43
- 富文本wangEditor的批量激活
- LeetCode之简单回文数
- 小汤学编程之JavaEE学习day07——版本控制工具:SVN、GIT
- 最新Erphpdown v13.11modown8.02主题破jie版去授权无域名限制版本
- 黑马程序员-银行业务调度系统
- 凯立德导航 版本号意义解读
- 【BST】Treap
- 推荐两款外文检查语法错误和润色的软件
- Replacing TCP Wrappers in RHEL 8
- OLYMP‘ARTS 2023奥艺大会中国推介会在北京盛大举行
- 玩转冷板式液冷 你需要一份靠谱的“设计参考”
- 单个正态总体参数的区间估计、两个正态总体参数的区间估计 Matlab实现
- 干货|app自动化测试之Appium 原理 与 JsonWP 协议分析
- 数据库中minus的用法
- xp下彻底删除oracle
热门文章
- iPlus破解iPhone后升级BL4.6操作教程
- 国产探地雷达在学校设备采购中的必要性和可行性论证
- 小肚皮最新版本_小肚皮最新版|小肚皮app安卓版V5.14 _当游网
- DELL服务器远程控制组件BMC设置及应用
- metasploit上线windows2016靶机
- 更全的扩招大学名单!超百所“双一流”高校公布2021年硕士招生人数
- Pyecharts Geo创建中国可视化地图
- 新手选 Arduino 还是 树莓派?
- jenkins整个工作流程
- mysql常建引擎_智慧树初识数据库—Mysql见面课测试答案