




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实用标准文案十五计数器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;文档大全实用标准文案-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'文档大全实用标准文案-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;文档大全实用标准文案十四计数器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;文档大全实用标准文案-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'文档大全实用标准文案-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;文档大全实用标准文案十三计数器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;文档大全实用标准文案-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'文档大全实用标准文案-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;文档大全实用标准文案十二计数器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;文档大全实用标准文案-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'文档大全实用标准文案-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;文档大全实用标准文案十一计数器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;文档大全实用标准文案-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'文档大全实用标准文案-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;文档大全实用标准文案十计数器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"文档大全实用标准文案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');文档大全实用标准文案- -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;文档大全实用标准文案- -END PROCESS;END counter;九计数器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"文档大全实用标准文案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');文档大全实用标准文案- -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;文档大全实用标准文案- -END PROCESS;END counter;八计数器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"文档大全实用标准文案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');文档大全实用标准文案- -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;文档大全实用标准文案- -END PROCESS;END counter;六计数器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文档大全实用标准文案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文档大全实用标准文案-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;文档大全实用标准文案- -end if;- -end if;- -END PRO
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山西省太原市晋源区三校2024-2025学年八年级下学期3月月考生物试题(含答案)
- 辽宁省抚顺市2024-2025学年七年级上学期10月月考道德与法治试卷(含答案)
- 2024-2025学年内蒙古鄂尔多斯市康巴什区八年级(上)期末数学试卷(含部分答案)
- 健身服务投诉处理机制-洞察及研究
- 基于拓扑优化的桥总成拓扑结构在极端工况下的静动态力学特性突变预警模型
- 基于工业4.0的分离齿合套智能化装配工艺与误差补偿系统研究
- 基于区块链技术的减速箱脂全球供应链质量追溯与风险预警平台设计
- 垂直领域知识图谱对割片精度的赋能机制
- 国际标准框架下多品牌交流钳表精度认证体系差异化困境
- 后疫情时代健康监测集成于门禁系统的伦理与成本博弈
- 气瓶检验员考试题库
- AAMA2605-铝窗(板)更高标准有机喷涂的非官方标准、性能要求、测试程序
- 西语国家概况
- 成人学士学位英语1000个高频必考词汇汇总
- GB/T 5271.29-2006信息技术词汇第29部分:人工智能语音识别与合成
- 全屋定制家居橱柜衣柜整装安装服务规范
- 沥青及沥青混合料试验作业指导书
- 义务教育阶段学生艺术素质测评指标体系小学音乐
- 妊娠合并HIV(医学PPT课件)
- Minitab(高级)
- 工学结合的课程开发与教学设计
评论
0/150
提交评论