‘first_match’, ‘if … else’, ‘iff’, ‘implies’

12 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, and welcome to lecture number 14. Let's continue with our operators. In this lecture, we'll go and look at first match if then else. If and only if I FF and implies implies is a new operator that was added in 2009 lRn. Let's look at first match, first match. As as the name says it only matches the very first or possibly multiple matches of the sequence a given sequence.

Now, right there, you can see that it makes sense to use a sequence with delay range. So what delay range tells you is that there can be multiple matches within the delay range. And then what you care for is the very first match. On the first match. You want to take some action So let's look at an application. So the concept is very clearly solidified.

What we are saying is that the very first time PCI bus goes idle, that the state machine should transition to biocidal. State the very first time. And the PCI protocol says that when both frame and Id are high, that the bus goes to bus idle. And now the key is as soon as the frame and Id go high, that bus the the state machine should go to Boise, Idaho State, not one clock later, not one clock. After very next clock, it should go to most idle state and not wait for a few clocks before going to this idle state. So here's the property on the antecedent side.

I'm saying that first match, first match in this sequence bus idol On the first match of bus idol, the very next clock stage should go to versatile and I'm setting the property every time frame false frame false starts the cycle. And I'm saying on the side of the cycle check for bus idol Check. Check for I mean, the FMS property should hold. And FMS property says look at the bus idle check sequence and on the first match of frame and it going Hi, anytime to clubs to forever meaning the PDCA cycle can go on forever. But as soon as framing ID our DS are dead meaning both of them go high that we want to make sure that the state is versatile. So first match with Do the very first timeframe and I already go Hi, that antecedent matches and as soon as the antecedent matches, we will go and make sure that the state goes into biocidal state.

Now, one point, I want to point out that we have used the first marriage in this example on the antecedent side and in most or all cases you will have the maximum benefit of using first match on the antecedent side. Why? Because the consequent meaning the right hand side of a property behaves exactly like first match by definition. The consequent is not evaluated. If you go back and look at all the all the applications and properties that we have looked the consequent is not available. wants its first matches found that is by default.

So on the consequences side, you don't really need to use first match, but on the antecedent side, it really makes sense to use it. So, in this case going back to this case, the first time framing idea hi we look for biocidal sake, but note that framing I ready can remain high for many, many, many clocks. And you've had not used for smash if he had simply said that bus I will check implies the next state should good bus idle, then every clock it will keep doing this check because for many cycles, the bus can remain in bus idle state. So, to avoid all the redundant checks, which will also affect the performance of your simulator, we need to make a Use first match or you should use first match, you can accomplish the same epic property and the spec without the first match, but first match is when in this case first match is a must.

Because the very first time this framing it to go high that the bush stage should go to recital not after the second or third match, but the very first match. The NOT operator is very intuitive. If you look at this example, let's say positive clock A naught C D. That means if CD is true, then this will be false and property will fail if CD matches the property fails, which is maybe contrary to intuitive to sound but it's it's very straightforward if you want to feel the property If you want to discard that and find the property at the match of CD, then you put a knot in front. That's this is a similar simulation log if equal to one and then C, D and E, follow the sequence CDE. spec, that the property will fail. It's it's very intuitive and you will use it quite often frequently, if then else is pretty much like any procedural programming language if and else that is nothing quite new here.

For the sake of completeness, here we are saying in this property that at pauses of clock is high and one clock later either B or C is high, at least once. If you recall this operation At least nonconsecutive go to Soviet saying if as high one or greater B or C should remain high, at least should become high at least once. If that matches then it implies overlapping. If we then one clock later they should be high else if else one clock later he should be, which is this is quite intuitive and quite straightforward the same as what you might have used in procedural languages. And here's the simulation log which pretty much tells you that after a B goes high, B or C should go high B goes high, at least once one clock later, at least once and one clock later anytime, at least once and if we goes higher than they should be true and these are true and the property passes.

So, this is a simulation log on this particular property is very intuitive as you can see. And he has an example where C does go high, and if C goes high, and this one's that he should go high, but he does not and the property fears that are, we have already seen if and only if it's called an equivalence operator. As in the examples that we have seen, so far we have said disable if and only if reset. So it is similar here. So it's true, even if p if and only if q means that properties P and Q are both true. These two If and only if q is true.

And so that's the equivalence between P and Q. More interesting. operator is implies, again implies was added in 2009 LRM continuing to 2012. Now so far we have seen implication operator for example, overlapping implication operator that I'm showing here. What's the difference between this operator implies and the implication operator, the one sound the same. In case of the implication operator like overlapping here that we have seen through all the lectures.

What we are saying here is that evaluation of Q starts only when the antecedent is true. We have seen this all the time. If the antecedent is true, it implies that you should hold but in case of P implies Q, Both P and Q start evaluating at the same time, very different again and be overlapping implication q we say that start evaluating q once p matches, but in P implies Q, both P and Q start evaluating at the same time. And the truth results are computed using the logical operator implies. So, there is no notion of you know a match of antecedent to trigger the consequent. That's the big difference between the implication operator and implies operator for example, we say that x lb lb to y implies a pawn pawn to B, versus, we remove the implication operator and we put implies operator.

So, the case of implication operator evaluation of a pawn pawn to be stars only when x to cross a divide is true, if x to cross letter Y is not true, we do nothing, because the antecedent has not matched. But in the case of implies, if x to cross otherwise not true, the whole property phase. And similarly, if a translate a B is not true the property phase, in this case only when a not a, b is not there to crocs after a that the property will fail. If this does not, if this property does not match, we do nothing. It's an antecedent. So, that's basically the big difference between implication operator that we have used so far and implies operators.

So, that's pretty much it for this lecture. What we are going to do is in the next two lectures, I will present Two quizzes. One is synchronous FIFO. And another is a counter. And I will pose the questions. And I will also provide the answers and explain the answers.

So, that's all for this lecture, folks. Thank you so much for attending and I'll see you soon increase number one

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.