Home
  • Products
  • Solutions
  • Support
  • Company
  • Products
  • Solutions
  • Support
  • Company
Community Forums Functional Verification Shared Code Creating cover items for sparse values/queue or define in...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 43
  • Views 5977
  • 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

Creating cover items for sparse values/queue or define in specman

rgarcia071
rgarcia071 over 3 years ago

Hello,

I have a question I want to create a cover that consists a sparse values, pre-computed (a list or define) for example l = {1; 4; 7; 9; 2048; 700} I'd like to cover that data a (uint(bits:16)) had those values, Any suggestion on how to achieve this, I'd prefer to stay away from macros, and avoid to write a lot of code

struct inst {

  data :uint(bits:16);
  opcode :uint(bits:16);
  !valid_data : list of uint(bits:16) = {0; 12; 10; 700; 890; 293;};
  event data_e;
  event opcode_e;

  cover data_e is {
     item data using radix = HEX, ranges = {
     //I dont want to write all of this
     range([0], "My range1");
     range([10], "My range2");
     //... many values in between
    range([700], "My rangen");
    };


    item opcode;


   cross data, opcode;
};

post_generate() is also {
    emit data_e;
};
};

  • Cancel
  • Tudor Timi
    Tudor Timi over 3 years ago

    The ranges you pass to the ranges option have to by listed manually. There's no way of passing a list of range or something like that. Also note that the values used in the range have to either be literals or global scope variables that are set by the end of the setup phase.

    The only way I can see at the moment is to use a define as computed macro.

    • Cancel
    • Up +1 Down
    • Cancel
  • rgarcia071
    rgarcia071 over 3 years ago in reply to Tudor Timi

    Thank you very much Tudor, i was expecting specman to have something similar to 1800-2012 SV to define buckets using a list, I'll give it a try to the computed macro

    • Cancel
    • Up 0 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.

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

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