




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
桂林航天工业学院学生实验报告课程名称EDA技术实验项目名称0-9999计数器的设计开课院(系)及实验室电子信息与自动化学院实验日期年月日学生姓名甘志荣学号2013090110212专业班级自动化2班指导教师庞前娟实验成绩一、实验目的1、掌握VHDL语言的基本结构及编程思想。2、掌握计数器的工作原理。3、掌握7段数码显示译码器设计。4、学习VHDL的多层次设计方法。二、实验内容1、根据计数器的原理,画出设计电路框图;2、用VHDL语言编程实现电路功能;3、下载到开发板验证;三、实验结果1、0-9999计数器的顶层设计图如下:2、0-9999计数器的低层设计(VHDL语言代码) 分频器模块f100的VHDL语言代码:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity f100 is generic(n1 :integer:=50000000); port(clk:in std_logic; f1:out std_logic);end entity f100;architecture getsec of f100 is -signal secout1 : std_logic :=1; signal cnt1: integer range 0 to n1-1:=0;beginprocess(clk) isbeginif clkevent and clk=1 then cnt1=cnt1+1; if cnt1=n1/2 then f1=0; else f1=n1-1 then cnt1=0; end if;end if;end process;end architecture getsec; 计数器模块cout的VHDL语言程序代码:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity cout isport(clk:in std_logic; cn1,cn2,cn3,cn4:out std_logic_vector(3 downto 0);end ;architecture c10 of cout is signal temp1,temp2,temp3,temp4:std_logic_vector(3 downto 0); signal g,s,b:std_logic;begin p1:process(clk) begin if( clkevent and clk=1 )then if temp11001then temp1=temp1+1;g=0; else temp1=0000;g=1; end if; end if; end process p1; p2:process(g) begin if( gevent and g=1 )then if temp21001then temp2=temp2+1;s=0; else temp2=0000;s=1; end if; end if; end process p2; p3:process(s) begin if( sevent and s=1 )then if temp31001then temp3=temp3+1;b=0; else temp3=0000;b=1; end if; end if; end process p3; p4:process(b) begin if( bevent and b=1 )then if temp41001then temp4=temp4+1; else temp4=0000; end if; end if; end process p4; cn1=temp1;cn2=temp2;cn3=temp3;cn4=temp4;end; 显示模块display的VHDL语言的程序代码:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;-use ieee.numeric_std.all;-use ieee.std_logic_signed.all;entity display isport(data1,data2,data3,data4:in std_logic_vector(3 downto 0); clk_s:in std_logic; -reset:in std_logic; wei:out std_logic_vector(3 downto 0); duanxuan:out std_logic_vector(7 downto 0);end ;architecture aa of display is signal b:std_logic_vector(1 downto 0); signal temp:std_logic_vector(3 downto 0); signal duan:std_logic_vector(7 downto 0);begin a1:process(clk_s) begin if clk_sevent and clk_s=1 then bwei=1110; tempwei=1101; tempwei=1011; tempwei=0111; tempduanduanduanduanduanduanduanduanduanduanduan=11111111; end case; end process a3; duanxuan=duan;end; 四、实验结果分析 本次实验用了两个分频器,一个用于计数分出1HZ,一个用于数码管的动态显示分出25000HZ。在计数模块的CLK接入分频器分出的1HZ,也就是来一个上升沿就是一秒,当加到9向十位进一,09999需要四个进程,3个进位标记,上一位的进位标记,作为下一位的时钟信号,就可实现对0999
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 ISO 16355-3:2025 EN Applications of statistical and related methods to new technology and product development process - Part 3: Quantitative approaches for the acquisition o
- 2025中智投资有限公司招聘3人笔试题库历年考点版附带答案详解
- 2025中国电信校园招聘春招开启笔试题库历年考点版附带答案详解版
- 2025年学前教育行业幼教资源整合与提质改造策略报告
- 2025年影像科MRI影像报告准确性评估模拟测试答案及解析
- 2025年互联网金融行业金融科技创新与普惠金融研究报告
- 2025年汽车行业共享出行模式创新研究报告
- 2025年航空航天行业航空航天装备发展前景研究报告
- 2025年自行车锁行业研究报告及未来发展趋势预测
- 2025年VR产业行业虚拟现实与沉浸体验研究报告
- 2025房地产中介劳动合同协议书范本
- 教科版科学五年级上册2.1地球的表面教学课件
- 急进性肾小球肾炎患者的护理
- 2025至2030中国克罗恩病药物行业项目调研及市场前景预测评估报告
- 知识分享大讲堂活动方案
- 2026届初三启动仪式校长讲话:初三启航!以信念为舵赴青春与使命之约
- 暖通施工工程方案(3篇)
- 消化内科常见疾病诊疗标准与流程
- XX中小学落实“双减”政策及加强“五项管理”实施方案
- 急性淋巴细胞白血病课件
- 2025-2026学年鲁科版小学劳动技术一年级上册教学计划及进度表
评论
0/150
提交评论