Altera_Forum
Honored Contributor
12 years agoHDL with Quartus 10.0 (state machines and counters)
Hi Forum,
I am not sure if this the right forum. I am working in a project in which part of the code was written in HDL. There is a state machine, SM, which changes states according to some counters. The counters are defined as DFFs. I have found that the counters reset themselves when changing states. I had to use statements like counter[].clrn=VCC to avoid counter to be reseted. I have used one of the states of the SM to clock the counter (counter[].clk= (State_machine==STATE3)). I have found very difficult to predict when the counter will add. Would anybody with experience coding in HDL give me some advice? Regards, Cabrera