Forum Discussion

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

Functional simulation problem

I wrote my first design in AHDL and it complied fine. When i did the functional simulation. I added various nodes in the simulation which contained both Input/Output pins and buried registers. My problem is when the simulation is complete during the waveform update process , my I/O pins are there but all the registers disappear:( . I don't know why...

Can anyone tell me why and the way to get around it....

Thanks

Sando

10 Replies

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

    Here it is.

    Open your _.vwf, then "Insert node or bus>Node finder>Filter>Registers" ....

    Good luck.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ye.. i did that and it puts register ( a D flip flop) in my waveform file. But the problem starts when i do "Start compilation and simulation". Once i do that and it returns success, then it ask s me if i want to update the vector file with latest vector file. i say yes as i have to see the result and once i do that node i added (i.e. a D flip) disappears. I have attached a snapshot of my problem. if anybody can figure it out... ?????

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

    Are there any simulation results for that signal? If its getting compiled out (becuase its not used) then it'll also be removed in simulation and when you update it wont be there.

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

    yes there are and that is not the only one register that disappears.. there are several more.. actually any register that i add, it disappears but that is not the case of I/O Pins.. :confused:

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

    Can you post the code? I suspect that Quartus is removing the registers becuase they are not needed or can be optimized out, and thus the simulation is invalid.

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

    here is the code. i have using Quartus ver 7. there a vector waveform file as well. try this:

    add registers to the waveform file and run the functional simulator. then go back to the file. you will see, what i meant.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    yes there are and that is not the only one register that disappears.. there are several more.. actually any register that i add, it disappears but that is not the case of I/O Pins.. :confused:

    --- Quote End ---

    Once you add and remove registers in your top project. You must compile the project and change your _.vwf again.

    That's why you can't find the registers.

    Good luck.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Under node finder in vwf, if you filter to "Registers post fitting", you can see that what you are look for is not there. This is because the registers have been compiled out by quartus.

    Scanning over your code I can see whats wrong is on line 75

    Serial_Out_D[].clrn = GND;

    clrn is active low, so the Serial_Out_D reg is getting removed. This needs to be tied to VCC.

    After changing this, I can now see all the registers in simulation.

    Regards