版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、實(shí)用標(biāo)準(zhǔn)文案十五計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY fiveteencout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(3 downto 0);END fiveteencout;ARCHITECTURE counter OF fiveteencout IS SIGNAL count_int:std_logic_vector(0 to 3);BEGINPROCESS(cl
2、k,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="1110") THEN count_int<="0000"ELSEcount_int <= count_int 1;文檔大全實(shí)用標(biāo)準(zhǔn)文案-ELSE- -NULL ;- -IF (count_int="1001") T
3、HEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q&
4、lt;="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL (clock'EVENT AND clock = '1');- -q<=q '1'文檔大全實(shí)用標(biāo)準(zhǔn)文案-end if;-count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock
5、='1')then-WAIT UNTIL rising_edge(clock);-clock'event and clock='1'clock = '1');clock = '1');-count <= 0;-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'-if (clock'event and clock='1') then- -WAIT UNTIL rising_edge(clock);- -count &
6、lt;= 1;- -WAIT UNTIL (clock'EVENT AND- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);-count <= 2;-end if;- -end if;- -end if;- -END PROCESS;END counter;文檔大全實(shí)用標(biāo)準(zhǔn)文案十四計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic
7、_unsigned.all;ENTITY fourteencout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(3 downto 0);END fourteencout;ARCHITECTURE counter OF fourteencout IS SIGNAL count_int:std_logic_vector(0 to 3);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENco
8、unt_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="1101") THEN count_int<="0000"ELSEcount_int <= count_int 1;文檔大全實(shí)用標(biāo)準(zhǔn)文案-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <
9、= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1
10、9;);- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL (clock'EVENT AND clock = '1');- -q<=q '1'文檔大全實(shí)用標(biāo)準(zhǔn)文案-end if;-count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then-WAIT UNTIL rising_edge(clock);-clock'event and c
11、lock='1'clock = '1');clock = '1');-count <= 0;-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'-if (clock'event and clock='1') then- -WAIT UNTIL rising_edge(clock);- -count <= 1;- -WAIT UNTIL (clock'EVENT AND- -WAIT UNTIL clock = '1&
12、#39;- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);-count <= 2;-end if;- -end if;- -end if;- -END PROCESS;END counter;文檔大全實(shí)用標(biāo)準(zhǔn)文案十三計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY thireteencout ISPORT(clk,reset,enable : IN std_lo
13、gic; count : OUT std_logic_ve ctor(3 downto 0);END thireteencout;ARCHITECTURE counter OF thireteencout ISSIGNAL count_int:std_logic_vector(0 to 3);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1'
14、THENIF(count_int="1100") THENcount_int<="0000"ELSEcount_int <= count_int 1;文檔大全實(shí)用標(biāo)準(zhǔn)文案-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -E
15、LSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL
16、 (clock'EVENT AND clock = '1');- -q<=q '1'文檔大全實(shí)用標(biāo)準(zhǔn)文案-end if;-count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then-WAIT UNTIL rising_edge(clock);-clock'event and clock='1'clock = '1');clock = '1');-count <
17、= 0;-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'-if (clock'event and clock='1') then- -WAIT UNTIL rising_edge(clock);- -count <= 1;- -WAIT UNTIL (clock'EVENT AND- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL ri
18、sing_edge(clock);-count <= 2;-end if;- -end if;- -end if;- -END PROCESS;END counter;文檔大全實(shí)用標(biāo)準(zhǔn)文案十二計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY twelvecout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(3 downto 0);END twelvecout;ARCHITECTU
19、RE counter OF twelvecout ISSIGNAL count_int:std_logic_vector(0 to 3);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="1011") THENcount_int<="0000"ELSEcount
20、_int <= count_int 1;文檔大全實(shí)用標(biāo)準(zhǔn)文案-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="10
21、01") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL (clock'EVENT AND clock = '1');- -q<=q '1'文檔大全實(shí)用標(biāo)準(zhǔn)文案-en
22、d if;-count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then-WAIT UNTIL rising_edge(clock);-clock'event and clock='1'clock = '1');clock = '1');-count <= 0;-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'-if (clo
23、ck'event and clock='1') then- -WAIT UNTIL rising_edge(clock);- -count <= 1;- -WAIT UNTIL (clock'EVENT AND- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);-count <= 2;-end if;- -end if;- -end if;- -END PROCESS;END
24、 counter;文檔大全實(shí)用標(biāo)準(zhǔn)文案十一計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY elevencout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(3 downto 0);END elevencout;ARCHITECTURE counter OF elevencout ISSIGNAL count_int:std_logic_vector(0 to 3);BEGINPROC
25、ESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="1010") THENcount_int<="0000"ELSEcount_int <= count_int 1;文檔大全實(shí)用標(biāo)準(zhǔn)文案-ELSE- -NULL ;- -IF (count_int="1001&quo
26、t;) THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')TH
27、EN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL (clock'EVENT AND clock = '1');- -q<=q '1'文檔大全實(shí)用標(biāo)準(zhǔn)文案-end if;-count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and
28、clock='1')then-WAIT UNTIL rising_edge(clock);-clock'event and clock='1'clock = '1');clock = '1');-count <= 0;-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'-if (clock'event and clock='1') then- -WAIT UNTIL rising_edge(clock);- -co
29、unt <= 1;- -WAIT UNTIL (clock'EVENT AND- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);-count <= 2;-end if;- -end if;- -end if;- -END PROCESS;END counter;文檔大全實(shí)用標(biāo)準(zhǔn)文案十計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_l
30、ogic_unsigned.all;ENTITY count ISPORT(clk,reset,enable : IN std_logic; count :OUT std_logic_vector(3 downto 0);END count;ARCHITECTURE counter OF count IS SIGNAL count_int:std_logic_vector(0 to 3); BEGIN PROCESS(clk,reset) BEGIN WAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (
31、OTHERS => '0');ELSIF enable = '1' THEN IF(count_int="1001") THEN count_int<="0000"文檔大全實(shí)用標(biāo)準(zhǔn)文案ELSEcount_int <= count_int 1;-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;-
32、-IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UN
33、TIL (clk'EVENT AND clk = '1');文檔大全實(shí)用標(biāo)準(zhǔn)文案- -WAIT UNTIL (clock'EVENT AND- -q<=q '1'- -end if;- -count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);- -clock'event and clock='1'- -count <
34、;= 0;clock = '1');-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'clock = '1');-if (clock'event and clock='1') then-WAIT UNTIL rising_edge(clock);-count <= 1;-WAIT UNTIL (clock'EVENT AND-WAIT UNTIL clock = '1'clock = '1');-if (cloc
35、k'event and clock='1')then-WAIT UNTIL rising_edge(clock);-count <= 2;-end if;-end if;-end if;文檔大全實(shí)用標(biāo)準(zhǔn)文案- -END PROCESS;END counter;九計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY ninecout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_
36、ve ctor(3 downto 0);END ninecout;ARCHITECTURE counter OF ninecout ISSIGNAL count_int:std_logic_vector(0 to 3);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="1000") TH
37、ENcount_int<="0000"文檔大全實(shí)用標(biāo)準(zhǔn)文案ELSEcount_int <= count_int 1;-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1'
38、;) THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');文檔大全實(shí)用標(biāo)準(zhǔn)文案- -WAIT UNTIL (clock'EVENT AND- -q&l
39、t;=q '1'- -end if;- -count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);- -clock'event and clock='1'- -count <= 0;clock = '1');-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'
40、clock = '1');-if (clock'event and clock='1') then-WAIT UNTIL rising_edge(clock);-count <= 1;-WAIT UNTIL (clock'EVENT AND-WAIT UNTIL clock = '1'clock = '1');-if (clock'event and clock='1')then-WAIT UNTIL rising_edge(clock);-count <= 2;-end if;
41、-end if;-end if;文檔大全實(shí)用標(biāo)準(zhǔn)文案- -END PROCESS;END counter;八計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;ENTITY eightcout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(2 downto 0);END eightcout;ARCHITECTURE counter OF eightcout ISSIGNAL count_int:std_
42、logic_vector(0 to 2);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1' THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THENIF(count_int="111") THENcount_int<="000"文檔大全實(shí)用標(biāo)準(zhǔn)文案ELSEcount_int <= count_int 1;-ELSE- -NULL ;- -
43、IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;count <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"- -END IF;- -
44、IF (reset<='1')THEN-q<="00"-ELSIF- -wait until (clk'event and clk='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');文檔大全實(shí)用標(biāo)準(zhǔn)文案- -WAIT UNTIL (clock'EVENT AND- -q<=q '1'- -end if;- -count<=q;- -WAIT UNTIL clock = '1'- -if (clock'
45、event and clock='1')then- -WAIT UNTIL rising_edge(clock);- -clock'event and clock='1'- -count <= 0;clock = '1');-WAIT UNTIL (clock'EVENT AND-WAIT riseedge clock = '1'clock = '1');-if (clock'event and clock='1') then-WAIT UNTIL rising_edg
46、e(clock);-count <= 1;-WAIT UNTIL (clock'EVENT AND-WAIT UNTIL clock = '1'clock = '1');-if (clock'event and clock='1')then-WAIT UNTIL rising_edge(clock);-count <= 2;-end if;-end if;-end if;文檔大全實(shí)用標(biāo)準(zhǔn)文案- -END PROCESS;END counter;六計(jì)數(shù)器library ieee;use ieee.std_logic_11
47、64.all;use ieee.std_logic_unsigned.all;ENTITY sixcout ISPORT(clk,reset,enable : IN std_logic; count : OUT std_logic_ve ctor(2 downto 0);END sixcout;ARCHITECTURE counter OF sixcout ISSIGNAL count_int:std_logic_vector(0 to 2);BEGINPROCESS(clk,reset)BEGINWAIT UNTIL rising_edge(clk);IF reset = '1
48、9; THENcount_int <= (OTHERS => '0');ELSIF enable = '1' THEN文檔大全實(shí)用標(biāo)準(zhǔn)文案IF(count_int="101") THENcount_int<="000"ELSEcount_int <= count_int 1;-ELSE- -NULL ;- -IF (count_int="1001") THEN-count_int<="0000"END IF;END IF;END PROCESS;coun
49、t <= count_int;- -IF (reset='0') then-q<="0000"- -ELSIF(clk'event and clk='1') THEN- -q<=q 1;- -IF (q<="1001") then-q<="0000"-END IF;-IF (reset<='1')THEN-q<="00"-ELSIF文檔大全實(shí)用標(biāo)準(zhǔn)文案-wait until (clk'event and clk
50、='1');- -WAIT UNTIL (clk'EVENT AND clk = '1');- -WAIT UNTIL (clock'EVENT AND clock = '1');- -q<=q '1'- -end if;- -count<=q;- -WAIT UNTIL clock = '1'- -if (clock'event and clock='1')then- -WAIT UNTIL rising_edge(clock);- -clock'eve
51、nt and clock='1'- -count <= 0;- -WAIT UNTIL (clock'EVENT AND clock = '1');-WAIT riseedge clock = '1'-if (clock'eventand clock='1') then-WAITUNTILrising_edge(clock);-count<=1;-WAITUNTIL(clock'EVENT ANDclock ='1');-WAITUNTILclock = '1'-if (clock'eventand clock='1')then-WAIT UNTILrising_edge(clock);-count <= 2;-end if;文檔大全實(shí)用標(biāo)準(zhǔn)文案- -end if;- -end if;- -END PRO
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 單位管理制度呈現(xiàn)大全【人事管理】
- 三角形的面積推導(dǎo)課件
- 第4單元 民族團(tuán)結(jié)與祖國統(tǒng)一 測(cè)試卷-2021-2022學(xué)年部編版八年級(jí)歷史下冊(cè)
- DBJT 13-317-2019 裝配式輕型鋼結(jié)構(gòu)住宅
- 《電鍍錫工藝學(xué)》課件
- 2024年大學(xué)生攝影大賽活動(dòng)總結(jié)
- 《焊接基本知識(shí)》課件
- 中小學(xué)家長會(huì)122
- 美術(shù):源起與影響
- 醫(yī)療行業(yè)專業(yè)技能培訓(xùn)體會(huì)
- 缺血性腸病完整版本課件
- 汽車起重機(jī)基本結(jié)構(gòu)、工作原理課件
- ××領(lǐng)導(dǎo)班子及成員分析研判報(bào)告(模板)
- 08S305-小型潛水泵選用及安裝圖集
- 視頻監(jiān)控室值班記錄表
- 四川2020版清單定額
- 教材編寫工作總結(jié)
- 企業(yè)員工上下班交通安全培訓(xùn)(簡詳共2份)
- 城市高密度建成區(qū)合流制溢流污染系統(tǒng)研究-黃孝河機(jī)場(chǎng)河水環(huán)境綜合治理項(xiàng)目實(shí)踐
- word 公章 模板
- T∕ZSQX 008-2020 建設(shè)工程全過程質(zhì)量行為導(dǎo)則
評(píng)論
0/150
提交評(píng)論