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