Altera_Forum
Honored Contributor
13 years agoSimulating Nios system as a module
I searched for “simulation” in the Nios forum and read all the related results I could find. I also read Altera’s “AN-351 – Simulating Nios II Embedded Processor Designs.” I am still confused.
My goal is behavioral simulation of a system written in SystemVerilog that contains a Nios processor as a module. The simulation environment is ModelSim. The project hierarchy looks like this:Top level module
Nios system
Parts of Nios system (memory, etc)
Unrelated module 1
Submodules
Unrelated module 2
... I would like to simulate the top level module to make sure the whole project (including Nios) is working. My Nios system runs from internal memory and has a memory initialization file so that it comes up running my code. AN-351 seems to only cover simulating a Nios/Qsys system itself. In my case the modules labeled “unrelated” are not part of the Qsys system. I started down the path of simulating it like any system written entirely in SystemVerilog. Then, from the Qsys-generated files I added simulation/my_nios.v. As expected, that gives me an error for each of the 40 missing submodules. I can add those manually by hand, but that will take some time. Before I go too much farther down this path, is there something wrong with my approach? I originally expected there to be a smooth process for what I want to accomplish.