Q. There is a ts packet class. In it there is a field named bit [8:0] ts1_identifier which is basically to show that it is TS1 identifier(whose value is 4a). In TS1 ordered set there are 16 symbols: symbol 6 to symbol 15 is TS1 identifier. So i need to cover symbol6 to symbol15 in functional coverage. So, my idea to write is like this:
covergroup ts1_ordered_set_cg;
ts1_symbol_6_cp : ts1.ts1_identifier
{
bins symbol_6 = {`TS1_ID}; //TS1_ID is defined in define file as 4a
}
ts1_symbol_7_cp : ts1.ts1_identifier
{
bins symbol_7 = {`TS1_ID};
}
.
.
.
.
.
likewise uptill ts1_symbol 15.
_ So, am i going correct?
In reply to tech_savvy:
Or should i declare bit [8:0] identifier_symbol_6, bit[8:] identifier_symbol_7 uptill 15 in my TS1 class and then i should write coverpoint like this respectively:
ts1_symbol_6_cp : ts1.identifier_symbol_6
{
bins symbol_6 = {`TS1_ID}; //TS1_ID is defined in define file as 4a
}
ts1_symbol_7_cp : ts1.identifier_7
{
bins symbol_7 = {`TS1_ID};
}
- Please give some solution.
In reply to tech_savvy:
It would help if you
What is this supposed to mean?
here are 16 symbols: symbol 6 to symbol 15 is TS1 identifier.
In your first example, all the coverpoints are identical.
In reply to dave_59:
Then how should cover each symbol… I means symbol 6 to symbol 15.
In reply to tech_savvy:
I have no idea what you mean by a “symbol” other than you have used it as a name of a bin. And where do you get 16 names from 6 to 15? That is 13 names. And the way you have coded ts1_symbol_6_cp and ts1_symbol_7_cp, they are identical.
In reply to dave_59:
A TS1 ordered set has 16 symbols. symbol 0 to symbol 5 are different but symbol 6 to symbol 15 all have same values (4a known as TS1 idenetifier). So should I write coverpoints of all symbols (symbol6 to symbol 15)?