Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 Discussions

Help! Not getting the right output

Altera_Forum
Honored Contributor II
1,629 Views

This assignment involves detecting two different strings of 12 bits and outputting a 1 or 3 depending on which string is detected then output that to a seven segment display. The other requirements are that it be of the mealy type with registered output and one latency. The x input for the following code is 000010000000. This should return 1001111, which is a one on a seven segment display. I'm not getting this output. What is wrong with my code? Thanks a lot, Mike

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
761 Views

Please post the testbench code. Anyway, you can add the state register to waveforms, in Model Sim, and check in each clock edge the state machine transition. This way you can find the wrong transition and fix the code.

0 Kudos
Altera_Forum
Honored Contributor II
761 Views

I don't have a testbench code. I missed class that week due to the birth of my son, so I never got the hang of it.

0 Kudos
Altera_Forum
Honored Contributor II
761 Views

Found one mistake, I forgot about 'resetn'!

0 Kudos
Reply