Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL robot design not working
Hello everybody I'm new in VHDL and I'm doing a project with DE2 board In the project I need to build a robot. My first step was to design a ASM and from that to take out the FSM which i...
Altera_Forum
Honored Contributor
15 years agoThe testbench doesnt match the PWM code you posted. In your PWM code, there is no SW bus.
One other things: When you use a std_logic_vector as a counter (I highly recommend you dont, use the numeric_std library instead of std_logic_arith/unsigned) you dont need to reset it if it gets to max. It will roll over if you get to all ones and roll under if you get to all zeros. You only have to check the value if LED was an integer rather than std_logic_vector.