• 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. Concatenating enumerated types in coverpoint

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 15784
  • 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

Concatenating enumerated types in coverpoint

RajeshCM
RajeshCM over 13 years ago

Hi,

I will explain my query with an example. 

AddrHigh is a 16-bit address which is enumerated as NORMAL, DEVICE etc.. AddrLow is also a 16-bit address which is enumerated as TIMER, UART etc..

 I want to concatenate AddrLow and AddrHigh, and declare bins like below. I don't want to specify binary values instead I want specify bins using enumerated names. Is it possible? If yes, what is the syntax?

 a: coverpoint {AddHigh, AddrLow} {

       //bins

   } 

 

  • Cancel
  • tpylant
    tpylant over 12 years ago
    Yes, you can do this. Your syntax was correct:

    covergroup ….

      A : coverpoint {AddrHigh, AddrLow} {

        bins HI[: {NORMAL, DEVICE, …};

        bins LO[: {TIMER, UART, …};

      }

    endgroup


     

    Tim
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 12 years ago
    My text got screwed up below. Let me try again:

    covergroup ….

      A : coverpoint {AddrHigh, AddrLow} {

        bins HI[ = {NORMAL, DEVICE, …};

        bins LO[ = {TIMER, UART, …};

      }

    endgroup


     
    Tim
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RajeshCM
    RajeshCM over 12 years ago

     We use comma separated values with in curly braces if we want to assign more than one value to a bin. For example,

           bin Index = {0x0, 0x1, 0x2};

     But my requirement is to concatenate enumerated types. The syntax you specified appears to be same as above except for a "[" after the bin name. So square bracket syntax differentiates between the two?

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 12 years ago
    The square brackets (which refused  to cooperate) are optional. They are for "vector" bins which keep track of each value in the bin individually. Your example worked with either syntax.

    Tim
    • 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