Thursday, January 08, 2009     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: NULL pointer dereference
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
jaally
Posts: 32
Online: User is Offline
3/27/2008 11:17 PM  
Hello Friends,

     I'm building a class based SV UVC using URM methodology. As usual, I've master agent & slave agent with independent monitors in it.
   Now, in my master bfm I've used build operation and casted a new unit(say "X") inside it which is needed for my protocol. So, i've binded my monitor to this unit also as shown below:

class master_bfm extends urm_bfm;
   master_monitor mon_ref;
  
  `urm_unit_utils_begin(master_bfm)
       `urm_field_object(mon_ref, REFERENCE + PRINT)
  `urm_unit_utils_end


  function new(input string name, input urm_unit parent);
       super.new(name,parent);
  endfunction: new

  virtual function build();
     super.build();
     $cast(X, create_unit("X_unit", X));
     X.build();

     X.mon = mon_ref; // Here I'm binding the monitor in X_unit to the monitor in master_bfm
  endfunction: build

 ........my code..................

endclass: master_bfm
 


If you observe the code, I've created a "mon" reference in the X_unit with same master_monitor unit.
 And I tried accessing the variables of monitor like "reset_asserted" in X_unit. It gives "NULL pointer dereference" during the "ncsim" run. I tried all ways of connecting it properly through references but could not succeed. In fact, I could access those monitor variables inside the master_bfm but not in X_unit.

Can anyone lemme know the solution of it or where I went wrong?

Thanks in advance,
Jalli
prasad_vc
Posts: 12
Online: User is Offline
3/27/2008 11:28 PM  
Jalli,

Try doing new() of mon_ref in your bfm code. This should solve your problem.

function new(input string name, input urm_unit parent);
super.new(name,parent);
mon_ref = new;
endfunction: new

-Vivek

-Vivek C. Prasad
jaally
Posts: 32
Online: User is Offline
3/27/2008 11:53 PM  
Vivek,

Your suggestion didn't help! :(


CORRECTION in my above code
`urm_unit_utils_begin(master_bfm)
`urm_field_object(X, REFERENCE + PRINT) // This was missing in my above code
`urm_field_object(mon_ref, REFERENCE + PRINT)
`urm_unit_utils_end

Regards,
Jalli
arjuny
Posts: 7
Online: User is Offline
3/28/2008 12:03 AM  
Hi Vivek,

Continuing your post,
If "new" is used an object of monitor will be created in bfm.(as per methodology the monitor will not have object created in the bfm, monitor reference should be there in bfm).

-Arjun.
prasad_vc
Posts: 12
Online: User is Offline
3/28/2008 12:33 AM  
Arjun,

What you say is correct, i haven't used any methodologies with SV, however i knew one thing that you get an "Null pointer Deference" when a "new" of your object or variable is not done.

I don't knew exactly where it will be done, as per the uRM.

-Vivek.

-Vivek C. Prasad
Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > SystemVerilog > NULL pointer dereference


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.