'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
€36.83
List Price:  €138.25
You save:  €101.41
£31.39
List Price:  £117.84
You save:  £86.44
CA$54.60
List Price:  CA$204.96
You save:  CA$150.35
A$60.17
List Price:  A$225.84
You save:  A$165.67
S$53.90
List Price:  S$202.34
You save:  S$148.43
HK$311.93
List Price:  HK$1,170.83
You save:  HK$858.90
CHF 36.50
List Price:  CHF 137
You save:  CHF 100.50
NOK kr425.44
List Price:  NOK kr1,596.87
You save:  NOK kr1,171.43
DKK kr274.85
List Price:  DKK kr1,031.67
You save:  DKK kr756.81
NZ$65.18
List Price:  NZ$244.65
You save:  NZ$179.47
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.03
৳4,685.36
List Price:  ৳17,586.25
You save:  ৳12,900.88
RM187.94
List Price:  RM705.43
You save:  RM517.49
₦57,827.62
List Price:  ₦217,052.62
You save:  ₦159,225
₨11,132.64
List Price:  ₨41,785.73
You save:  ₨30,653.08
฿1,459.41
List Price:  ฿5,477.82
You save:  ฿4,018.41
₺1,287
List Price:  ₺4,830.70
You save:  ₺3,543.69
B$205.89
List Price:  B$772.79
You save:  B$566.90
R734.40
List Price:  R2,756.55
You save:  R2,022.14
Лв72.04
List Price:  Лв270.43
You save:  Лв198.38
₩54,468.61
List Price:  ₩204,444.79
You save:  ₩149,976.17
₪146.69
List Price:  ₪550.62
You save:  ₪403.92
₱2,324.19
List Price:  ₱8,723.73
You save:  ₱6,399.53
¥6,258.87
List Price:  ¥23,492.32
You save:  ¥17,233.45
MX$665.03
List Price:  MX$2,496.17
You save:  MX$1,831.13
QR145.82
List Price:  QR547.33
You save:  QR401.51
P540.45
List Price:  P2,028.57
You save:  P1,488.12
KSh5,293.37
List Price:  KSh19,868.37
You save:  KSh14,575
E£1,881.64
List Price:  E£7,062.64
You save:  E£5,181
ብር2,297.74
List Price:  ብር8,624.46
You save:  ብር6,326.71
Kz33,936.41
List Price:  Kz127,378.37
You save:  Kz93,441.95
CLP$35,902.66
List Price:  CLP$134,758.56
You save:  CLP$98,855.90
CN¥284.06
List Price:  CN¥1,066.23
You save:  CN¥782.16
RD$2,347.03
List Price:  RD$8,809.46
You save:  RD$6,462.42
DA5,375.03
List Price:  DA20,174.87
You save:  DA14,799.84
FJ$90.53
List Price:  FJ$339.80
You save:  FJ$249.27
Q310.77
List Price:  Q1,166.47
You save:  Q855.69
GY$8,367.75
List Price:  GY$31,407.88
You save:  GY$23,040.12
ISK kr5,529.08
List Price:  ISK kr20,753.08
You save:  ISK kr15,224
DH396.01
List Price:  DH1,486.40
You save:  DH1,090.39
L706.33
List Price:  L2,651.18
You save:  L1,944.84
ден2,271.13
List Price:  ден8,524.55
You save:  ден6,253.42
MOP$321.57
List Price:  MOP$1,207.01
You save:  MOP$885.44
N$726.88
List Price:  N$2,728.31
You save:  N$2,001.42
C$1,472.07
List Price:  C$5,525.33
You save:  C$4,053.26
रु5,327.78
List Price:  रु19,997.53
You save:  रु14,669.74
S/149.34
List Price:  S/560.56
You save:  S/411.22
K155.43
List Price:  K583.41
You save:  K427.98
SAR149.83
List Price:  SAR562.40
You save:  SAR412.57
ZK1,042.86
List Price:  ZK3,914.34
You save:  ZK2,871.47
L183.26
List Price:  L687.88
You save:  L504.61
Kč910.15
List Price:  Kč3,416.19
You save:  Kč2,506.04
Ft14,257.41
List Price:  Ft53,514.39
You save:  Ft39,256.97
SEK kr427.07
List Price:  SEK kr1,603
You save:  SEK kr1,175.92
ARS$35,554.68
List Price:  ARS$133,452.42
You save:  ARS$97,897.74
Bs276.37
List Price:  Bs1,037.36
You save:  Bs760.98
COP$152,238.84
List Price:  COP$571,419.66
You save:  COP$419,180.81
₡20,507.24
List Price:  ₡76,972.73
You save:  ₡56,465.49
L988.43
List Price:  L3,710.01
You save:  L2,721.58
₲300,915.38
List Price:  ₲1,129,468.37
You save:  ₲828,552.99
$U1,530.32
List Price:  $U5,743.98
You save:  $U4,213.65
zł157.19
List Price:  zł590.01
You save:  zł432.82
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.