Friday, November 21, 2008     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: ncsim out-of-memory when enabling code coverage
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
nko
Posts: 4
Online: User is Offline
11/28/2006 11:34 AM  
Hi everybody,
this is my first post in the forum and I hope I'm writing in the right section.

My group is using a specman-based verification environment to test a small system composed of 2 IPs. Additionally, we use nc-coverage to collect data on block, expression and FSM coverage.

At this moment our most intensive runs are based on three different tests, each executed 80 times with a random seed. This scenario will be further complicated in the near future.

Multiple test runs are controlled with the ncsim Tcl shell, using some custom procedures. Note that only one instance of the simulator is run. Basically, at each iteration, we perform the following tasks:

foreach test $test_list {
- specman: load a specific test
LOOP on test runs
- ncsim: reset the simulator
- specman: reload environment
- specman: test -seed=random
- ncsim: setup coverage:
    * coverage -setup -dut :
        * coverage -setup -testname [format "%s_run%s" $test_name $tag]
        * coverage -setup -workdir [file join $outdir nc_cov_data]
        * coverage -code
        * coverage -fsm
- ncsim: run
- ncsim: dump coverage data
    * coverage -code -dump
    * coverage -fsm -dump
- update counters for next iteration
END LOOP
} # close loop on tests

Simulations run fine if code coverage is disabled (not instrumented during elaboration), but goes out of memory when enabling code coverage. Memory reduction can also be achieved by reducing the sample rate of code coverage (i.e. every 10 test runs, instead of all test runs)

In my understanding, all simulation runs are independent and simulator should flush data between each reset/reload. However, it seems that memory occupation increases after each test run until the max_size limit is reached.

I think that a possible solution could be moving the loop from the simulator shell to an external system shell, in this way each test run would require starting and shutting down ncsim. This would also require re-arranging our script system, which is something I'd like to avoid as we're planning to move to Enterprise Manager in january.

Any suggestion for a fast-fix?

I'm using IUS5.5 and Specman 5.0.3 eVCs are compiled in a shared library and linked to ncsim_specman with the SPECMAN_DLIB variable. IPs are developed in VHDL.

Thank you very much,
nico

Administrator
Posts: 157
Online: User is Offline
11/28/2006 12:40 PM  
nko,

I am moving this thread to the Functional Verification forum, "e" where the Specman experts hang out.

Administrator
douge
Posts: 13
Online: User is Offline
11/28/2006 1:17 PM  
I have seen something similar when instrumenting FSM's in older versions of IUS. Can you omit coverage -fsm and see what happens to your memory blow out?
krish.p@samsung.com
Posts: 1
Online: User is Offline
11/28/2006 8:08 PM  
Hi Niko,

The reason why NCSIM runs out of memory is because you have enabled FSM coverage in the run. You can do two things to compensate on this

1. Disable FSM coverage. Run the complete regression. Analyse the block, expression and functional coverage numbers at the end of the run. If the numbers are satisfactory then you can sign off your verification just with that.

2. If you still need state coverage. You can try modelling the states in e and try doing a transition coverage on the states in e. That should give you a good estimate of the state space covered
nko
Posts: 4
Online: User is Offline
11/29/2006 7:37 AM  
Hi guys, thank you very much for the suggestion.

Unfortunately it seems that my memory blow-out is not related to FSM coverage, as disabling it does not remove the problem.

I've tried various combination of code coverage and it seems that problems are related to expression coverage:
- fsm only: OK
- block only: OK
- expression only: fail
- expr+block: fail
- block + fsm: OK

I will try to collect data only on one IP at a time.
Any other idea is welcome.
Thank you again for your help.

nico
nko
Posts: 4
Online: User is Offline
12/01/2006 2:36 AM  
Hi guys.
I found the cause all of my troubles! One of the eVC instantiated in the environment was extending setup() in the following way:

setup() is also {
set_config(memory, gc_threshold, 300M);
set_config(memory, gc_increment, 50M);
set_config(memory,max_size,1000M);
set_config(memory,absolute_max_size,1100M);
}

It seems that garbage collection threshold and increment were too high.
Do you think this is a reasonable explanation of my problem?
I didn't notice this settings until I had to modify the eVC configuration for other reasons. I was pretty sure specman was running with default memory settings.

Lesson learned :-)

Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > e > ncsim out-of-memory when enabling code coverage


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.