Forum Discussion

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

simulation doesn't work well

hi, i asked to build a multiplier 2X4.

my problem, as you can see in the image, that signal s5 starts one cycle before the others.

all the signals connected well and i have no idea why it happend.

i have checked my mul and it works well.

you can see my code and the simulation at the links below.

thanks

5 Replies

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

    Hi,

    Just wonder if it is possible for you to initialize the output value ie to 0 to ensure the output to have same values at the beginning of the simulation.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Its definitely a signal initialisation issue. You need to ensure the values in your testbench that drive your DUT are given initial values.

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

    do you mean that i need to initialize the register?

    reser = '0' ?

    or initialize the output of the component? and then how i do it?