资源预览内容
第1页 / 共12页
第2页 / 共12页
第3页 / 共12页
第4页 / 共12页
第5页 / 共12页
第6页 / 共12页
第7页 / 共12页
第8页 / 共12页
第9页 / 共12页
第10页 / 共12页
亲,该文档总共12页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;USE IEEE.STD_LOGIC_UNSIGNED.ALL;USE IEEE.STD_LOGIC_ARITH.ALL;ENTITY div IS -50000 和 50000000分频PORT(clk,clear,stop: IN STD_LOGIC;clk_out1,clk_out2:OUT STD_LOGIC;END div;ARCHITECTURE a OF div ISSIGNAL tmp1: INTEGER RANGE 0 TO 24999;SIGNAL tmp2: INTEGER RANGE 0 TO 499;SIGNAL clktmp1: STD_LOGIC;SIGNAL clktmp2: STD_LOGIC;BEGINclk_out1=clktmp1;clk_out2=clktmp2;P1:PROCESS(clear,clkBEGINIF clear = 1 THEN tmp1=0;ELSIF clkevent AND clk = 1 THENIF tmpl = 24999 THENtmp1=0; clktmp1= not clktmp1;ELSEtmp1=tmp1+1;END IF;END IF;END PROCESS P1;P2:PROCESS(clear,stop,clktmp1BEGINIF clear = 1 THENtmp2=0;ELSIF stop = 0 THENIF clktmp1event AND clktmp1 = 1 THENIF tmp2 = 499 THENtmp2=0; clktmp2= not clktmp2;ELSEtmp2clk0,clear=reset,stop=pause,clk_out1=clk1,clk_out2=clk2; cat0=1111;p1:PROCESS(clk1,resetBEGINIF reset=1 THENaddress=11;ELSIF clklevent AND clk1=1 THENIF address = 01 THENaddress=00;ELSEaddress=address+1;END IF;END IF;END PROCESS p1;p2:PROCESS(clk2,reset,pauseBEGINIF reset = 1 THENELSIF clk2event AND clk2 = 1 THENIF si = 0101 AND s2 = 1001 THEN s1=0000;ELSIF s2 = 1001 THEN s1=s1+1;END IF;END IF;END PROCESS p2;p3:PROCESS(clk2,reset,pauseBEGINIF reset = 1 THEN s2=0000;ELSIF clk2event AND clk2 = 1 THENIF s2 = 1001 THENs2= 0000;ELSEs2led1led1led1led1led1led1led1led2led2led2led2led2led2led2led2led2led2led2figures=led2; catsfigures=led1;catsfigures=0000000”; END CASE;row=data;col=st1;d0=0000000001111111WHEN pic0000100001110111WHEN pic0000110001110011WHEN pic0001110001100011WHEN pic0001111001100001WHEN pic0011111001000001WHEN pic“0011111101000000WHEN pic“0111111100000000WHEN pic0111111100000000WHEN pic0111111100000000WHEN pic0111111100000000WHEN pic0111111100000000WHEN pic0111111100000000WHEN pic“00000”ELSE00001ELSE00010ELSE00011ELSE00100ELSE00101ELSE00110ELSE00111ELSE01000ELSE01001ELSE01010ELSE01011ELSE01100ELSE01101ELSE0111111100000000WHEN pic“0111111100000000WHEN pic = 10000ELSE 0000000000000000”;d1=0000000000111110WHEN pic = 00000ELSE 0000000000111110WHEN pic =00001ELSE 0000000000111110WHEN pic = 00010ELSE 0000000000111110WHEN pic = 00011ELSE 0000000000111110WHEN pic = 00100ELSE 0000000000111110WHEN pic = 00101ELSE 0000000000111110WHEN pic = 00110ELSE 0000000000111110WHEN pic = 00111ELSE 0000100000110110WHEN pic = 01000ELSE 0000110000110010WHEN pic = 01001ELSE 0001110000100010WHEN pic = 01010ELSE 0001111000100000WHEN pic = 01011ELSE 0011111000000000WHEN pic = 01100ELSE 0011111000000000WHEN pic = 01101ELSE 0011111000000000WHEN pic = 01110ELSE 0011111000000000WHEN pic = 01111ELSE 0011111000000000WHEN pic = 10000ELSE 0000000000000000;d2=0000000000011100WHEN pic = 00000ELSE 0000000000011100WHEN pic =00001ELSE 0000000000011100WHEN pic = 00010ELSE 0000000000011100WHEN pic = 00011ELSE 0000000000011100WHEN pic = 00100ELSE 0000000000011100WHEN pic = 00101ELSE 0000000000011100WHEN pic = 00110ELSE 0000000000011100WHEN pic = 00111ELSE 00000000
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号