‘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.48
List Price:  €140.68
You save:  €103.20
£32.08
List Price:  £120.41
You save:  £88.33
CA$54.96
List Price:  CA$206.30
You save:  CA$151.33
A$62.21
List Price:  A$233.53
You save:  A$171.31
S$54.39
List Price:  S$204.15
You save:  S$149.76
HK$312.90
List Price:  HK$1,174.45
You save:  HK$861.55
CHF 36.28
List Price:  CHF 136.20
You save:  CHF 99.92
NOK kr440.91
List Price:  NOK kr1,654.95
You save:  NOK kr1,214.03
DKK kr279.67
List Price:  DKK kr1,049.76
You save:  DKK kr770.08
NZ$67.78
List Price:  NZ$254.42
You save:  NZ$186.63
د.إ146.72
List Price:  د.إ550.71
You save:  د.إ403.99
৳4,384.25
List Price:  ৳16,456.06
You save:  ৳12,071.80
RM191.10
List Price:  RM717.28
You save:  RM526.18
₦51,815.15
List Price:  ₦194,485.15
You save:  ₦142,670
₨11,125.62
List Price:  ₨41,759.39
You save:  ₨30,633.76
฿1,472.29
List Price:  ฿5,526.17
You save:  ฿4,053.88
₺1,302.22
List Price:  ₺4,887.80
You save:  ₺3,585.58
B$209.41
List Price:  B$786.03
You save:  B$576.62
R767.11
List Price:  R2,879.33
You save:  R2,112.21
Лв73.37
List Price:  Лв275.39
You save:  Лв202.02
₩55,146.18
List Price:  ₩206,987.98
You save:  ₩151,841.80
₪151.24
List Price:  ₪567.69
You save:  ₪416.45
₱2,299.76
List Price:  ₱8,632.02
You save:  ₱6,332.26
¥6,171.77
List Price:  ¥23,165.40
You save:  ¥16,993.62
MX$689.98
List Price:  MX$2,589.81
You save:  MX$1,899.83
QR146.26
List Price:  QR548.98
You save:  QR402.72
P553.74
List Price:  P2,078.45
You save:  P1,524.70
KSh5,333.32
List Price:  KSh20,018.32
You save:  KSh14,685
E£1,930.80
List Price:  E£7,247.15
You save:  E£5,316.35
ብር2,281.69
List Price:  ብር8,564.21
You save:  ብር6,282.51
Kz33,395.86
List Price:  Kz125,349.45
You save:  Kz91,953.58
CLP$38,604.48
List Price:  CLP$144,899.68
You save:  CLP$106,295.20
CN¥289.28
List Price:  CN¥1,085.81
You save:  CN¥796.53
RD$2,369.17
List Price:  RD$8,892.55
You save:  RD$6,523.38
DA5,376.67
List Price:  DA20,181.02
You save:  DA14,804.35
FJ$90.92
List Price:  FJ$341.27
You save:  FJ$250.35
Q311.83
List Price:  Q1,170.44
You save:  Q858.60
GY$8,362.53
List Price:  GY$31,388.27
You save:  GY$23,025.74
ISK kr5,633.74
List Price:  ISK kr21,145.94
You save:  ISK kr15,512.20
DH406.18
List Price:  DH1,524.58
You save:  DH1,118.40
L715.50
List Price:  L2,685.60
You save:  L1,970.10
ден2,311.38
List Price:  ден8,675.64
You save:  ден6,364.26
MOP$322.23
List Price:  MOP$1,209.47
You save:  MOP$887.24
N$763.48
List Price:  N$2,865.70
You save:  N$2,102.21
C$1,475.42
List Price:  C$5,537.93
You save:  C$4,062.50
रु5,338.15
List Price:  रु20,036.44
You save:  रु14,698.29
S/150.28
List Price:  S/564.07
You save:  S/413.79
K152.34
List Price:  K571.83
You save:  K419.48
SAR149.86
List Price:  SAR562.50
You save:  SAR412.64
ZK1,021.65
List Price:  ZK3,834.73
You save:  ZK2,813.07
L186.52
List Price:  L700.11
You save:  L513.59
Kč946.89
List Price:  Kč3,554.11
You save:  Kč2,607.22
Ft14,795.63
List Price:  Ft55,534.57
You save:  Ft40,738.93
SEK kr437.43
List Price:  SEK kr1,641.89
You save:  SEK kr1,204.45
ARS$34,746.83
List Price:  ARS$130,420.23
You save:  ARS$95,673.39
Bs277.04
List Price:  Bs1,039.86
You save:  Bs762.81
COP$155,763.90
List Price:  COP$584,650.76
You save:  COP$428,886.85
₡20,086.71
List Price:  ₡75,394.32
You save:  ₡55,307.60
L989.76
List Price:  L3,715.02
You save:  L2,725.26
₲296,623.51
List Price:  ₲1,113,359.10
You save:  ₲816,735.58
$U1,547.21
List Price:  $U5,807.36
You save:  $U4,260.15
zł162.13
List Price:  zł608.54
You save:  zł446.41
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.