Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Help! Not getting the right output

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

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.