Forum Discussion
Altera_Forum
Honored Contributor
15 years agofsm debuging
fsm debugging
Hi I started to check the fsm on real time and got some strange behaviors. I tried working with SignalTap but I didn't like the way he display the waves and we didn't really get how to work with him. So I went to ModelSim and created a test bench and got the next wave form There is a lot of signals there but I can see that the logic is working, the only problem is that the pwm is not working (the signal in red) and I don't know why. This design works when all the code is in the same file (without components) I had the same thing with the encoder enable nut I succeeded in solving it by giving him a default value of '0'. for another way to look were the program got stuck I used a 7 seg display where at the commands bk,fd - 1,2 the fsm got stuck at state 15 and in the commands rt,lt - 3,4 the fsm got stuck at state 1033 Replies
- Altera_Forum
Honored Contributor
I have put a batter simulation sample with
- Altera_Forum
Honored Contributor
With components and 'red' values showing in modelsim when I assume you're trying to drive the pwm outputs, this might be multiple drivers. With a glance for this over your file, that's not evident, but might be hidden in your components for your pwm drivers (steer, motion).
It's best to simulate first. Don't rely on tools like signal tap except for integration. When you develop a module, simulate it. Better yet, have someone else do it (independent verification). Jerry - Altera_Forum
Honored Contributor
I have puted the simulation result at a doc because the gif isn't clear