'bins' Filtering

SystemVerilog Assertions and Functional Coverage From Scratch SystemVerilog Functional Coverage Language Features
16 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$39.95
List Price:  $149.95
You save:  $110
₹1,480
List Price:  ₹9,995
You save:  ₹8,515
€37.87
List Price:  €142.15
You save:  €104.28
£31.55
List Price:  £118.43
You save:  £86.87
CA$55.89
List Price:  CA$209.78
You save:  CA$153.89
A$61.42
List Price:  A$230.55
You save:  A$169.12
S$53.66
List Price:  S$201.43
You save:  S$147.76
HK$310.94
List Price:  HK$1,167.12
You save:  HK$856.17
CHF 35.38
List Price:  CHF 132.82
You save:  CHF 97.44
NOK kr441.52
List Price:  NOK kr1,657.24
You save:  NOK kr1,215.71
DKK kr282.47
List Price:  DKK kr1,060.24
You save:  DKK kr777.77
NZ$67.94
List Price:  NZ$255.04
You save:  NZ$187.09
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.02
৳4,757.02
List Price:  ৳17,855.20
You save:  ৳13,098.18
RM178.63
List Price:  RM670.50
You save:  RM491.86
₦66,908.65
List Price:  ₦251,137.75
You save:  ₦184,229.10
₨11,062.35
List Price:  ₨41,521.90
You save:  ₨30,459.55
฿1,386.54
List Price:  ฿5,204.31
You save:  ฿3,817.77
₺1,376.80
List Price:  ₺5,167.77
You save:  ₺3,790.96
B$231.20
List Price:  B$867.82
You save:  B$636.61
R723.37
List Price:  R2,715.16
You save:  R1,991.78
Лв74.05
List Price:  Лв277.95
You save:  Лв203.90
₩55,812.30
List Price:  ₩209,488.24
You save:  ₩153,675.93
₪149.29
List Price:  ₪560.37
You save:  ₪411.07
₱2,357.82
List Price:  ₱8,849.97
You save:  ₱6,492.14
¥6,222.78
List Price:  ¥23,356.84
You save:  ¥17,134.06
MX$807.25
List Price:  MX$3,029.98
You save:  MX$2,222.73
QR145.17
List Price:  QR544.90
You save:  QR399.73
P541.58
List Price:  P2,032.82
You save:  P1,491.23
KSh5,173.52
List Price:  KSh19,418.52
You save:  KSh14,245
E£1,985.51
List Price:  E£7,452.51
You save:  E£5,467
ብር4,899.40
List Price:  ብር18,389.63
You save:  ብር13,490.22
Kz36,460.79
List Price:  Kz136,853.46
You save:  Kz100,392.67
CLP$38,803.03
List Price:  CLP$145,644.93
You save:  CLP$106,841.90
CN¥289.50
List Price:  CN¥1,086.62
You save:  CN¥797.12
RD$2,397.37
List Price:  RD$8,998.41
You save:  RD$6,601.03
DA5,330.55
List Price:  DA20,007.92
You save:  DA14,677.37
FJ$90.71
List Price:  FJ$340.49
You save:  FJ$249.77
Q307.31
List Price:  Q1,153.47
You save:  Q846.16
GY$8,324.22
List Price:  GY$31,244.48
You save:  GY$22,920.25
ISK kr5,502.71
List Price:  ISK kr20,654.11
You save:  ISK kr15,151.40
DH397.72
List Price:  DH1,492.82
You save:  DH1,095.10
L727.09
List Price:  L2,729.10
You save:  L2,002.01
ден2,327.48
List Price:  ден8,736.06
You save:  ден6,408.58
MOP$319.12
List Price:  MOP$1,197.83
You save:  MOP$878.70
N$719.71
List Price:  N$2,701.40
You save:  N$1,981.69
C$1,464.95
List Price:  C$5,498.63
You save:  C$4,033.67
रु5,378.70
List Price:  रु20,188.64
You save:  रु14,809.94
S/151.06
List Price:  S/567.01
You save:  S/415.95
K160.17
List Price:  K601.21
You save:  K441.03
SAR149.98
List Price:  SAR562.94
You save:  SAR412.96
ZK1,099.68
List Price:  ZK4,127.58
You save:  ZK3,027.90
L188.46
List Price:  L707.37
You save:  L518.91
Kč957.21
List Price:  Kč3,592.84
You save:  Kč2,635.63
Ft15,518.42
List Price:  Ft58,247.49
You save:  Ft42,729.07
SEK kr439.39
List Price:  SEK kr1,649.23
You save:  SEK kr1,209.83
ARS$40,020.14
List Price:  ARS$150,213.28
You save:  ARS$110,193.13
Bs276.06
List Price:  Bs1,036.20
You save:  Bs760.13
COP$176,073.59
List Price:  COP$660,881.98
You save:  COP$484,808.38
₡20,235.05
List Price:  ₡75,951.09
You save:  ₡55,716.04
L1,005.80
List Price:  L3,775.23
You save:  L2,769.43
₲310,029.48
List Price:  ₲1,163,677.61
You save:  ₲853,648.13
$U1,707.86
List Price:  $U6,410.37
You save:  $U4,702.50
zł164.29
List Price:  zł616.68
You save:  zł452.38
Subscription
$149.95
$39.95
per week
Payment Plan
$149.96
$39.95
per week
4 payments
Already have an account? Log In

Transcript

Hello, and welcome to this lecture where I'll describe for the nuances of bends. As you know, I've covered bins at length in previous lectures. So, here basically I'm going to show how to filter bins, in the sense that veins right now, from what I have discussed before, are normally created using content values on the on the right hand side, but this is very limited, and you end up creating veins that may not be of much use. So here's an example. I've covered this example before, but I'm taking it a bit further. So I have a PowerPoint, and I want to cover the war, the variable serial underscore war, but what I'm saying is cover only those bits of syrup or feature set, because that's what count wants will give us.

But I want to use this particular value that is returned by count once in declaring beds. So I'm saying wait, set beds count create only that many bins, explicit bans, which are required by zero colon dollar bait cereal award. So they simply convert cereal word into bits. So for example, let's say cereal board is only two bits. Why and the value of cereal board ends up as 102. So here what we are saying is create three bins where the values of zero comma one comma two of cereal board are captured.

Now this is a very trivial example but Let's say your serial war was of type int. And you may end up creating to raise to 32 wins. But with this, you're restricted to only those bits of 32 bits are set. So this is one way of what I call filtering. vents are one way of restricting bids to what you want. Now there is another clause called with clause as part of the language.

And that is quite useful. So let's look at an example. I have my value and x of guide eight. And I'd say cover in x and create more six number of beds. And I'm saying that govern only those values of x v char from zero to 255. Basically 256 values, but restrict creating veins of 256 with whenever or whatever the value of my value mod six is equal to zero.

So don't create all the 256 bands, but only those bands were more of six of my value is equal to zero. So this is one more way of restricting the number of into create with some expression with the with clause. Just to point out that the wait clause is not simply a feature of functional coverage language, but it's basically a feature of the system very log language, but it is useful in the functional coverage also. And the next example, again, I'm saying cover x, but I'm sick. As you notice, I'm using the PowerPoint x itself. And the definition of bins.

So I'm saying date all the values of x, which are which have a mod of six equal to zero. So the point is, this is similar to the previous example. But here I'm using the point itself to say that take all the various PowerPoint and and only capture those where the mod of my value is equal to zero. Now you can also ask the question, What if I just took our point x and Baines equal to x without the root cause, but that doesn't make sense, because no point x and beans equal to x will cover the same thing. So as we can, and sometimes compiler may even give you a warning. So when you want to use the PowerPoint itself in the definition of veins, you might as well use an expression specifically Bit of a clause.

And this is another example where the bid clause comes handy. I have a cover group called verse size, and it takes into parameters next and the size of type eight. And I'm saying cover B size. And I'm declaring three bids. I'm saying that being small, should have been those values of v size, which is equal to one. And the main cover those values are Besides we like to call on max minus one rep max is that input parameter.

And be large basically takes whatever the value of Max is. Now this is what's going to happen. Let's say max value is two as shown here. So this is how the bean will look like one is a constant. So it's one Do colon two minus one is two, column one, and this is two. So you see that to our left with the two value two here, as well as one or left with a value one here, essentially you're creating three different bands, but covering the same values or similar values, and this will skew your coverage report.

Similarly, if you have Mac's equal to one, then this is two colon zero. This is one, so that overlaps with two columns, zero, and one also overlaps with one itself. Again, not good. And if you have Mexico to zero, then this becomes a negative value, and there's no good either. So now, let's say x is equal to three. In that case, nothing will overlap.

One, two colon two, which is fine and three So nothing overlaps. And that's the correct definition. So how would you restrict the value of Max, that's where the VIP clause comes into picture. This is the same example, on this side. But now I'm saying that when you create Ben Smith, with this equation, so to say, but make sure that Max is greater than or equal to three, what what that means is if you end up giving the same value to do on on on Max, then these bins simply won't be created because the condition here is Max must be greater than or equal to three. And just like I say, lesser the values for Yeah, you can do the math and none of the beads with overlap.

So this is one way of restricting a particular right hand side expression to create veins with a with clause. Now We have seen cross and means of intersect before. So I'm just showing that sometimes cross will create literally gazillion cross products. And you may not want that. And that's where reserve intersect comes into picture. So in this example, I have two variables v underscore a and V underscore v. And I'm saying our V underscore a, and create four bins with the value specified on the right hand side.

Similarly cover v, B, and grade four bins. Now I'm saying take up Cross of a and b. So first, let's see how many cross products are created. So basically, you ready to cross off a and b you the cross products are going to be here one B one a one B two, a one b v3 and v4. Similarly for a two similarly for a three Similarly, for a for total of 16 cross products, that's what I've shown here. Now, from within this cross, I want to restrict the cross product.

So what I'm saying here is not have bins of a intersect with a value zero 100 to 200. So let's give a side note for a while, what are the cross products of bins of a intersect value 100 to 200. So a, a has four bins, a one does not have the value 100 to 200. So there's not into the picture, a two has values which are part of 100 to 200. So has a three and so has a four. But since we are saying a Gnar, that means the cross products That will use a value a two, a three, a four, often out of not interest, only a one is of interest.

So the number of cross products are going to be a one B one, a one, B two, B three and a one before. That's what I've shown here. Similarly, I'm saying that take bins of aid or a too explicit bin or bins of B dot v two is an all so a one sorry, a dot a two will cross with the bins of B. So a to b one a two B two, a two B three A to B four. Similarly, the bins of B dot b to meaning this will cross with the brains of a again we do a one B two a two, B two, a three a Between a four, but not then when we were doing Cross of a dot a two with V, we already had a two v two since sort of eight cross products, you're going to get seven cross products.

And lastly, I'm showing explicit means of a one eight or a one, and beans or B dot before so synthesis and N, we're saying create only one cross product, which is a one comma before. So this is just to show that you can create intersect to restrict the number of cross products, and you need to know how to read these cross products, how to understand the cross products that you want to create. This is just a simple example showing If you end up creating things in a certain way that you will get compiler warnings. And the simulator that I have tried gave me compiler warnings, but since the LRM does not dictate that you should give a warning, hopefully, all the simulators get this warning. So I have two variables one is p ONE OF GOD pig two colon zero, and variable p two of that the signed to column zero.

So this will have value zero to seven of P one. And since this is scientists will have values minus four to three. Now in our group, g one, I'm saying cover p one, but as specific bins this way, I'm saying one values are one of P 1-234-567-8910. But remember that P one only can take values zero to seven. So this base definition is called truncate to one comma 2345 comma six seven and simulator with simply no the other values eight 910 and you will get a warning. Similarly, here we are saying minus one that does not exist between zero to seven.

So, if you have 1234567 and the other way is to not p one will never have those values. So, the simulator will truncate this vanes definition to one colon seven. Similarly, for PowerPoint the two which is of type sign, if I say 12345 and 678 910 Well, the only values that we can take are one and two three. So, the rest of the values will be simply ignore and you may get a warning. Similarly here minus one is part of P two 123 is part of P two progress or not. So the basic definition will truncate to minus one, comma one colon three.

So this is just a way of showing you that you need to be careful when you create bins, you need to keep in mind what we're going to cover. And this is we have seen that transition wins at length, but it's just to further explain how to re transition base. So here I'm saying I've been stayed in zero, we will cover values with the go to operator remember go to operator is part of this overload assertions. And you can effectively use that for transition pains during functional coverage. And since it's a go to operator What that means is that transitions that must be covered our head say out and offer any number of calls hex head game and hex a game. But since this is gold wallpaper, the last one he said must come after the last edition of hex a similarly, I have different kinds of transitions specified here, seven, eight to nine is straightforward, but here you need to be careful, there is no transition called 10 to 11 to 12 because what we are saying transition from 1011 to 1314 and 12 to 1314.

So, you get 10 to 1310 to 1411 to 1311 to 14 to 13. Now, you can make the non consequential reputation operator with guru operator. So, here what this means is once you transition to four to five to six, and the last one should come right after the six transition. So, this is just to show you that you can have different kind of server assertion operators used to specify transition beans. So that's pretty much it. Simple lecture.

Hopefully you got a little bit more on how to figure beans and how to specify. Cross shipmates. Thank you

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.