Forum Discussion

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

How do I simulate NIOS II designs in modelsim?

Hi,

I followed this document exactly( http://www.altera.com/literature/an/an189.pdf (http://www.altera.com/literature/an/an189.pdf) ), but while their leds start counting, I get no response. I have the feeling the code from the NIOS II IDE is just not being executed.

Do I do something wrong, or is it maybe because I use a different version of the software? I am using Quartus II 4.1 and Modelsim SE PLUS 6.0a. Hope any of you knows what this is.

David

3 Replies

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

    Yikes! You were following the Nios instructions but sound like you are using Nios II.

    Because Nios II now has the IDE, the procedure for running modelsim is different.

    Maybe this is documented somewhere in the Nios II product (I'll ask our doc manager)?

    If not, here's the basic steps:

    1. Open your project in Quartus.

    2. Open SOPC Builder from Quartus.

    3. Open the Nios II IDE from SOPC Builder.

    4. Create a C/C++ project.

    5. Select the build properties of the system library you just created and check the box that says modelsim.

    You must do this to build your elf so that slow startup code that isn't needed to run on modelsim is removed.

    6. Build your project.

    7. Look for "Run As" and select modelsim.

    8. Modelsim should start and your simulated memories should contain your initial program contents.

    From here on, it is the same except that your printfs should show up in the IDE.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks.

    That should teach me not to use google search before checking the website. It works now.

    David