打印

请教CoolRunner-II 硬件时钟分频器使用方法

[复制链接]
1532|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
ww34021984|  楼主 | 2009-7-29 17:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
今天编了一段代码,主要试着用下CoolRunner-II芯片自带的硬件时钟分频电路。 
代码如下: 使用芯片自带的硬件2分频component ,有模块的声明跟例化,都是照着CoolRunner 11 Advanced Features使用说明做的,但是modulsim仿真没有结果,查看clk_dv2信号量为红色未知状态,dataout一样没有结果输出,烦请知道的同仁不吝赐教,谢谢。 
--------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity det_register is
  port(
      clock: in std_logic;
    datain:  in std_logic;
    dataout: out std_logic);

end det_register;

architecture Behavioral of det_register is

component CLK_DIV2 is
port (
 CLKIN  :  in std_logic;
 CLKDV  :  out std_logic);
end component;

signal clk_dv2   :  std_logic;
begin
u1: CLK_DIV2 port map(CLKIN => clock,CLKDV => clk_dv2);
process(datain,clk_dv2)
begin
  if(clk_dv2'event and clk_dv2='1')then
     dataout<=datain;
  end if;
end process;

end Behavioral;

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

11

帖子

0

粉丝