Home > Community > Forums > Functional Verification > Concatenating enumerated types in coverpoint

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Concatenating enumerated types in coverpoint 

Last post Mon, Sep 17 2012 9:29 AM by tpylant. 4 replies.
Started by RajeshCM 16 Sep 2012 01:07 PM. Topic has 4 replies and 1057 views
Page 1 of 1 (5 items)
Sort Posts:
  • Sun, Sep 16 2012 1:07 PM

    • RajeshCM
    • Not Ranked
    • Joined on Mon, Aug 20 2012
    • Posts 3
    • Points 60
    Concatenating enumerated types in coverpoint Reply

    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

       } 

     

    • Post Points: 20
  • Mon, Sep 17 2012 7:48 AM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    RE: Concatenating enumerated types in coverpoint Reply
    Yes, you can do this. Your syntax was correct:

    covergroup ….

      A : coverpoint {AddrHigh, AddrLow} {

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

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

      }

    endgroup


     

    Tim
    • Post Points: 5
  • Mon, Sep 17 2012 9:11 AM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    RE: Concatenating enumerated types in coverpoint Reply
    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
    • Post Points: 20
  • Mon, Sep 17 2012 9:20 AM

    • RajeshCM
    • Not Ranked
    • Joined on Mon, Aug 20 2012
    • Posts 3
    • Points 60
    Re: RE: Concatenating enumerated types in coverpoint Reply

     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?

     

    • Post Points: 20
  • Mon, Sep 17 2012 9:29 AM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    Re: RE: Concatenating enumerated types in coverpoint Reply
    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
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by RajeshCM at 16 Sep 2012 01:07 PM. Topic has 4 replies.