Calling Subroutines, Sequence in Sensitivity List and Cyclic Dependency

11 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $149.95
You save:  $110
List Price:  ₹9,995
You save:  ₹8,515
List Price:  €137.84
You save:  €101.11
List Price:  £117.33
You save:  £86.07
List Price:  CA$204.35
You save:  CA$149.91
List Price:  A$225.08
You save:  A$165.11
List Price:  S$202.10
You save:  S$148.25
List Price:  HK$1,171.22
You save:  HK$859.18
CHF 36.38
List Price:  CHF 136.56
You save:  CHF 100.18
NOK kr418.80
List Price:  NOK kr1,571.95
You save:  NOK kr1,153.15
DKK kr274.02
List Price:  DKK kr1,028.53
You save:  DKK kr754.50
List Price:  NZ$243.44
You save:  NZ$178.58
List Price:  د.إ550.76
You save:  د.إ404.02
List Price:  ৳17,592.78
You save:  ৳12,905.67
List Price:  RM703.83
You save:  RM516.31
List Price:  ₦222,294.87
You save:  ₦163,070.60
List Price:  ₨41,723.59
You save:  ₨30,607.50
List Price:  ฿5,493.49
You save:  ฿4,029.90
List Price:  ₺4,825.54
You save:  ₺3,539.91
List Price:  B$775.78
You save:  B$569.09
List Price:  R2,756.77
You save:  R2,022.30
List Price:  Лв269.60
You save:  Лв197.77
List Price:  ₩203,755.80
You save:  ₩149,470.74
List Price:  ₪551.28
You save:  ₪404.41
List Price:  ₱8,695.52
You save:  ₱6,378.84
List Price:  ¥23,522.08
You save:  ¥17,255.27
List Price:  MX$2,501.42
You save:  MX$1,834.98
List Price:  QR546.54
You save:  QR400.92
List Price:  P2,035.64
You save:  P1,493.30
List Price:  KSh19,868.37
You save:  KSh14,575
List Price:  E£7,124.12
You save:  E£5,226.10
List Price:  ብር8,550.20
You save:  ብር6,272.24
List Price:  Kz127,733.40
You save:  Kz93,702.40
List Price:  CLP$135,200.23
You save:  CLP$99,179.89
List Price:  CN¥1,066.03
You save:  CN¥782.02
List Price:  RD$8,829.03
You save:  RD$6,476.78
List Price:  DA20,172.12
You save:  DA14,797.82
List Price:  FJ$334.11
You save:  FJ$245.10
List Price:  Q1,164.57
You save:  Q854.30
List Price:  GY$31,383.27
You save:  GY$23,022.07
ISK kr5,490.72
List Price:  ISK kr20,609.12
You save:  ISK kr15,118.40
List Price:  DH1,488.72
You save:  DH1,092.09
List Price:  L2,655.64
You save:  L1,948.11
List Price:  ден8,492.81
You save:  ден6,230.14
List Price:  MOP$1,205.86
You save:  MOP$884.59
List Price:  N$2,753.72
You save:  N$2,020.06
List Price:  C$5,518.33
You save:  C$4,048.12
List Price:  रु19,930.39
You save:  रु14,620.49
List Price:  S/561.21
You save:  S/411.69
List Price:  K582.99
You save:  K427.67
List Price:  SAR562.40
You save:  SAR412.56
List Price:  ZK4,014.20
You save:  ZK2,944.73
List Price:  L685.87
You save:  L503.14
List Price:  Kč3,398.63
You save:  Kč2,493.16
List Price:  Ft52,881.26
You save:  Ft38,792.52
SEK kr420.92
List Price:  SEK kr1,579.90
You save:  SEK kr1,158.98
List Price:  ARS$133,980.32
You save:  ARS$98,285
List Price:  Bs1,035.94
You save:  Bs759.94
List Price:  COP$580,181.64
You save:  COP$425,608.41
List Price:  ₡77,097.01
You save:  ₡56,556.66
List Price:  L3,704.82
You save:  L2,717.77
List Price:  ₲1,127,850.11
You save:  ₲827,365.86
List Price:  $U5,772.73
You save:  $U4,234.75
List Price:  zł586.17
You save:  zł430
per week
Payment Plan
per week
4 payments
Already have an account? Log In


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 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.