Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

Problem with MAX II EPM240T100

Altera_Forum
Honored Contributor II
1,899 Views

Hello people, 

I tell you my serious problem 

 

I have programmed a state machine in VHDL. This state machine works with an external clock´s pulses. 

Simulation is OK. 

When I see waveforms in oscilloscope, usually the MAX II works correctly but when one of the inputs change at the same time that clock (both slopes are at the same time) the output has an anormal state during one clock`s period. 

 

I made the same test with the internal oscilator and I have the same problem. 

 

I don´t know if this problem is normal or not.  

Could be a problem of compilator of QuartusII? 

 

Thank you very much!
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
877 Views

You have to synchronise asynchronous external inputs with a 2-stage register chain before letting it interact with the state machine. 

You may want to look up 'metastability' to learn what can/will happen otherwise.
0 Kudos
Altera_Forum
Honored Contributor II
877 Views

Thank you very much for you response, 

 

What do you want to say with 2-stage register? 

 

Thanks!
0 Kudos
Reply