首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

关于gclk2一问,请大家帮忙看看?

关于gclk2一问,请大家帮忙看看?

我程序设计兼有频率测量和信号控制,使用了两个时钟,一个接晶振,gclk2接频率信号,现在发现gclk2有问题,现象如下:cpld内计数器计数值不对,最后改用一下最简单的程序library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use IEEE.STD_LOGIC_ARITH.ALL; entity f724 is port(clk: in std_logic; f_out: out std_logic; countout :buffer std_logic_vector(7 downto 0)); end; architecture structure of f724 is begin f_out<=clk; process(clk) begin if rising_edge(clk) then if countout="11111111" then countout<="00000000"; else countout<=countout+'1'; end if; end if; end process; end structure; clk用gclk2接入,除以上三个脚外,gclk1结晶振,用示波器看countout(0)发现是时间间距 不等的方波,按理说应该是输入频率的2倍频,应时间距相等的方波,输入信号良好,f_out信号良好,如果以上程序将clk用gclk1接入,间距相等,程序仿真结果无误,电路板上gclr,goe闲置,请大家帮忙看看,谢谢
返回列表