Calling Subroutines, Sequence in Sensitivity List and Cyclic Dependency

11 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
€38.44
List Price:  €144.28
You save:  €105.84
£31.93
List Price:  £119.86
You save:  £87.93
CA$57.45
List Price:  CA$215.64
You save:  CA$158.19
A$64.12
List Price:  A$240.67
You save:  A$176.55
S$54.27
List Price:  S$203.70
You save:  S$149.43
HK$310.47
List Price:  HK$1,165.34
You save:  HK$854.86
CHF 35.74
List Price:  CHF 134.15
You save:  CHF 98.41
NOK kr456.25
List Price:  NOK kr1,712.53
You save:  NOK kr1,256.27
DKK kr286.72
List Price:  DKK kr1,076.21
You save:  DKK kr789.48
NZ$70.92
List Price:  NZ$266.22
You save:  NZ$195.29
د.إ146.73
List Price:  د.إ550.75
You save:  د.إ404.02
৳4,792.38
List Price:  ৳17,987.92
You save:  ৳13,195.54
RM180.09
List Price:  RM675.97
You save:  RM495.88
₦62,179.77
List Price:  ₦233,388.17
You save:  ₦171,208.40
₨11,161.13
List Price:  ₨41,892.66
You save:  ₨30,731.52
฿1,376.19
List Price:  ฿5,165.47
You save:  ฿3,789.28
₺1,405.79
List Price:  ₺5,276.58
You save:  ₺3,870.78
B$246.73
List Price:  B$926.09
You save:  B$679.36
R734.27
List Price:  R2,756.05
You save:  R2,021.78
Лв75.23
List Price:  Лв282.40
You save:  Лв207.16
₩57,882.25
List Price:  ₩217,257.66
You save:  ₩159,375.41
₪145.78
List Price:  ₪547.21
You save:  ₪401.42
₱2,350.49
List Price:  ₱8,822.45
You save:  ₱6,471.96
¥6,261.91
List Price:  ¥23,503.72
You save:  ¥17,241.81
MX$810.63
List Price:  MX$3,042.66
You save:  MX$2,232.03
QR146.36
List Price:  QR549.38
You save:  QR403.02
P552.40
List Price:  P2,073.41
You save:  P1,521.01
KSh5,163.53
List Price:  KSh19,381.03
You save:  KSh14,217.50
E£2,034.16
List Price:  E£7,635.12
You save:  E£5,600.95
ብር5,099.95
List Price:  ብር19,142.37
You save:  ብር14,042.42
Kz36,674.10
List Price:  Kz137,654.10
You save:  Kz100,980
CLP$39,616.41
List Price:  CLP$148,697.91
You save:  CLP$109,081.50
CN¥291.59
List Price:  CN¥1,094.47
You save:  CN¥802.87
RD$2,439
List Price:  RD$9,154.65
You save:  RD$6,715.65
DA5,375.65
List Price:  DA20,177.19
You save:  DA14,801.54
FJ$92.73
List Price:  FJ$348.08
You save:  FJ$255.34
Q308.92
List Price:  Q1,159.54
You save:  Q850.61
GY$8,390.52
List Price:  GY$31,493.33
You save:  GY$23,102.81
ISK kr5,555.04
List Price:  ISK kr20,850.54
You save:  ISK kr15,295.50
DH402.49
List Price:  DH1,510.75
You save:  DH1,108.25
L735.86
List Price:  L2,762.03
You save:  L2,026.16
ден2,366.27
List Price:  ден8,881.68
You save:  ден6,515.40
MOP$320.99
List Price:  MOP$1,204.85
You save:  MOP$883.85
N$733.03
List Price:  N$2,751.42
You save:  N$2,018.38
C$1,476.03
List Price:  C$5,540.19
You save:  C$4,064.16
रु5,459.94
List Price:  रु20,493.58
You save:  रु15,033.64
S/149.71
List Price:  S/561.93
You save:  S/412.22
K162.56
List Price:  K610.15
You save:  K447.59
SAR150.11
List Price:  SAR563.45
You save:  SAR413.33
ZK1,109.90
List Price:  ZK4,165.96
You save:  ZK3,056.06
L191.30
List Price:  L718.05
You save:  L526.74
Kč966.19
List Price:  Kč3,626.54
You save:  Kč2,660.35
Ft15,901.88
List Price:  Ft59,686.78
You save:  Ft43,784.90
SEK kr440.95
List Price:  SEK kr1,655.10
You save:  SEK kr1,214.15
ARS$40,829.29
List Price:  ARS$153,250.37
You save:  ARS$112,421.08
Bs277.12
List Price:  Bs1,040.18
You save:  Bs763.05
COP$174,918.24
List Price:  COP$656,545.43
You save:  COP$481,627.19
₡20,168.90
List Price:  ₡75,702.82
You save:  ₡55,533.91
L1,018.04
List Price:  L3,821.16
You save:  L2,803.12
₲313,289.69
List Price:  ₲1,175,914.62
You save:  ₲862,624.93
$U1,782.11
List Price:  $U6,689.05
You save:  $U4,906.94
zł163.79
List Price:  zł614.79
You save:  zł451
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, in this lecture, I'm going to tackle a few different topics basically how to call a sub routine on the match of a sequence or use sequence as a formal argument as an antecedent, or also use that in a sensitivity list. And finally, we look into how cyclic dependency works in SVM. So I have shown in previous examples how to attach a statement and executable statement or a sub routine, as it's called to give an expression. Here, I'm taking this same thought process a bit further, where I'm showing that in sequence LR sequence, I have a local variable called local data. And I'm saying that our dollar rows p true. Attach the local data at assigning the value of p i n, which is an input, but at the same time Also do a display set when it can be any executable statement.

Now, the thing to note here is that this display statement won't be executed as soon as you are assigned paint or local data, it will be executed only when dollar rose be true matches. And similarly here I'm saying that attach an executable statement to this expression. And and this, this statement also been executed only when this particular sequence matches. Now, this is a very powerful way of also using this feature for debug. You can have a complex sequence you can have multiple complex sequences going through your sequence or property and during debug your life To know which sequence did you enter, which subsequently you enter, when did you exit, so on and so forth. So in this case, for example, whenever dollar rose Pedro is true, I'm simply saying that the sequence have been triggered.

That's the first subsequence here. Similarly, I'm saying here that you know, when p is equal to local data plus five, we are exiting the sequence. And I personally use this dashing of a sub routine very effectively, during development of complex assertions. So this example is sort of similar to the previous example, but the only point I want to make is that you can also when I say executable statement, you can also attach a task or a function in addition to simple segments like dollar display. So in this segment, Anwar is sequence, I'm saying same thing, dollar roll speed through local data equal to pain. And I'm not calling a display but I'm basically calling a task URL of task.

And I'm passing it local data. And in the very last task LR sequence trigger, again, I'm, I'm only doing a display of what's going on, but you can have anything here is a regular task. I also got a bit carried away, and I decided to do a display of LR sequence dot p i n, which is a formal argument to LR sequence. Well, that doesn't work. The error I got was that hierarchical access to formal parameter p i n of L bar sequences illegal. So you cannot access a formal directly hierarchically, from a task and so on.

What I did was on LR sequence on on this particular sequence match, I called another task called LR sequence match. But this time, I decided to send it via a pee pee out and local data. So in this task LR sequence match, I have three inputs. And now I'm displaying the values of these three inputs that came from the sequence LR sequence. So this was my way of now displaying the values of pin B out and local data into a task which is outside of the sequence. So there are always ways to work around things.

Now, this is a really powerful feature that I haven't discussed so far. Let me explain. I have a simple sequence called reset sequence and in The property as underscore RC one, I'm saying this looks like a variable here. I'm saying se que si SRP as a three inputs to this property. And I'm saying that whenever I say Q is true, it implies the relationship between si and SRB. But look what I'm doing here when I'm asserting this property as RC one I'm sending it reset a sequence and reset sequence is a sequence that we declared here.

So essentially, you can pardon pause an entire sequence to our property, which is very powerful. You can have a complex sequence and based on the complex sequence, you want to do something the property in this case, the idea is that this reset sequence is considered a genetic sequence and many different properties will use a sequence. So instead of the Getting or coming up with a relationship or reset sequence in each property, you just declared it once. And that pass it as an input parameter to different properties. And let's say one final day you change that reset sequence, you need to change it only in one place. All the properties that receive this sequence will still remain generic.

So this is one way to create modular SVG libraries. And SVG s must be designed such that they are reusable. So this is one way to do that. The other powerful feature that we haven't discussed so far is that you can use sequence just like any other sensitivity signal in for example, always block or initial block, it doesn't matter. So what I'm showing here is there's a sequence as r1 with a relationship between recurse and grind So but in the procedural block, I'm saying always add as r1 do something. So, in some sense, we can easily makes concurrent sequences and properties along with procedural code.

And again, as I want to fire, so to say only when this relationship is true, at the match of requests, followed by grant is true. And the log file is very simple. request is true to calculate a grant is true. So you get this display request, request grant pass. In this I'm showing the request is true, but two clocks later grant is not true. And this particular event will not fire and that's why you don't see a display statement here.

And this is a repeat of the first part of the law. So you can very effectively have Some complex sequence. And based on the trigger of that sequence on the match of the sequence, you can take some action in a procedural block. This is the same example. I'm simply showing that on ad read complete when this particular sequence matches and completes, you can issue another named event. So here I'm saying that on read copulate issue next week, this is just to show that you can combine procedural block named events, and concurrent sequences, all in the same core.

And I think we have changed some of the examples, but a sequence can be used as a subsequence. It can also be used either as an antecedent or as a consequent. And the idea here is that again, you can have a very complex specific And you need to develop a sequence for that particular specification. And the way I have explained in the rest of the class, you should always break down the specification into smaller sequences. So here basically I'm breaking down cycle starts, then some sequence should match and that cycle ends rather than putting everything in one long temporal domain equation. And I'm just showing that here, that sequence as one and sequence as to when as one is true, it implies as to second break down sequences and then use them both as a as an antecedent as well as consequent.

Now, this is about cyclic dependency. So as we add does allow cyclic cyclic dependency. So here I am showing cyclic dependency between two sequences. So as one Cause as to and as to cause as one. So this is like an infinite loop of our relationship between ABC and D, this will keep repeating forever. Whenever it breaks, the sequence will fail.

But this is illegal because in some sense, it's an infinite loop. So in SVG a cyclic dependency between two sequences is not allowed, but it is allowed in a property. When property B one executes a cause p two and then P to cause back p one here. Let's have a new call back p one, you wait for the Encore until A is true. And then you imply p two and when P two enters Ada also waits till C is true. And then so and then you trigger p one back.

So in some sense, this also relate this relationship also will keep going Only that there is some sort of a break in the middle. And so this is legal in svga. And this can be very useful when you want to Jex cyclic relationship between properties. So that's pretty much it a simple lecture with few different topics. I hope you gain some useful knowledge from it. 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.