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

problem of large design with Qsys

Altera_Forum
Honored Contributor II
1,997 Views

Hi all, 

 

I'm designing a network of processor (Nios II) with Qsys 11.1. 

There are 32 niosII in my design and I use the ip-generate command-line. 

 

The issue is Qsys can't generate the sopcinfo file: 

 

--- Quote Start ---  

Info: system: Done system" with 98 modules, 4296 files, 88115683 bytes 

Error: Error writing sopcinfo report java.lang.OutOfMemoryError: Java heap space 

Info: ip-generate succeeded. 

Info: Finished: Create HDL design files for synthesis 

--- Quote End ---  

Anyone has idea? Thanks! 

 

ps: I tried to close and reopen Qsys
0 Kudos
16 Replies
Altera_Forum
Honored Contributor II
1,211 Views

Try to configure your JVM with more memory

0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Thank you Aprado for this quick responce. 

 

But I'm not very confortable with Java. 

Could you tell me where and how configure my JVM correctly? 

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Google "configure jvm more memory" 

It's pretty straight forward
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

ok I tried to find a solution to configure the JVM. 

 

the switch to expand java heap size memory is -Xmx2048m where 2048 is the size of maximum heap memory I want to allocate. 

 

The issue is where can I use this switch? 

In some examples I saw this switch is used like a parameter of the application. 

 

The application that I want to expand heap size memory is ip-generate. 

So I tried with a command-line like that: 

ip-generate -Xmx2048m --project-directory=D:/myproject --output-directory=D:/myproject/synthesis/ --file-set=QUARTUS_SYNTH --report-file=sopcinfo:D:/myproject/system.sopcinfo --report-file=qip:D:/myproject/synthesis/system.qip --system-info=DEVICE_FAMILY="Stratix IV" --component-file=D:/myproject/system.qsysBut it makes an error: 

 

--- Quote Start ---  

Error: Unrecognized switch Xmx2048m 

--- Quote End ---  

I forgot to specity that I'm working on windowsXP-64bit and so I use NiosII 11.1 command shell to launch this command-line. 

 

Thanks for your responce.
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

I'd guess ip-generate is some kind of wrapper ?? 

You need to find the incantation that acually runs the jvm itself. 

If you type at the shell prompt: 

$ type ip-generate 

the shell should tell what it executes when you run ip-generate.
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Hi Dsl, 

 

ip-generate is the application used by Qsys (new version of SopcBuilder) to generate vhdl or verilog files from a qsys project. ip-generate can optionnaly create the sopcinfo file used by NiosIISBT to create the NiosII application. 

 

 

The ip-generate command-line call an executable file so I can't see what it's done inside. 

 

When I type in the Shell: 

 

--- Quote Start ---  

$ type ip-generate 

--- Quote End ---  

I just have the path of the executable called: 

 

--- Quote Start ---  

ip-generate is /cygdrive/c/altera/11.1/quartus/sopc_builder/bin/ip-generate 

--- Quote End ---  

Do you know an other way to to find the incantation ? 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Long shot but maybe an enviorment variable _JAVA_OPTIONS="-Xmx2048m" will work. If it doesn't remember I said long shot :)

0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

On a unix system you could arrange to make a shell script be run instead of the jvm (either by putting it earlier in $PATH, or renaming the real jvm) containing: 

# !/bin/sh 

real_jvm -Xmx2048m "$@" 

 

but I suspect that won't work on cygwin - does depend on exactly how the binary (which is probably using the cygwin library) actually starts the jvm.
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

I have good and bad news!! 

 

the good one: 

I fund how to configure the jvm. 

 

Te bad one: 

you have to patch ip-generate.exe 

 

open ip-generate.exe in a text editor 

This file is in:  

--- Quote Start ---  

QUARTUS_ROOT_DIR/quartus/sopc_builder/bin 

--- Quote End ---  

Research -Xmx500m 

replace by -Xmx1024m  

and delete a "NULL" juste after 

 

Thanks for your help
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Hmmm.... if they are hard-coding the parameter into the generated command line, then attempts to set the default using environment vars will fail. 

Probably better to set to -Xmx999m to avoid changing the length of the string. 

Might even work if you replace that parameter with spaces and set the jvm's default from the environment.
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

I pinged someone about this and they believe what is passed by ip-generate will overwrite the global setting. So if the global doesn't work I think hacking the .exe will be your only option (for now, it's being looked into)

0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

Do you think modifing the ip-generate.exe could change NiosII rights of the license ?

0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

I'm not really sure. I think the lawyers have better things to do than pursuing someone who hacks a fix into an .exe file though :)

0 Kudos
Altera_Forum
Honored Contributor II
1,210 Views

Hello - has anyone come up with a better solution to this then hacking the executable? 

 

I am running the Quarts 11.1sp2 tools under Linux and am getting the same JVM error as reported earlier: 

 

( Error: Error writing sopcinfo report java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space) 

 

 

Thanks 

Kevin.
0 Kudos
Altera_Forum
Honored Contributor II
1,211 Views

As an update, this is listed as an SPR (spr362079). I have seen that a large QSYS system gets the OutOfMemory error from the JVM in using either ip-generate or the GUI. Paring the system back by some number of components resolves the error but not the problem.  

 

I am hoping that Quartus 12 will solve the problem. 

 

Kevin.
0 Kudos
Altera_Forum
Honored Contributor II
1,210 Views

FYI, ip-generate (I guess that it was changed in newer versions) in Quartus 13 has a --jvm-max-heap-size=<value> parameter

0 Kudos
Reply