cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
11,269 Views
Registered: ‎10-16-2008

System Generator works very slow. Why?

Hi,

 

I have created very simple project. When I try simulate this I see message from system generator

Sysgen status

  Initializing

    delme1/constant

after

    delme1/mult

 

It takes for each component in project about 1 min. That are only two components.

But what happens if the components will be more, I would not like to say.

It's normal?

 

Matlab 2007b (7.5.0.342)

Sysgen 10.1.3

Windows XP, CPU 3GHz, 1Gb of RAM

0 Kudos
33 Replies
Highlighted
Contributor
Contributor
11,219 Views
Registered: ‎04-16-2008

Make sure that you have the correct Simulink System Period and FPGA clock period.

 

Regards,

Salma

0 Kudos
Highlighted
Visitor
Visitor
9,616 Views
Registered: ‎03-02-2010

Has this been resolved or explained?

 

I am seeing similar, unexplained slow implementation times on a fast machine.  I watch the processes running under the task manager and System Generator spends mintues running java and xtclsh barely loading the processor.

 

I have tried multiple machines and seen similar implementation times.

 

 

0 Kudos
Highlighted
Explorer
Explorer
9,606 Views
Registered: ‎09-28-2007

Do you see the initialization messages popping up each time you simulate the design, or only during the first time?

 

Here are a few things to check:

(1) Make sure you have administrative rights in the Windows session

(2) Make sure the environment variable %TEMP% or %TMP% is defined and points to a valid directory. A short path without spaces (e.g. c:\Temp) is recommended

(3) Do you see any file generated in %APPDATA%\Xilinx\Sysgen\cache3?  If you don't see any files here, SysGen may have  failed to cache the simulation files, which can make the initialization process very slow. 

0 Kudos
Highlighted
Visitor
Visitor
9,559 Views
Registered: ‎06-10-2010

I am seeing the same issue, using ISE 12.1 on 64-bit Windows 7 Professional.

I see the "initializing" blocks every time I either simulate or compile the model.

 

I am logged in as a domain user, as a member of the administrators group.

TEMP and TMP are set to:

C:\Users\mfornero\AppData\Local\Temp

 

So no spaces, but maybe not a "short" path (does this matter?)

 

The %APPDATA%\Xilinx\Sysgen\ folder contains only the following:

nt64\cache4\dache.db

And this file does not appear to be changing when I simulate or build a model (new or previously run models).

 

I do see Xilinx files in the %TEMP% directory (with recent modification times after building a model).

 

I did not see this issue under ISE 10.3 or ISE 11.x, but both of these were run under 32-bit Windows XP (SP3). This "slowdown" (or failure to cache) seems to have been introduced by some combination of Windows 7 64-bit and/or ISE 12.1

0 Kudos
Highlighted
Explorer
Explorer
9,551 Views
Registered: ‎09-28-2007

This is a known issue with SysGen 12.1 running on Windows 7. SysGen 12.1 does not support Windows 7 yet.

 

However, there is a workaround that may fix the problem. Try to define the environment variable DSP_CACHE_DIR to point to a different cache directory. e.g. DSP_CACHE_DIR=c:\sysgen_cache

0 Kudos
Highlighted
Visitor
Visitor
9,354 Views
Registered: ‎06-23-2010

I am also seeing slow sysgen performance running in Linux.  I have tried some of the suggestions of setting DSP_CACHE_DIR and deleting xilinx/sysgen cache directories in /tmp, but still getting extrememly slow performance in sysgen simulation (initialization stage).  Below is my version/platform information. 

 

>> xlVersion
Available System Generator installations:
Current version of System Generator is 11.5.2275.
>> ver
-------------------------------------------------------------------------------------
MATLAB Version 7.8.0.347 (R2009a)
MATLAB License Number: 248458
Operating System: Linux 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686
Java VM Version: Java 1.6.0_04-b12 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
-------------------------------------------------------------------------------------

 

 

0 Kudos
Highlighted
Explorer
Explorer
9,315 Views
Registered: ‎08-14-2007

http://www.xilinx.com/support/answers/10910.htm

 

This expains why. Try another simple core(counter) see if it's still slow. If the Matlab uses remote license, it's possible to cause the slow behavior.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
9,266 Views
Registered: ‎08-02-2007

I encounted the same issue in my PC

I disabled envirement varable LM_LICENSE_FILE  by changing it to LM_LICENSE_FILE1 something like that

Sysgen run faster after that

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
9,232 Views
Registered: ‎06-23-2010

Similar to the first post of this thread, the response I am seeing is in the initialization phase of sysgen simulation.  After starting simulation, a pop up box shows:

Sysgen status

  Initializing

    <project name>/<xilinx block>

It takes a long time (say 30sec to a minute to initialize each component in the model).  This happens each time the model is simulated.

 

Playing with it some more, there appeared to be a correlation with the use of WaveScope, perhaps just coincidence.  Sometimes the model simulates very quickly, showing the status in the title bar of the simulink window going from "initializing" to "running" to complete without showing the pop up mentioned above.  Other times, the pop up comes, and its time to get a cup of coffee and check email.

 

0 Kudos
Highlighted
Observer
Observer
8,541 Views
Registered: ‎07-26-2010

I have the same problem with ISE /Sysgen 12.1

 

Everytime I press "Simulate" ,System Generator takes ages with

1. compile..

2.initialize ..(each component)

 

I am using XP 32bit, Matlab 2009b. I don't habe Admin rights on this machine (and can't have them)

 

I just saw that I installed Matlab to the standard path (program files), which includes a space. Everything seems to be working, it is just the initialization procedure eating up lot of time.

Is the space in the matlab path possibly the reason for that?

 

I have tried changing the TEMP pathes and setting a sysgen cache path (as stated above) but nothing changed the situation!

 

Cheers

Alex

0 Kudos
Highlighted
Observer
Observer
8,533 Views
Registered: ‎07-26-2010

Ok, I installed Matlab a second time and told System Generator to use the one with no spaces in the path (C:\MATLAB)

 

but it still initializes each core every single time..

 

Any more ideas?

0 Kudos
Highlighted
Explorer
Explorer
8,530 Views
Registered: ‎09-28-2007

Try setting the environment variable DSP_CACHE_DIR to c:\Temp and see if that helps.

 

0 Kudos
Highlighted
Observer
Observer
8,526 Views
Registered: ‎07-26-2010

No that did not help either.

It is still Initializing every time.


Any more ideas?

0 Kudos
Highlighted
Visitor
Visitor
8,520 Views
Registered: ‎09-19-2008

Make sure your simulation is set on variable step size and ode45 solver. Unlike what simulink suggests with dspstartup.m . Sysgen only supports variable step size and ode45 and trying to simulate anything else would cause the simulation to run slower .  Hope this helps.

0 Kudos
Highlighted
Explorer
Explorer
8,520 Views
Registered: ‎09-28-2007

Hi sirt,

 

Could you try the following?

 

  1. First unset DSP_CACHE_DIR as suggested in the previous post if you have set it.
  2. In MATLAB console, run the following commands (in BLUE color) and see what's reported:

>> which('dccli.exe')

c:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\dccli.exe


>> system('dccli -s')

Current number of entries: 0 
Current usage in MB: 455.00 
Hits/Misses: 29160/7232 (80.1% hit ratio) 
Current number of entries: 1200
Current usage in MB: 455.00
Hits/Misses: 29160/7232 (80.1% hit ratio) 


 

>> xlCache('getdiskcacheentries')

Current number of entries: 0 
Current usage in MB: 455.00 
Hits/Misses: 29160/7232 (80.1% hit ratio) 
20000

>> xlCache('getdiskcachesize')

Current number of entries: 0 
Current usage in MB: 455.00 
Hits/Misses: 29160/7232 (80.1% hit ratio) 
500

 

 

0 Kudos
Highlighted
Observer
Observer
8,493 Views
Registered: ‎07-26-2010

I double checked, and I am using ode45 and variable-steps.

 

I got the same results as output for your commands, both with the DSP_CACHE variable set and then deleted.

 

 

This is what I get:

 

 

>>which('dccli.exe')
C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\dccli.exe
>>  system('dccli -s')
Current number of entries: 0
Current usage in KB: 0
Hits/Misses: 0/9374 (0.0% hit ratio)

ans =

     0

>> xlCache('getdiskcacheentries')

ans =

       20000

>>  xlCache('getdiskcachesize')

ans =

   500

0 Kudos
Highlighted
Observer
Observer
8,457 Views
Registered: ‎07-26-2010

Ok, what does this mean now? How can I get SysGen to actually write the compile files and then find it again?

Cheers

0 Kudos
Highlighted
Explorer
Explorer
8,436 Views
Registered: ‎09-28-2007

It seems like the compiled files were not cached. That's why the initialization repeats every time the design is simulated.

 

You can first run this command in MATLAB to determine where the cache directories are:

[core, sg, tmp] = xlCache('gethpath')

 

Then change the Windows file permission on those directories so that they are writable by your account. After that simulate the same design twice and see if the compilation is skipped the second time.

 

If changing the permission does not fix the problem, remove those directories, then restart SysGen and try again.

0 Kudos
Highlighted
Observer
Observer
8,431 Views
Registered: ‎07-26-2010

>> [core, sg, tmp] = xlCache('gethpath')

returns all the options of xlCache

and then:

Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache at 50

??? Output argument "varargout" (and maybe others) not assigned during call to
"C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache".

 

 

When I run

>>  xlCache('clearall')
??? Java exception occurred:
java.lang.UnsatisfiedLinkError:
com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath()Ljava/lang/String;
    at com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath(Native Method)
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>cacheroot at 138
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>coredir at 142
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>clearcore at 102
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache at 71

 

For

>>XLCACHE('cleartargetcache')

it does not return an error, where for the other two single clear cache commands it does:

 

>> XLCACHE('cleardiskcache')
??? Java exception occurred:
java.lang.UnsatisfiedLinkError:
com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath()Ljava/lang/String;

    at com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath(Native Method)
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>cacheroot at 138
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>sgcachedir at 160
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>clearsg at 111
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache at 69


>> XLCACHE('clearcorecache')

??? Java exception occurred:
java.lang.UnsatisfiedLinkError:
com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath()Ljava/lang/String;
    at com.xilinx.sysgen.util.EnvironmentUtil.getCacheRootPath(Native Method)
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>cacheroot at 138
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>coredir at 142
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>clearcore at 102
Error in ==> C:\Xilinx\12.1\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache at 67

 

 

How can I open this xlCache.p in a way where I can see anything usefull or even make changes?


How do I fix the problem that it obviously did not set any cache directories (or we messed with this setting by setting the environment variable?)

0 Kudos
Highlighted
Observer
Observer
8,382 Views
Registered: ‎07-26-2010

Just to mention: I've installed ISE 11.5 after installing the 12.1

 

The main reason for this was the slow initialization process of 12.1's SysGen

 

-> so the initial problem of a slow system generator was not caused by the installation of two versions, but maybe some of the problems occuring now (with the not working xlCache.p) are caused by this.

0 Kudos
Highlighted
Explorer
Explorer
8,373 Views
Registered: ‎09-28-2007

That seems to be an installation issue.

Could you uninstall SysGen 11.5 and 12.1, and then reinstall SysGen 12.1?  

0 Kudos
Highlighted
Observer
Observer
8,370 Views
Registered: ‎07-26-2010

I will do that tomorrow, I am running some simulations over night now.

 

Can I install SysGen independentely from the rest of the ISE package?

 

After reinstalling, I should check out into which folder the cache files are written, and then get write-permissions for this! Is this correct?


Thank you for your help already

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,364 Views
Registered: ‎08-01-2007

The slow down in System Generator for DSP 12.1 has been noted, and you should see improvements in 12.2.


We are continuing to monitor this and work to improve the speed.  If you have a model that demonstratest the slow down from from 10 or 11 and it is still slower in 12.2, please open a case with the Xilinx Technical Support, so that we can investigate the cause and improve the speed in a future version of System Generator for DSP.

Chris
Versal ACAP: AI Engines | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
8,317 Views
Registered: ‎07-26-2010

The problem is not the slow down of simulation itself! It is the initializatio, which happens to run every single time we want to simulate (so haveing trouble with caching the previously compiled blocks -or reading the written cache - in my case it looks like it is not capable of writing)

 

 

I do have full Admin rights now, deinstalled SysGen 11, deinstalled the whole ISE12.1 and installed 12.2

 

->I still have the same problem! It initializes every single time!

 

>>   system('dccli -s')
Current number of entries: 0
Current usage in KB: 0
Hits/Misses: 0/7814 (0.0% hit ratio)

 

>>[core, sg, tmp] = xlCache('gethpath')

Error in ==> C:\Xilinx\12.2\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache at 53

??? Output argument "varargout" (and maybe others) not assigned
during call to
"C:\Xilinx\12.2\ISE_DS\ISE\sysgen\bin\nt\xlCache.p>xlCache".

0 Kudos
Highlighted
Observer
Observer
8,316 Views
Registered: ‎07-26-2010

Additionally, I get the error

...

Writing NGCBUILD log file "../rs232_wrapper.blc"...

NGCBUILD done.

Rebuilding cache ...
ERROR:EDK:440 - platgen failed with errors!

 

when I am running generation in the XPS tool! This looks just like the same problem!?

0 Kudos
Highlighted
Observer
Observer
8,304 Views
Registered: ‎07-26-2010

I have uninstalled all versions from Xilinx, uninstalled the R2008 of Matlab and only installed ISE12.2

 

So now I only have matlab 2009b, ISE 12.2 and no environment variable "DSP_cache" set!

 

 

-> still is no caching(i.e. init at every sim start) and the same funny error msgs when I try to use  [core, sg, tmp] = xlCache('gethpath')

 

Is there any way to get this stuff working, or do I actually need to go back to version 11 (which would be a shame)?

0 Kudos
Highlighted
Observer
Observer
8,271 Views
Registered: ‎07-26-2010

Any more ideas, benchan?

0 Kudos
Highlighted
Explorer
Explorer
8,255 Views
Registered: ‎09-28-2007

sirt,

 

Do you still have problem running the following command to determine the cache directories?

 

[core, sg, tmp] = xlCache('getpath')

 

If you run which('xlCache'), which location does MATLAB report?

 

Once you determine the cache directories, you can check the Windows file permission on them.

 

If nothing helps, you can try xlCache('clearall') to wipe out the cache and have a clean start.

0 Kudos
Highlighted
Observer
Observer
8,218 Views
Registered: ‎07-26-2010

>> [core, sg, tmp] = xlCache('getpath')
core =
C:\Documents and Settings\alexander ruppel\Application Data\Xilinx\Sysgen\sg_core_cache


sg =
C:\Documents and Settings\alexander ruppel\Application Data\Xilinx\Sysgen\nt\cache5

tmp =
C:/Temp/sysgentmp-Alexander Ruppel

 

>> which('xlCache')
C:\Xilinx\12.2\ISE_DS\ISE\sysgen\bin\nt\xlCache.p

 

 

So what I did is:

I unchecked the "Read only"option for the folders

  • C:\Xilinx
  • C:\Temp
  • C:\Documents and Settings\alexander ruppel\Application Data\Xilinx\

After doing this, I had a look at it and the option was set again automatically.

 

So now I chose the "Security" tab in the folder properties, and I chose "Full Control" for all possible users.

(see screenshot).

 

Is this the procedure you mean by "setting write permissions"?

 

Cheers

 

 

File_permission_screenshot.jpg
0 Kudos