欢迎来到天天文库
浏览记录
ID:47279221
大小:109.60 KB
页数:19页
时间:2019-08-26
《电子实验数字跑表》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、电&科就丈曇基于FPGA的数字系统设计数字跑表的设计学生姓名:学号:指导教师:摘要木文利用XILINX-ISE开发软件和XILINXEDA教学实验开发板实现数字跑表的开始、暂停以及复位等功能。ISE工程利用VHDL语言编写,单模块包含时钟分频进程、始能及清零进程、时钟数据产生进程、位码产生进程和显示进程;分模块设计包含时钟分频模块、控制模块、计数器模块、显示模块。计时区间00'00''00到59'59''99。课余设计的单模块源程序:libraryIEEE;useIEEE.STD_L0GIC_1164.ALL;useIEEE.STD_LOGIC_ARITH.ALL;useTREE.
2、STD_LOGTC_UNSTGNED.ALL;UncommentthefollowinglibrarydeclarationifinstantiatinganyXilinxprimitivesinthiscode.—libraryUNISIM;--useUNTSTM.VComponents.al1;entitypaobiaoisPort(clkin:inSTD_LOGIC;enable:inSTDLOGIC;clear:inSTDJ.OGTC;scg:outSTD_LOGIC_VECTOR(7downto0);wei:outSTD_LOG1C_VECTOR(2downto0);en
3、out:outSTDLOGIC);endpaobiao;architectureBehavioralofpaobiaoissignalcntlOO:integerrange1to240000;signalcntlk:integerrange1to24000;signalclklOO:std_logic:=,0’•signalclklk:std_logic:二'O'•fsignalcn:std_logic:=O';signaldl:integerrange0to5:=0;signald2:integerrange0to9:=0;signald3:integerrange0to5:二0
4、;signald4:integerrange0to9:=0;signald5:integerremgc0to9:=0;signald6:integerrange0to9:=0;signalnum:integerrange1to6:=1;beginenout<=,O';process(elkin)beginifclkin,eventandclkin二T'thenifent100=240000thencntl00<=l;clkl00<=notclklOO;elsecntlOO<=cntlOO+l;endif;ifcntlk=24000thencntlk<=l;clklk<=notclk
5、lk;elsecntlk<=cntlk+l;endif;endif;endprocess;process(enable,clear)beginifclear=,0"thenen<=0,;elseifcnablc,eventemdcnable=,1'thenen<=noten;endif;endif;endprocess;process(clear,dl,d2,d3,d4,d5,d6)beginifcleai'二'O'thendl<=0;d2<=0;d3<=0;d4<=0;d5〈二0;d6<=0;一cn<=0;elsethenifen二’1'andclklOO'eventandclk
6、lOO二’1ifd6二9thend6<=0;ifd5=9thend5〈二0;ifd4二9thend4<=0;ifd3=5thend3<=0;ifd2=9thend2<=0;ifdl二5thendl<=0;elsedl<=dl+l;endif;elsed2<=d2+l;endif;elsed3<=d3+l;endif;elsed4<=d4+l;endif;elsed5<=d5+l;endif;elsed6<=d6+l;endif;endif;endif;endprocess;process(num)beginifclklk'eventemdclklk二'1'thenifnum=6th
7、ennum<=l;elsenum<=num+l;endif;endif;endprocess;process(num)、、IO2OOOO、II〉8①s、、soooooo、b〉#s、、二二Iooo、、20s、、300003、ll〉boes、、102020、
8、
9、〉8瞬、、I00II00r2①s、、s二oooo、b〉#s、、IOIOOIOO、、20S、、三曙、、二000000、
10、
11、〉8瞬IICMPIIegII寸PIILOPII9PIICO4epCOPco4COe户ep0户C
此文档下载收益归作者所有