Board logo

标题: 关于gclk2一问,请大家帮忙看看? [打印本页]

作者: dayday    时间: 2004-7-26 12:01     标题: 关于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闲置,请大家帮忙看看,谢谢




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0