'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.25
List Price:  €139.81
You save:  €102.56
£31.94
List Price:  £119.88
You save:  £87.94
CA$54.65
List Price:  CA$205.14
You save:  CA$150.49
A$61.21
List Price:  A$229.74
You save:  A$168.53
S$54.31
List Price:  S$203.86
You save:  S$149.54
HK$312.76
List Price:  HK$1,173.93
You save:  HK$861.17
CHF 36.48
List Price:  CHF 136.93
You save:  CHF 100.44
NOK kr437.45
List Price:  NOK kr1,641.97
You save:  NOK kr1,204.51
DKK kr277.83
List Price:  DKK kr1,042.85
You save:  DKK kr765.01
NZ$67.04
List Price:  NZ$251.66
You save:  NZ$184.61
د.إ146.73
List Price:  د.إ550.75
You save:  د.إ404.01
৳4,378.17
List Price:  ৳16,433.22
You save:  ৳12,055.04
RM190.86
List Price:  RM716.38
You save:  RM525.52
₦50,617.44
List Price:  ₦189,989.64
You save:  ₦139,372.20
₨11,106.46
List Price:  ₨41,687.46
You save:  ₨30,581
฿1,479.17
List Price:  ฿5,552.01
You save:  ฿4,072.83
₺1,298.49
List Price:  ₺4,873.83
You save:  ₺3,575.33
B$205.63
List Price:  B$771.82
You save:  B$566.19
R759.59
List Price:  R2,851.08
You save:  R2,091.49
Лв72.88
List Price:  Лв273.56
You save:  Лв200.68
₩54,905.43
List Price:  ₩206,084.35
You save:  ₩151,178.92
₪151.64
List Price:  ₪569.19
You save:  ₪417.55
₱2,308.77
List Price:  ₱8,665.83
You save:  ₱6,357.06
¥6,214.04
List Price:  ¥23,324.04
You save:  ¥17,110
MX$681.36
List Price:  MX$2,557.45
You save:  MX$1,876.09
QR145.49
List Price:  QR546.12
You save:  QR400.62
P553.29
List Price:  P2,076.75
You save:  P1,523.46
KSh5,373.27
List Price:  KSh20,168.27
You save:  KSh14,795
E£1,913.46
List Price:  E£7,182.06
You save:  E£5,268.60
ብር2,268.32
List Price:  ብር8,514.01
You save:  ብር6,245.68
Kz33,458.12
List Price:  Kz125,583.12
You save:  Kz92,125
CLP$38,059.56
List Price:  CLP$142,854.36
You save:  CLP$104,794.80
CN¥289.47
List Price:  CN¥1,086.53
You save:  CN¥797.06
RD$2,346.22
List Price:  RD$8,806.41
You save:  RD$6,460.19
DA5,366.56
List Price:  DA20,143.10
You save:  DA14,776.53
FJ$91.56
List Price:  FJ$343.69
You save:  FJ$252.12
Q310.09
List Price:  Q1,163.91
You save:  Q853.82
GY$8,351
List Price:  GY$31,345.01
You save:  GY$22,994
ISK kr5,591.40
List Price:  ISK kr20,987
You save:  ISK kr15,395.60
DH404.82
List Price:  DH1,519.49
You save:  DH1,114.66
L711.55
List Price:  L2,670.77
You save:  L1,959.22
ден2,294.80
List Price:  ден8,613.40
You save:  ден6,318.60
MOP$321.89
List Price:  MOP$1,208.23
You save:  MOP$886.33
N$764.99
List Price:  N$2,871.35
You save:  N$2,106.36
C$1,468.33
List Price:  C$5,511.31
You save:  C$4,042.97
रु5,317.95
List Price:  रु19,960.64
You save:  रु14,642.68
S/148
List Price:  S/555.52
You save:  S/407.51
K151.64
List Price:  K569.20
You save:  K417.55
SAR149.83
List Price:  SAR562.40
You save:  SAR412.56
ZK1,042.20
List Price:  ZK3,911.85
You save:  ZK2,869.65
L185.37
List Price:  L695.78
You save:  L510.41
Kč938.56
List Price:  Kč3,522.84
You save:  Kč2,584.28
Ft14,621
List Price:  Ft54,879.10
You save:  Ft40,258.09
SEK kr434
List Price:  SEK kr1,629.02
You save:  SEK kr1,195.01
ARS$34,886.01
List Price:  ARS$130,942.62
You save:  ARS$96,056.60
Bs275.67
List Price:  Bs1,034.74
You save:  Bs759.06
COP$155,475.85
List Price:  COP$583,569.56
You save:  COP$428,093.70
₡20,009.70
List Price:  ₡75,105.25
You save:  ₡55,095.55
L984.80
List Price:  L3,696.38
You save:  L2,711.58
₲296,355.57
List Price:  ₲1,112,353.39
You save:  ₲815,997.81
$U1,532.08
List Price:  $U5,750.59
You save:  $U4,218.50
zł160.72
List Price:  zł603.27
You save:  zł442.54
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.