您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 电子设计/PCB > 一种基于FPGA的数字秒表设计方法_王永维
,、,,。,、,,FPGA。,FPGA、,。,FPGA,。FPGAVHDL,VHDLEDAModelSim,。1、,1。、,,,BCD,2,:1,0.01s。32MHz,0.01,100Hz,320000,;(1)(6),6,,:2011-07-21FPGA(,610054):FPGA。VHDL,ModelSimEDA。、、。,,。,。:FPGA;;;VHDL12doi:10.3969/j.issn.1563-4795.2012.01.0041041026,。/、,,、/;,。。,,,。,1KHz,。22.1,32MHz,0.01s,100Hz,320000,VHDL:process(clk)beginif(clk'eventandclk='1')thenif(q=159999)thenq=0;count_temp=notcount_temp;elseq=q+1;endif;endif;endprocess;2.2595999,,,610,,410、26,10060。,3。,:、,:,,。ModelSim:6VHDL:process(clear,clk)beginif(clear='1')thentmp=0000;carryout='0';elsif(clk'eventandclk='1')thenif(rst='0')thenif(tmp=0101)thencarryout='1';tmp=0000;elsetmp=tmp+1;carryout='0';endif;endif;36/1046111()endif;10VHDL6,,。2.3,,。VHDLModel-Sim::process(enablein)beginif(enablein'eventandenablein='1')thentemp=nottemp;endif;endprocess;2.4,,,,。4,7,1:VHDL:process(datainput)begincasedatainputiswhen0000=dataoutput=0000010;when0001=dataoutput=1001111;when0010=dataoutput=0010001;when0011=dataoutput=0000101;when0100=dataoutput=1001100;when0101=dataoutput=0100100;when0110=dataoutput=0100000;when0111=dataoutput=0001111;when1000=dataoutput=0000000;when1001=dataoutput=0000100;whenothers=dataoutput=1111111;endcase;endprocess;3,,。,。VHDL:architectureBehavioraloftopfileissignalclk:std_logic:='0';signalenableout:std_logic:='0';signaldata0,data1,data2,data3,data4,data5:std_logic_vector(3downto0):=0000;componentabc5ABCDabcdefg000001111110100010110000200101101101300111111001401000110011501011011011601101011111701111110000810001111111910011111011A10101110111B10110011111C11001001110D11010111101E11101001111F1111100011112port(clk:instd_logic;dout:outstd_logic);endcomponent;componentenableport(enablein:instd_logic;enableout:outstd_logic);endcomponent;componenthighlevelport(rst,clk,clear:instd_logic;output1,output2,output3,output4,output5,output6:outstd_logic_vector(3downto0);carryout:outstd_logic);endcomponent;componentyimaport(datainput:instd_logic_vector(3downto0);dataoutput:outstd_logic_vector(6downto0));endcomponent;beginu0:abcportmap(clkin,clk);u1:enableportmap(enablein,enableout);u2:highlevelportmap(enableout,clk,clear,data0,da-ta1,data2,data3,data4,data5);u3:yimaportmap(data0,dataout0);u4:yimaportmap(data1,dataout1);u5:yimaportmap(data2,dataout2);u6:yimaportmap(data3,dataout3);u7:yimaportmap(data4,dataout4);u8:yimaportmap(data5,dataout5);endBehavioral;,,,,testbench。,,,.bit。,,/,。,0.03s,。4,EDA。XinlinxFPGA,,、、。,、,,。EDA,FPGA,,,,,。[1].[M],,2008,198-207.[2],,.VHDL[J],,2004(3);44-45.[3].VHDL[M],,2004(3).[4],。CPLD[J],,2004(10):2.(1987-),,。,:。!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!,。20096,《》DOI。《》,(DOI)。!13
本文标题:一种基于FPGA的数字秒表设计方法_王永维
链接地址:https://www.777doc.com/doc-4266150 .html