Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHow 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. David3 Replies
- Altera_Forum
Honored 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
Honored Contributor
David,
This is what you want: an351: simulating nios ii embedded processor designs (http://www.altera.com/literature/an/an351.pdf) All documentation for the Nios II processor can be accessed off the Nios II literature page: http://www.altera.com/literature/lit-nio2.jsp (http://www.altera.com/literature/lit-nio2.jsp). Cheers, Matthew - Altera_Forum
Honored Contributor
Thanks.
That should teach me not to use google search before checking the website. It works now. David