当前位置: 首页 > news >正文

vivado刷题笔记46

题目:
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 top_module (input clk,input reset,input enable,output [3:0] Q,output c_enable,output c_load,output [3:0] c_d
); //assign c_enable=enable;assign c_load=reset || ((Q==12)&enable);assign c_d=1;count4 the_counter (.clk(clk), .enable(c_enable),.load(c_load),.d(c_d),.Q(Q));endmodule

结果正确
在这里插入图片描述
本题为1-12计数器,考察函数例化结合计数器的编程。

http://www.lryc.cn/news/342542.html

相关文章:

  • 网络基础——校验
  • SparkSQL与Hive整合 、SparkSQL函数操作
  • K8s: Helm搭建mysql集群(2)
  • matlab期末知识
  • 多台服务器共享python虚拟环境和Linux安装python虚拟环境
  • 在Python中安装和使用pandas库
  • 零基础学习数据库SQL语句之查询表中数据的DQL语句
  • C++语法|bind1st和bind2nd的用法
  • Zabbix+Grafana-常见报错及异常处理方式记录
  • 一键转换,MP4视频变为MP3音频,只需这一行代码!
  • Oracle12之后json解析包怎么调用
  • wordpress子比主题美化-为图文列表封面添加动态缩略图特效 多种效果演示
  • spring boot3多模块项目工程搭建-上(团队开发模板)
  • 人脸美型SDK解决方案,适用于各类应用场景
  • RS2103XH 功能和参数介绍及规格书
  • nn.TransformerEncoderLayer详细解释,使用方法!!
  • 巨控GRM561/562/563/564Q杀菌信息远程监控
  • RT-DETR-20240507周更说明|更新Inner-IoU、Focal-IoU、Focaler-IoU等数十种IoU计算方式
  • Web3:下一代互联网的科技进化
  • SQL注入-基础知识
  • npx 有什么作用跟意义?为什么要有 npx?什么场景使用?
  • Docker搭建LNMP+Wordpress
  • PCIE相关总结
  • OpenCV 入门(五) —— 人脸识别模型训练与 Windows 下的人脸识别
  • C++基础-编程练习题2
  • Linux下GraspNet复现流程
  • Linux——MySQL5.7编译安装、RPM安装、yum安装
  • LSTM递归预测(matlab)
  • 计算机网络 备查
  • 查看软件包依赖关系