下载此文档

时钟分频.doc


文档分类:通信/电子 | 页数:约5页 举报非法文档有奖
1/5
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/5 下载此文档
文档列表 文档介绍
EDA 实验报告山农大电子实验名称时钟分频?实验目的学****数控分频器的设计、分析和测试方法。?实验原理数控分频器的功能就是当在输入端给定不同输入数据时,将对输入的时钟信号有不同的分频比, 数控分频器就是用计数值可并行预置的加法计数器设计完成的,方法是将计数溢出位与预置数加载输入信号相接即可。?实验要求将 clock5 连接至 4096Hz , 编写分频逻辑, 将其分频至 1Hz , 2Hz , 8Hz , 16Hz , 编写四选一 MUX ,可用按键控制选择分频后的某时钟。扩展实验 3 中的计数器, 使其能计数 0-99 , 并编写顶层文件例化分频逻辑、选择器、计数器, 使计数器在不同的频率下计数。?实验步骤【1】分频逻辑: library ieee; use ; use ; entity dvf is port(clk:in std_logic; s: in std_logic_vector(1 downto 0); clkend:out std_logic); end; architecture one ofdvf is signal clk1_tmp:std_logic; signal clk2_tmp:std_logic; signal clk3_tmp:std_logic; signal clk4_tmp:std_logic; t2048:integer range 0 to2048; t1024:integer range 0 to1024; t512:integer range 0 to512; t256:integer range 0 to256; begin fen1: process(clk) begin if clk'event and clk='1' then t2048<2047 t2048<=cnt2048+1; else if en='1'then if cqi1<9 then cqi1<=cqi1+1; else cqi1<=(others=>'0'); if cqi2<9 then cqi2<=cqi2+1; else cqi2<=(others=>'0'); end if; end if; end if; end if; if cqi2=9 then cout<='1'; else cout<='0'; end if; cq1<=cqi1; cq2<=cqi2; end process; end behav; 【 3】顶层例化文件 library ieee; use ; entity t is port(clk:in std_logic; rst,en:in std_logic; s: in std_logic_vector(1 downto 0); cout:out std_logic; cq1:out std_logic_vector(3 downto 0); cq2:out std_logic_vector(3 downto 0)); end entity t; architecture behv of t ponent dvf port(clk:in std_log

时钟分频 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数5
  • 收藏数0 收藏
  • 顶次数0
  • 上传人fy3986758
  • 文件大小0 KB
  • 时间2016-06-15