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++
12606 Discussions

Relative path support for SOPC builder and QIP files

Altera_Forum
Honored Contributor II
1,929 Views

Hi there, 

 

Does SOPC builder support relative paths in SOPC builder and QIP files? 

 

Every time we checkout a copy of the design from a version control server we will put the working copy in a new path. Quartus II handles it relative path pretty well so we don't have to add the files again in the QII project. But for SOPC builder, we had to change the IP search path every time so that the SOPC builder knows where to find those custom IPs. Also, the paths in QIP files are usually absolute paths, so every time we checkout a working copy we had to regenerate the QIP files. 

 

I wonder if there is a solution to deal with these situation already or not. If not, would Altera consider to add relative path support in all of its software tools? 

 

Thanks, 

Hua
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
518 Views

I opened SR with Altera about it, SR10629791. They closed it saying it wouldn't be an issue in 9.1. Of course, it still is. Have you figured out a way around it yet? I re-opened the SR with Altera.

0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Here's what we do:  

-all of our sopc builder IP is put in an "ip" folder under the root of our project so that SOPC builder finds it w/o issue, all checked in and versioned 

-we commit qsf, qpf, sdc, srf, sopc, ptf and live with re-generating sopc on a clean checkout. In 9.1 most of the megafunctions I've had to deal with use the [file join] tcl syntax making the paths relative to the root of the project 

- we're not using the sysid peripheral, so regen of sopc doesn't matter to us
0 Kudos
Altera_Forum
Honored Contributor II
518 Views

One of the nice features in more recent versions of the software is the ability to create your own component libraries for SoPC Builder and the Nios tools. You create a ".ipx" file. This file can reference components located literally anywhere. Even more, you can make a ".ipx" library file that contains nothing more than a relative reference to another ".ipx" file which contains the actual components. 

 

So, what we do: 

1 - Put our custom components somewhere, doesn't matter where. 

2 - Create a ".ipx" library file for our custom components. This is done using the "ip-make-ipx" program. 

http://www.altera.com/literature/hb/qts/qts_qii54004.pdf 

3 - Create another ".ipx" library file in the same folder where our SoPC Builder system is located. This ".ipx" file does nothing more than reference the first ".ipx" file which actually contains our components. Here is an example: 

<library> <path path="../../../common/components.ipx" /> </library> 

 

SoPC builder will scan its local folder for components and libraries. It will see our little ".ipx" file which will refer it to a common folder, read the "components.ipx" file and see all of our custom components. This works for both hardware and software components. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Jake - this worked for me. Thanks!

0 Kudos
Altera_Forum
Honored Contributor II
518 Views

 

--- Quote Start ---  

 

<library> <path path="../../../common/components.ipx" /> </library> 

Jake 

--- Quote End ---  

 

 

Jake, I registered for this forum just to thank you for the great tip, it was exactly what I was looking for....thanks!
0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Thanks, Jake. I missed your reply until now. Will give it a try tomorrow.

0 Kudos
Altera_Forum
Honored Contributor II
518 Views

It works great. Can't believe I missed that. Thanks again, Jake!

0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Hi Jake, 

 

Is there a way to get Quartus II NOT to automatically add QIP file into file list? Because the QIP doesn't support relative address, I removed all the QIP files from my file list and add those file manually. But every time when I regenerate SOPC system in SOPC builder, it automatically add the QIP files in and remove some files that are in QIP. So every time when I check out the project from the version control server I had to remove the QIP file again and add those missing files back. Any solutions? 

 

Thanks, 

Hua
0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Well I actually don't have that problem. I'll explain why. First two things to note: 

 

1 - Altera Megafunctions will ask you after generation if you want to add the QIP file to your project. At this time there is a check box that you can select so that it does it automatically from that point on. I have never checked this box so I don't know how you undo this action if you have done it. 

2 - SoPC Builder does not follow what I've stated above. By default it automatically adds its QIP file to the project. 

 

Now why don't I have this problem. Many years ago I got tired of Quartus dumping all of its files into my project directory. So all of my projects have a folder hierachy (Quartus files in one place, source files in another, simulation .... you get the point). As such, my SoPC system(s) do not reside in the Quartus project folder and I do not launch them using the SoPC builder button inside Quartus. I launch them from the megawizard plug-in manager. Now, because I launch SoPC builder this way it is unable to determine the Quartus project that it is associated with. Thus during generation when it gets to this little step of adding the QIP file to the project, it gives a harmless error. And thus we successfully circumvent the problem. Then if you so choose, you can add the QIP manually. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
518 Views

Nice, so you are using the IPX file mentioned above to make sure Quartus II and SOPC builders can still find all those files. 

 

Thanks again!
0 Kudos
Reply