




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 大班课程保护五官教案
- 江苏省徐州市2024-2025学年高一上学期1月期末英语试题 含解析
- 防夹算法设计
- 2025年临时摊位租赁合同示例
- 2025型材购销合同样本
- 2025年度劳动合同制员工招聘申请表
- 2025快递公司物流服务合同范本
- 2025年甘肃货车资格证考试题
- 2025年劳动合同模板:项目经理与建筑工人之间的协议
- 先天性食管裂孔疝的健康宣教
- 学校保洁方案
- 血液透析患者心力衰竭的护理
- 江苏省2021-2022学年二年级下学期数学期中备考卷一(南京专版)
- TCI 535-2024 铝合金液态模锻模具技术条件
- 胰岛素泵护理管理规范
- 9.1.1 西亚 第1课时 课件 七年级地理下册 人教版
- 校外培训机构预收费资金托管协议书范本
- 2025山东能源集团中级人才库选拔高频重点模拟试卷提升(共500题附带答案详解)
- 《餐厅托盘的使用技》课件
- 【化学】化学与可持续发展教学设计-2024-2025学年九年级化学人教版下册
- Unit 2 Know your body(说课稿) -2024-2025学年外研版(三起)(2024)英语三年级下册
评论
0/150
提交评论