Forum Discussion

LChow3's avatar
LChow3
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

ModelSim - vector input not showing the correct binary

Please see the attached file. It's a 10's complement for 4-bit BCD.

I have a 4-bit vector input, and 4-bit vector output. But, the vector input is not showing the correct binary number. It shows all 0000, although the waveform show the correct input that I key in.

How to display the correct vector input in this "Wave" window?

13 Replies

  • sstrell's avatar
    sstrell
    Icon for Super Contributor rankSuper Contributor

    There's something wrong with that group in the Wave view. As you can see in the Objects pane, D is correct there. Remove what you have in the Wave view and then click and drag D from the Objects pane to the Wave view.

    #iwork4intel

    • LChow3's avatar
      LChow3
      Icon for Occasional Contributor rankOccasional Contributor

      Thanks for suggestion.

      First, I couldn't load / open the wave that I saved yesterday. How do I open the wave (those inputs signals that I put in earlier)?

      I have saved the wave in .do file.

    • LChow3's avatar
      LChow3
      Icon for Occasional Contributor rankOccasional Contributor

      If I delete D, drag D from Object pane to Wave window, I couldn't key in the D binary values.

      • RichardT_altera's avatar
        RichardT_altera
        Icon for Super Contributor rankSuper Contributor

        Do you mean to provide input stimulus? If so, you can right click the D in the wave window, select force and insert value. Then run simulation.

        Insert one by one will become a tedious job, instead you can insert example line in the transcript.

        VSIM> force -deposit /D 2#0, 2#1 20, 2#0 40, 2#1 60, 2#1 80

        VSIM> run 200 ns

        the line change D to binary value 0 (2#0) starting from time instant now. Then, 20 ns later, change the input to 1 (2#1 20).

    • LChow3's avatar
      LChow3
      Icon for Occasional Contributor rankOccasional Contributor

      Got it, thank you.