‘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
€37.97
List Price:  €142.52
You save:  €104.55
£31.62
List Price:  £118.70
You save:  £87.08
CA$55.80
List Price:  CA$209.46
You save:  CA$153.66
A$61.35
List Price:  A$230.27
You save:  A$168.92
S$53.69
List Price:  S$201.55
You save:  S$147.85
HK$310.93
List Price:  HK$1,167.06
You save:  HK$856.13
CHF 35.30
List Price:  CHF 132.51
You save:  CHF 97.21
NOK kr441.57
List Price:  NOK kr1,657.43
You save:  NOK kr1,215.85
DKK kr283.22
List Price:  DKK kr1,063.06
You save:  DKK kr779.84
NZ$68.10
List Price:  NZ$255.62
You save:  NZ$187.52
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.03
৳4,778.10
List Price:  ৳17,934.34
You save:  ৳13,156.23
RM178.37
List Price:  RM669.52
You save:  RM491.15
₦67,139.57
List Price:  ₦252,004.47
You save:  ₦184,864.90
₨11,115.15
List Price:  ₨41,720.08
You save:  ₨30,604.92
฿1,385.02
List Price:  ฿5,198.61
You save:  ฿3,813.59
₺1,380.34
List Price:  ₺5,181.04
You save:  ₺3,800.70
B$232.12
List Price:  B$871.28
You save:  B$639.15
R724.11
List Price:  R2,717.92
You save:  R1,993.80
Лв74.25
List Price:  Лв278.72
You save:  Лв204.46
₩55,978.29
List Price:  ₩210,111.28
You save:  ₩154,132.98
₪149.19
List Price:  ₪559.99
You save:  ₪410.79
₱2,359.60
List Price:  ₱8,856.64
You save:  ₱6,497.04
¥6,168.38
List Price:  ¥23,152.66
You save:  ¥16,984.28
MX$812.76
List Price:  MX$3,050.66
You save:  MX$2,237.89
QR145.80
List Price:  QR547.27
You save:  QR401.46
P546.22
List Price:  P2,050.20
You save:  P1,503.98
KSh5,163.53
List Price:  KSh19,381.03
You save:  KSh14,217.50
E£1,983.54
List Price:  E£7,445.10
You save:  E£5,461.56
ብር4,985.04
List Price:  ብር18,711.08
You save:  ብር13,726.04
Kz36,447.47
List Price:  Kz136,803.48
You save:  Kz100,356
CLP$38,904.10
List Price:  CLP$146,024.30
You save:  CLP$107,120.20
CN¥289.30
List Price:  CN¥1,085.89
You save:  CN¥796.58
RD$2,411.55
List Price:  RD$9,051.64
You save:  RD$6,640.08
DA5,336.91
List Price:  DA20,031.79
You save:  DA14,694.87
FJ$90.69
List Price:  FJ$340.41
You save:  FJ$249.72
Q308.66
List Price:  Q1,158.55
You save:  Q849.89
GY$8,365.18
List Price:  GY$31,398.24
You save:  GY$23,033.05
ISK kr5,525.08
List Price:  ISK kr20,738.08
You save:  ISK kr15,213
DH399.43
List Price:  DH1,499.24
You save:  DH1,099.81
L727.49
List Price:  L2,730.59
You save:  L2,003.10
ден2,336.54
List Price:  ден8,770.07
You save:  ден6,433.53
MOP$320.56
List Price:  MOP$1,203.22
You save:  MOP$882.65
N$725.20
List Price:  N$2,722.02
You save:  N$1,996.82
C$1,471.33
List Price:  C$5,522.58
You save:  C$4,051.24
रु5,396.91
List Price:  रु20,256.99
You save:  रु14,860.08
S/151.73
List Price:  S/569.52
You save:  S/417.79
K160.95
List Price:  K604.15
You save:  K443.19
SAR149.98
List Price:  SAR562.94
You save:  SAR412.96
ZK1,106.53
List Price:  ZK4,153.31
You save:  ZK3,046.77
L188.95
List Price:  L709.24
You save:  L520.28
Kč962.03
List Price:  Kč3,610.94
You save:  Kč2,648.91
Ft15,613.61
List Price:  Ft58,604.79
You save:  Ft42,991.18
SEK kr440.65
List Price:  SEK kr1,653.96
You save:  SEK kr1,213.31
ARS$40,059.13
List Price:  ARS$150,359.64
You save:  ARS$110,300.50
Bs276.88
List Price:  Bs1,039.26
You save:  Bs762.37
COP$176,322.29
List Price:  COP$661,815.48
You save:  COP$485,493.18
₡20,304.64
List Price:  ₡76,212.31
You save:  ₡55,907.66
L1,010.38
List Price:  L3,792.41
You save:  L2,782.03
₲313,132.78
List Price:  ₲1,175,325.66
You save:  ₲862,192.88
$U1,709.25
List Price:  $U6,415.58
You save:  $U4,706.32
zł165.08
List Price:  zł619.65
You save:  zł454.56
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.