• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Hierarchial Access of Class Objects

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 64
  • Views 13283
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hierarchial Access of Class Objects

archive
archive over 18 years ago

Hi all,
I am trying to access the method in my class hierachially. But the tool is reporting that hierarchial access to dynamic objects is not supported. I am using LDV5.8. Which version of the LDV supports SV properly. Does I need to have any special licence to upgrade from one version to other.
Thanks,
Sreenivas


Originally posted in cdnusers.org by vaas_m
  • Cancel
  • archive
    archive over 18 years ago

    Hi Sreenivas

    Which exact version of IUS are you using (paste the results of "ncsim -version")?
    I tried the following example in IUS 5.83s9 and in IUS 6.11s3 and it works fine.
    If this example isn't close enough to what you're trying, please can you paste a better description of the problem?


    module tb; class a_c; rand int a; task print; $display("%m : a_c.a == %d", a); endtask endclass class b_c; rand a_c a_i; task print; if (a_i != null) a_i.print(); else $display("Cannot print a_i - it is null"); endtask endclass class c_c; rand b_c b_i; task print; if (b_i != null) b_i.print(); else $display("Cannot print b_i - it is null"); endtask endclass c_c c_i = new; initial begin c_i.b_i = new(); c_i.b_i.a_i = new(); c_i.print(); c_i.b_i.a_i.print(); end endmodule


    Originally posted in cdnusers.org by stephenh
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Hi Steve,
    I am using LDV 5.83-p003. I have a verilog module in which my classes are defined. When I am trying to call the methods of my the classes I am getting an error. (Ex: tb.U_model.class_obj.task_name )


    Originally posted in cdnusers.org by vaas_m
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Posted By vaas_m on 9/03/2007 3:06 AM
    Hi Steve,
    I am using LDV 5.83-p003. I have a verilog module in which my classes are defined. When I am trying to call the methods of my the classes I am getting an error. (Ex: tb.U_model.class_obj.task_name )

    Srinivas,
       My guess is that you have not constructed the class object before calling the task. Can you take Steve's example code and modify as per your need and see if you can reproduce the problem? As far as I see it should work - provided the class objects are new'ed before calling tasks.

    Cheers
    Ajeetha, CVC
    www.noveldv.com


    Originally posted in cdnusers.org by ajeetha
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information