Altera_Forum
Honored Contributor
16 years agoAltera MAX 3064 CPLD weird problem
Hi,
I'm using Altera MAX3000 series (EPM3064-10 to be exact) with CPLD_CLK = 77.5Mhz, and I have a very weird problem... pseudocode is below: signal_abc = asynchronous from external chip below is flip-flops (just pseudocode): if (reset) then reset the flops elsif (clk'event and clk = 1) signal_abc_q1 <= signal_abc; signal_abc_q2 <= signal_abc_q1; signal_abc_q3 <= signal_abc_q2; signal_abc_posedge <= signal_abc_q2 and not signal_abc_q3; if (reset OR signal_def_clear = '1') then -- async reset signal_def <= '0'; elsif (clk'event and clk = 1) if (signal_abc_posedge = '1') then signal_def <= '1'; But, I see intermittent problems where there is NO edge transitions of signal_abc (and clean), yet there is edge transition for signal_def. tracing back: - signal_abc stays low - but (exporting signal_abc_q2 & q3 out to pads), I saw: these 2 internal flip-flops actually toggles from low to HIGH, - which of course causes signal_abc_posedge to go HIGH, - which causes signal_def to go HIGH I can't figure out why this is happening... right now, the only thing I can think of is there's something wrong with the CPLD... any help is greatly appreciated... Thanks