• 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. Coverage Item

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 13071
  • 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

Coverage Item

Manish Verma
Manish Verma over 16 years ago

Hi,

I am facing one problem while writing the coverage item.
I have something like this:
These are the fields which I have to cover:
extend R test_unit {

    field_R: type1; --- two subtypes R0 and R1

    when R0 R test_unit {

        field_R0_1: uint;
        field_R0_2: bool;

    };

    when R1 R test_unit {

        field_R1_1: uint;
        field_R1_2: bool;

    };
};

I have one event transaction_end_e in monitor, where I need to collect the coverage item.

My coverage file look like this:

    cover transaction_end_e is {

        item field_R: type1 = tr.field_R;

    };

    cover transaction_end_e using also when = (tr.field_R==R0) is also {

        item field_R0_1: uint = tr.as_a(R0 R test_unit).field_R0_1;
        item field_R0_2: bool = tr.as_a(R0 R test_unit).field_R0_2;

    };

    cover transaction_end_e using also when = (tr.field_R==R1) is also {

        item field_R1_1: uint = tr.as_a(R1 R test_unit).field_R1_1;
        item field_R1_2: bool = tr.as_a(R1 R test_unit).field_R1_2;

    };

};


Here, I am getting error as
 Error: struct is NULL - cannot access field 'R0'R'R'field_R0_1

What I think is that whenever the value of field_R is R1 then it is giving problem with R0 item and vice-versa.

Can anybody help me in finding the solution?

Thanks!

  • Cancel
  • Hilmar
    Hilmar over 16 years ago

    Hi Manish,

     

    I'd extend the specific subtypes of your test_unit with coverage groups, something like this:

     

    extend R0 test_unit {

        cover transaction_end_e is also {
            item field_R0_1: uint = tr.as_a(R0 R test_unit).field_R0_1;
            item field_R0_2: bool = tr.as_a(R0 R test_unit).field_R0_2;
        };
    };

     

    And then something similar for the R1 subtype. 

     

    Is there a specific reason for not collecting coverage in the same units?

     

    Cheers,

    Hilmar

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Manish Verma
    Manish Verma over 16 years ago

    Hi Hilmar ,

     

    Actually test_unit is transaction unit and I cannot access the monitor event(transaction_end_e) in this unit. I need to write coverage item in Monitor unit, not by extending the transaction unit.

     

    Thanks!

    Manish  

    • 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