版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1FPGA示器用来显示允许通行或通行的时间倒计时。本设计我们是基于FPGA的采用大规模可编程逻辑器件FPGA,通过设计来实现译码显示模块6六部分组成。本设计在XilinxISE和 SE软件平台上使用VHDL语2显示的顺序为:左转 绿 黄 红灯15秒、80秒、45秒、5秒。状态表如表所表3- 红红红红绿黄55红绿黄红红红6六部分组成。各个模块的关系与构架如下图所示。1S的脉冲波。程序如下libraryuseuseieee.std_logic_unsigned.all;entityfenpinqi port(clk1khz:inclk1hz:outstd_logic); architectureaoffenpinqiisprocess(clk1khz) q:integer:=0; ifclk1khz'eventandclk1khz='1'thenifq=512thenr:=notr; elseendif;endif;endprocess;enda;controlcontrolclkSS的值来决定红绿灯的状程序如下libraryuseuseieee.std_logic_unsigned.all;entitycontrolisport(clk:ins:outstd_logic_vector(2downto0);loadat,loadbt:outstd_logic;at,bt:outstd_logic_vector(6downto0)); architectureaofcontrolsignalt:integerrange0to130:=0; clk'eventandclk='1'then then elsift=15then elsift=60thenelsift=65then elsift=80 s<="100";elsift=125 endendift=130then endif;endprocess;endclk,就进行一次减一操作。atdaojishi模块程序libraryuseuseieee.std_logic_unsigned.all;entityatdaojishiisport(clk,loadat:in std_logic_vector(6downto0); std_logic_vector(6downto0));endarchitectureaofatdaojishisignalcountat:std_logic_vector(6downto0);waituntilifloadat='1' elsecountat<=countat-1;endif;endprocess;endMainlibraryuseuseieee.std_logic_unsigned.all;entitymainisport s:instd_logic_vector(2downtolrgy:outstd_logic_vector(7downtoendarchitectureaofmainisvariableb:std_logic_vector(7downto0);caseswhen=>when=>when=>when=>when=>when => whenothers=>b:=" endcase;endprocess;end译码程序如下libraryuseuseieee.std_logic_unsigned.all;entityto8421bcdisport( std_logic_vector(3downto0); std_logic_vector(6downto0));endarchitectureaofto8421bcdis ifat>=" "then " " " " " " "endif;ifbt>=" "then " " " " " " "endif;endprocess;enda;libraryuseuseieee.std_logic_unsigned.all;entityyimaxianshiisport(at1,bt1:instd_logic_vector(3downto0);at2,bt2:instd_logic_vector(6downto0);aout1,aout2,bout1,bout2:outstd_logic_vector(7downto0));endyimaxianshi;architectureaofyimaxianshiiscaseat1when"0000"=> when"0001"=> when"0010"=> when"0011"=> when"0100"=> when"0101"=> when"0110"=> when"0111"=> when"1000"=> when"1001"=> others=>aout1<=" endcase;case when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>"; others=>aout2<=" endcase;case when"0000"=> when"0001"=> when"0010"=> when"0011"=> when"0100"=> when"0101"=> when"0110"=> when"0111"=> when"1000"=> when"1001"=> others=>bout1<=" endcase;casebt2when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>";when"=>"; others=>bout2<=" endcase;endprocess;enda;模块、yima模块和yimaxianshi模块。这些模块均经过设计、编译、仿真,结果正确。最后 测试和效果评估在分频器程序仿真结果图中,clk1khz1khz;clk1hz为输出脉1hz的信号。controlloadat,loadbtdaojishi模块测试(含两个clk,执行一次,并将结果输出。Mainmain模块程序仿真结果图中,S为输入信号,用来表明整个红绿灯的状态(6个状态:S0~S5);lrgy为输出信号,代表整个红绿灯的亮和灭的情况,灯的排序从到低绿灯、黄灯,然后南北方向左转灯、红灯、绿灯、黄灯。从图中我们可以看出S的状态从”到“101aout1代表十位,aout2代表个位;bout1,bout2bt的值分解成个位和十bout1代表十位,bout2代表个位。仿真结果完全正确,符合预期。**Failure:(vsim-3807)Typesdonotmatchbetweencomponentandentityforport Time:0 tion: Instance:/abc_abc_sch_tb/uut/xlxi_2File:control.vhd#**Failure:(vsim-3807)Typesdonotmatchbetweencomponentandentityforport Time:0 tion: Instance:/abc_abc_sch_tb/uut/xlxi_2File:control.vhd#**Failure:(vsim-3807)Typesdonotmatchbetweencomponentandentityforport Time:0 tion: Instance:/abc_abc_sch_tb/uut/xlxi_2File:control.vhd 幻灯片文JPEG[1].
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 消化系统疾病与护理要点
- 医疗设备材料环保性对环境的影响
- 白内障手术术前评估规范
- 2026年山东大学海信光电研究院实验技术岗位招聘备考题库及一套参考答案详解
- 2026年台江县民族中医院第四次公开招聘备案制专业技术人员7人实施备考题库及完整答案详解一套
- 2026年宜宾市叙州区妇幼保健计划生育服务中心招聘备考题库完整答案详解
- 2026年安徽医科大学第一附属医院临床研究医院劳务派遣招聘10人备考题库及答案详解一套
- 2026年丹东市人力资源和社会保障局公开选聘法律顾问备考题库带答案详解
- 2026年中华联合财产保险股份有限公司杭州中心支公司招聘备考题库及答案详解1套
- 2026年中国储备粮管理集团有限公司成都分公司校园招聘37人备考题库及一套答案详解
- 《基于杜邦分析法的公司盈利能力研究的国内外文献综述》2700字
- 华东师大版一课一练八年级数学第一学期答案上海增强版答案
- 寒假作业一年级上册《数学每日一练》30次打卡
- 中职数学基础模块上册第3章函数复习课课件
- JTS 206-2-2023 水运工程桩基施工规范
- 2021年新湘教版九年级数学中考总复习教案
- 施工技术部门的安全生产责任制
- 上海亲子司法鉴定机构名录
- 德佑地产二手房买卖合同
- 《中外园林史》课程标准
- JJF 2024-2023能量色散X射线荧光光谱仪校准规范
评论
0/150
提交评论