Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Multiple nios systems in one design

Altera_Forum
Honored Contributor II
923 Views

When having multiple nios systems (pft files) in a design, The tool chain breaks in a subtle way. It does warn you of that you are into "deep water". I would like to point out that it is very inconvenient not to be able to have several nios systems in the same design, so I started to find a way to do that. I explain how I have done: 

 

Problem: 

Its clear that the peripherals in the nios systems could have name clashes (eg. uart_0) if you are not careful, as they by default all end up in the design root. I have tried to solve this by preceding all peripheral names with a short tag uniqe for each nios systems (eg. cpu1_uart_0). This is also practical for keeping things in a nice systematic context. Anyway, I am not sure if this completely removes all issues, because the sopc creates a altera_vhdl_support.vhd file (I use vhdl, verilog would be different), and I am not sure if I can rely on having only one of those, or if it is unique to the nios systems. In the latter case the system would break, as sopc warns me about. 

To overcome this potential problem I have used the obvious soltion of separting items: put the secondary nios systems in sub directories. This should remove all issues about name clashes. Its though important to put a user-library path to point out each subdirectory. 

 

Her I find an issue with sopc which is very awkward. 

 

So I have systemMain.ptf in \design_root_dir, systemSub.ptf in \design_root_dir\systemSub_dir. I have a top diagram in \design_root_dir. If i double click on my systemSub in my blockdiagram to open sopc on it, it cant find the nios systems. 

Simply opening SOPC from a menu will only open the systemMain.ptf. 

Attempts to navigate using file/open... from inside sopc is a bit unusual as it does not show folders. Setting "show all files" solves this, but only to find that it does not permit opening ptf files located outside design root where it was invoked! 

 

So SOPC does not permit to open nios systems resident outside \design_root, which would then encurage you to put your nios systems IN the \design_root_dir. This again is problematic due to naming issues, and is discurages by SOPC. 

In conclusion, the tool chain is broken in a kind of dead-lock when it comes to multiple nios systems. 

 

Resolution:  

The solution I found was: 

Use megawizard, select edit existing nios systems (or create new nios systems for first time use), navigate to your \design_root_dir\systemSub_dir and open the systemSub.vhd(.v) file. This correctly invokes sopc on systemSub. 

Now, I have not done any simulations, so I dont know of any issues here using this method. 

 

I would appreciate comments on if this is a method which should work, or if there are subtle issues and learn of other methods which works better. 

 

regards 

henning 

 

PS: I have not put this forward to altera mySupport.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
194 Views

Now I realize how its intended to make multiple systems: 

 

When you add a nios core inside sopc, an additional bus is added to the avalon fabric. By properly selecting the connection dots its posible to build two completely decoupled systems, the goal I started out with. Doing it inside one ptf system has many advantages ofcourse. 

 

One of these day I will RTFM http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

 

regards
0 Kudos
Reply