




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
5us转换为2slibrary ieee;use ieee.std_logic_1164.all;entity fdiv is port(clk:in std_logic; q:out std_logic);end fdiv;architecture a of fdiv is begin process(clk)variable cnt:integer range 0 to 199999;variable ff: std_logic; begin if clkevent and clk=1 then if cnt199999 then cnt:=cnt+1; else cnt:=0; ff:=not ff; end if; end if;q=ff;end process;end a;20MHz转换成1Hzlibrary ieee;use ieee.std_logic_1164.all;entity fdiv is port(clk:in std_logic; q:out std_logic);end fdiv;architecture a of fdiv is begin process(clk)variable cnt:integer range 0 to 99999;variable ff: std_logic; begin if clkevent and clk=1 then if cnt99999 then cnt:=cnt+1; else cnt:=0; ff:=not ff; end if; end if;q=ff;end process;end a;library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;entity counter10 is Port ( clk : in STD_LOGIC; clr : in STD_LOGIC; en : in STD_LOGIC; count : out STD_LOGIC_VECTOR (3downto 0); cn_out : out STD_LOGIC);end counter10;architecture Behavioral of counter10 is SIGNAL q:STD_LOGIC_VECTOR (3 downto 0);beginprocess(clk,clr,en) begin if clr=1 then q=0000; elsif clkevent and clk=1 then if en=1 then if q9 then q=q+1; else q=0000; end if; end if; end if;end process;process(q)begin if q=9 then cn_out=1; else cn_out=0; end if;end process;count=q;end Behavioral;library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;entity load1 is Port ( load : in STD_LOGIC; din : in STD_LOGIC_VECTOR (23 downto 0); dout : out STD_LOGIC_VECTOR (23 downto 0);end load1;architecture Behavioral of load1 isbegin begin if loadevent and load=1 then doutoutp:=1110010; when0001=outp:=0110000; when0010=outp:=1101101; when0011=outp:=1111001; when0100=outp:=0110011; when0101=outp:=1011011; when0110=outp:=1011111; when0111=outp:=1110000; when1000=outp:=1111111; when1001=outp:=1111011; when others=NULL;end case; a=outp(0); b=outp(1); c=outp(2); d=outp(3); e=outp(4); f=outp(5); gclk,q=fre1); U2:div2clk port map(clk=fre1,count_en=fre_en1,clr=cn_clr1,load=load1); U3:counter10 port map(clk=frein,clr=cn_clrl,en=fre_enl,count=dlatchl(3 downto 0),cn_out=cntoutl(0); U4:counter10 port map(clk=cntoutl(0),clr=cn_clrl,en=fre_enl,count=dlatchl(7 downto 4),cn_out=cntoutl(1); U5:counter10 port map(clk=cntoutl(1),clr=cn_clrl,en=fre_enl,count=dlatchl(11 downto 8),cn_out=cntoutl(2); U6:counter10 port map(clk=cntoutl(2),clr=cn_clrl,en=fre_enl,count=dlatchl(15 downto 12),cn_out=cntoutl(3); U7:counter10 port map(clk=cntoutl(3),clr=cn_clrl,en=fre_enl,count=dlatchl(19 downto 16),cn_out=cntoutl(4); U8:counter10 port map(clk=
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 建筑安全防护管理方案
- 工业污水处理厂项目风险评估报告
- 办公设备进出口合同
- Unit1 Reading plus教学设计-人教版英语七年级下册
- 新能源汽车换电模式下的电池管理系统研究报告
- 2025年5G网络基础设施建设与产业发展报告
- 新年好说课稿-2025-2026学年小学音乐一年级上册人音版(主编:曹理)
- 第十三课 正当情窦初开时说课稿初中心理健康北师大版河南专版八年级全一册-北师大版河南专版
- 汽车内饰材料耐热性能2025年市场分析及技术创新报告
- 墙体危险应急预案
- 2025年浙江省能源集团招聘笔试备考题库(带答案详解)
- 项目课程的概念原理与设计
- 小儿腹股沟疝麻醉
- 公司与劳务派遣公司合同范本
- 经络腧穴学-课件
- 智能垃圾分类回收箱
- 中州国信特殊资产管理断供保房服务相关问题解答
- 烟草评级员业务报告范文
- 2025年三基三严考试题题库(含答案)
- 湖北省重点高中智学联盟2024-2025学年高三上学期10月联考物理试题(解析版)
- 2024新教材高中历史 第八单元 中华民族的抗日战争和人民解放战争 第25课 人民解放战争教学设计 部编版必修中外历史纲要上
评论
0/150
提交评论