Forum Discussion
Altera_Forum
Honored Contributor
12 years agoInvalid logic levels at output of FPGA
Hi, I've written a code for a state machine in an EP3C10F256 FPGA. I program the FPGA successfully but two of the FPGA outputs which correspond to two bits from a 16-bit register no not stand ...
Altera_Forum
Honored Contributor
12 years agoYour problem is you have your timer free running and not based on clock.
You have mixed your state machine logic and other logic together.. And have the timer addition happening regardless in a combinational block instead of a clock based always block. so in simulation the timer is just free running and zero time is moving forward, thus the "Hang" you are experiencing. On the hardware, the timer is running like mad at the highest combinational frequency that is possible, so the output looks like a sign wave because it's toggling faster than the output can really reach. Isolate the statemachine case from the logic case, and move the logic case into a always@(posedge clk) block and you should be closer. Pete