Multi-threading, Formal Arguments, Disable iff and Severity Levels

15 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.82
List Price:  €138.22
You save:  €101.39
£31.35
List Price:  £117.69
You save:  £86.33
CA$54.61
List Price:  CA$205
You save:  CA$150.38
A$60.23
List Price:  A$226.10
You save:  A$165.86
S$53.93
List Price:  S$202.44
You save:  S$148.51
HK$311.97
List Price:  HK$1,170.98
You save:  HK$859.01
CHF 36.57
List Price:  CHF 137.29
You save:  CHF 100.71
NOK kr422.78
List Price:  NOK kr1,586.89
You save:  NOK kr1,164.11
DKK kr274.91
List Price:  DKK kr1,031.86
You save:  DKK kr756.95
NZ$65.26
List Price:  NZ$244.95
You save:  NZ$179.69
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.03
৳4,680.55
List Price:  ৳17,568.19
You save:  ৳12,887.63
RM187.94
List Price:  RM705.43
You save:  RM517.49
₦58,378.88
List Price:  ₦219,121.76
You save:  ₦160,742.87
₨11,100.64
List Price:  ₨41,665.63
You save:  ₨30,564.99
฿1,461.83
List Price:  ฿5,486.92
You save:  ฿4,025.08
₺1,286.90
List Price:  ₺4,830.33
You save:  ₺3,543.42
B$206.42
List Price:  B$774.80
You save:  B$568.38
R735.85
List Price:  R2,761.99
You save:  R2,026.14
Лв71.98
List Price:  Лв270.20
You save:  Лв198.21
₩54,599.66
List Price:  ₩204,936.66
You save:  ₩150,337
₪146.18
List Price:  ₪548.70
You save:  ₪402.51
₱2,325.26
List Price:  ₱8,727.76
You save:  ₱6,402.49
¥6,269.95
List Price:  ¥23,533.90
You save:  ¥17,263.95
MX$667.15
List Price:  MX$2,504.13
You save:  MX$1,836.97
QR145.50
List Price:  QR546.15
You save:  QR400.64
P542.15
List Price:  P2,034.93
You save:  P1,492.78
KSh5,207.28
List Price:  KSh19,545.24
You save:  KSh14,337.95
E£1,882.63
List Price:  E£7,066.37
You save:  E£5,183.73
ብር2,292.75
List Price:  ብር8,605.70
You save:  ብር6,312.95
Kz33,891.94
List Price:  Kz127,211.43
You save:  Kz93,319.49
CLP$36,219.86
List Price:  CLP$135,949.16
You save:  CLP$99,729.30
CN¥284.06
List Price:  CN¥1,066.21
You save:  CN¥782.15
RD$2,349.84
List Price:  RD$8,820.01
You save:  RD$6,470.17
DA5,371.51
List Price:  DA20,161.67
You save:  DA14,790.16
FJ$90.59
List Price:  FJ$340.03
You save:  FJ$249.44
Q309.96
List Price:  Q1,163.43
You save:  Q853.46
GY$8,348.51
List Price:  GY$31,335.65
You save:  GY$22,987.14
ISK kr5,521.09
List Price:  ISK kr20,723.09
You save:  ISK kr15,202
DH398.02
List Price:  DH1,493.97
You save:  DH1,095.94
L707.89
List Price:  L2,657.05
You save:  L1,949.15
ден2,267.94
List Price:  ден8,512.61
You save:  ден6,244.66
MOP$321.11
List Price:  MOP$1,205.29
You save:  MOP$884.17
N$733.36
List Price:  N$2,752.65
You save:  N$2,019.28
C$1,468.65
List Price:  C$5,512.51
You save:  C$4,043.85
रु5,306.59
List Price:  रु19,917.99
You save:  रु14,611.39
S/149.17
List Price:  S/559.92
You save:  S/410.75
K155.07
List Price:  K582.06
You save:  K426.98
SAR149.80
List Price:  SAR562.28
You save:  SAR412.47
ZK1,065.01
List Price:  ZK3,997.46
You save:  ZK2,932.45
L183.21
List Price:  L687.70
You save:  L504.48
Kč907.36
List Price:  Kč3,405.72
You save:  Kč2,498.36
Ft14,132.58
List Price:  Ft53,045.85
You save:  Ft38,913.26
SEK kr426.20
List Price:  SEK kr1,599.72
You save:  SEK kr1,173.52
ARS$35,575.87
List Price:  ARS$133,531.97
You save:  ARS$97,956.09
Bs275.73
List Price:  Bs1,034.94
You save:  Bs759.21
COP$154,396.52
List Price:  COP$579,518.37
You save:  COP$425,121.85
₡20,458.11
List Price:  ₡76,788.33
You save:  ₡56,330.22
L986.09
List Price:  L3,701.25
You save:  L2,715.16
₲300,135.95
List Price:  ₲1,126,542.82
You save:  ₲826,406.87
$U1,535.64
List Price:  $U5,763.95
You save:  $U4,228.31
zł156.61
List Price:  zł587.85
You save:  zł431.23
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 lecture six. In this lecture, we will see the important concept of multi threading as applied to concurrent assertions. We'll also see how formals and actions work. And also these are billing of assertions how they work. Okay, let's start with multi threading. I will go back to my good old example of sequence property and how the property is asserted.

Here's the clock. Here's the C start signal. Here's the request and here's the grant signal. Let's say that this was edge of clock, see start is asserted, it is sampled Hi. As you know in this property if see started, sample high. The overlapping implication says that the requests are Someone we sample hi at that clock edge so we see that happening here and do clocks later grant should be sample Hi.

And we see that happening here and the assertion passes. Now let's see what happens the very next clock edge see start is sample low. And since it is simple low this application won't fire this property won't fire because he's already is not high. Okay moving along and I call the first as as one thread. Now at this clock edge, Sr disabled Hi again. But before I show as you can see the relationship here, but not the very first thing you note here is that the first thread as one completes the same cloth that the next thread starts that is multi threading.

It's not like because the first read was ending here that it will ignore the second thread. So the second thread starts the same clock as the first thread completes, and it will go through this property and sequence exactly like the first one, and it will pass at this clock edge. Now, s3 thread starts the very next clock. And at that clock, the thread has to was still executing, it has not ended yet. That being the case, s3 will still start, it won't be ignored, and it will go through its transitions. And in this particular example, I'm showing the transition such that all the three threats pass.

So the point is with concurrent assertions you really don't need to worry about when the antecedent will fire when the operator Regular thread that started with the firing of the antecedent will complete not complete could be the middle of the execution, and how the very second firing of the same property, same assertion will affect the preceding assertion, you don't have to worry about any of those things. This is a very important concept that you need to understand. As you can see, there are more complications when we will see this, this one round two is called the delay operator. And we'll see what happens when you have range based delay operator, then the multi threading becomes even more complex. But let's keep that aside for now. Right now, just understand how the multi threading works for non range based block delay operators.

Now let's move on to formal arguments. You might be familiar with some of this from you Regular Verilog knowledge or system Verilog knowledge. So here are the formal arguments sequence is the same property as sequence again and you have a B as a formal arguments and you have formal arguments logic ba and BB. And from this property as you know we call the sequence as r1 and we pass p NPV as actuals to to the NPV formula. So these are the actual p APB and request and grant. So when we call the proper DPR, when we pass a request in grant, which gets these actuals gets assigned to the formal PHP and the PNP as actuals get assigned to the forms of the sequence, and this should be straightforward.

And if you do Do not declare a type for a formal, then it will take the type of the actual, which makes sense. So, here's a practical real life application where basically you create sequences which are of quote unquote, generic nature and then you or generic nature which are parameterised then use the same sequence or the same property for that matter repeatedly with different assertions. So, for example, I have this property called no change sake, which has three what I call parameters or formals. Be Glock ref SIG and stable sake. What it says is at bondage of claw, if ref SIG is not asserted that the stables say should be stable. Now what I'm doing is I'm taking this property and asserting it here a set property, no change sake, but I'm passing it says clock, output enable and read data.

And so these three actuals will take place of these three formulas. And whenever output enable is low, that means output is enabled, then read data should be stable. Now, without changing anything, I said the same property, but with write enable. So it's a very simple concept with which you may apply to your projects where what you normally do is you create a library of quote unquote, generic properties or sequences, which has formals and then you keep changing the actuals for the same sequence with different signals. Some more points on formals and actuals, you can have a default on a formal, and then you can connect quote unquote actuals with the formals. Using position base, this is very similar to Verilog.

Or you can use name based connections to connect the former's initials. And this is the same example again, the point I'm making here is, since that is a default assigned to a net ENB here, you can simply skip connecting that particular formal in this particular property, or, if it's position based connection, this is name base, this is position base, you can simply leave the position empty, but followed by a comma and then because in grant This does not need to go into detail because this is very, very similar to what you are familiar with in Verilog. Here's a very powerful feature that I use a lot. So here's a property, which is a formal called CC, you have it enable and the same logic PNP. But see what I'm doing. I'm inside the property I'm saying at cc whenever cc changes pause or neglige.

And implies the consequent antecedent implies the consequent. I use seasick formal into my sampling edge, sampling edge, being seasick here. Then what I do here is I'm taking borders of clock. You can have an actual which isn't even gain control. That's very powerful. You take the position of clock and you pass it as an actual to seasick.

So now seasick will be pauses of clock. So, at pauses of clock, you do that. So the assertion and to pass an event control will make it very easy for you to create again, a generic set of properties or sequences, where you can even change the event control the event the sampling age, directly from outside of the property, and keep the property generic. Now this concept I am I'm laying out here, even though we have not used local variables, we do not know what a local variable is, at least up to this lecture. The point I'm making here is the law insider property you have available Goal l data, which is of size D size to zero. And what I'm saying is I'm passing the former DEA size to size this variable l data.

And then I'm passing take the 31 to size to declare this L data which will be 31 colon zero, but you cannot do this you cannot use a formal to size a local variable in a property. The size can only be a constant or parameter constant because it needs to be known at the elaboration time. So, this is a mistake people make when they're again trying to create a set of properties and sequences which are of genetic nature. For example, in this case, the bus can be of different size and you can you can pass different register sizes to size a register inside The property, but that is illegal. So be careful of it. Now let's see so far I haven't shown you the disabling condition of an assertion.

Now, this is a sort of complex assertion, but we don't need to understand the complexity of it. The only thing we need to understand is that here's antecedent dollar fail burst mode, which implies non overlapping that the data act will remain asserted within the sov sequence. This sequence remains true within the sequence. Let's not worry about how within words and let's not worry about any of the complexity of the property here. What is important is I'm saying that do not execute or do not do not even look at this incident. Every set is active low and Reset is low, disable, if if and only if reset is low.

Do not execute this every day reset is not low execute this. Let me show you what happens if reset is low. So here's the simulation log of this particular assertion. And very quickly, the reset remains high throughout the execution of this assertion. And obviously, I have designed this such that the assertion v. diff passes. I haven't shown the assert statement here.

But it's the name of the assertion here is PDF and the property PDF or the assertion PDF passes. Now let's see what happens if the reset goes low. In this on the right hand side of the log you See the reset goes low. During the execution, this is exactly the same from 20 to 120. During the execution of this logic, this properties assertion goes low. Now, important thing to note here is, it will discard this entire assertion.

If the reset goes low in the middle of the property, it's not that it discards and gives you a fail indication, it won't give you a fail indication. Obviously, it won't give you a pass indication, it will simply discard it. So be careful on on Venu. Let's say reset is a very typical example. When you assert the reset, make sure you're not executing a property. I mean you can but then also know that if the last property which was executing during reset, you wouldn't know whether it pass or fail.

So that's how the disabled live works. Note that it's all it always needs to be before the antecedent This is our antecedent, you have to declare the property before it you cannot declare it after it or you cannot declare it in the consequent and the disable if is only allowed in a property and is not allowed in a sequence again sequences are very generic are very, they are temporal domain and they can only have Boolean expressions. But, that is one of the difference between property and sequence use. You will see throughout this course, the differences between sequence sequences and properties like I showed you earlier that, you know if the if the property passes you can have a display statement or whatever a procedural block here for pass, else if it fails, you can have a fail action brought by you default, it is considered a runtime error.

This is the default according to the LRM. And you can if you want to quit the simulation, because this is a major assertion failure, then you have to use dollar fatal, just like shown here, else dollar fatal and so on and so forth. If you don't say anything, you simply say hello, and semicolon then it will by default use dollar error. So, again, this is a short lecture and we have gone through some of the basics of concurrent assertion and I will thank you for attending the lecture and I will see you soon in the next lecture.

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.