‘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
€36.76
List Price:  €137.98
You save:  €101.22
£31.41
List Price:  £117.91
You save:  £86.50
CA$54.45
List Price:  CA$204.40
You save:  CA$149.94
A$59.89
List Price:  A$224.81
You save:  A$164.91
S$53.80
List Price:  S$201.96
You save:  S$148.15
HK$311.75
List Price:  HK$1,170.14
You save:  HK$858.38
CHF 36.33
List Price:  CHF 136.38
You save:  CHF 100.04
NOK kr426.11
List Price:  NOK kr1,599.41
You save:  NOK kr1,173.29
DKK kr274.31
List Price:  DKK kr1,029.63
You save:  DKK kr755.31
NZ$65.47
List Price:  NZ$245.75
You save:  NZ$180.27
د.إ146.73
List Price:  د.إ550.75
You save:  د.إ404.02
৳4,682.25
List Price:  ৳17,574.58
You save:  ৳12,892.32
RM187.46
List Price:  RM703.64
You save:  RM516.17
₦60,056.87
List Price:  ₦225,419.99
You save:  ₦165,363.11
₨11,127.48
List Price:  ₨41,766.35
You save:  ₨30,638.87
฿1,450.51
List Price:  ฿5,444.42
You save:  ฿3,993.90
₺1,286.39
List Price:  ₺4,828.42
You save:  ₺3,542.02
B$203.93
List Price:  B$765.44
You save:  B$561.51
R724.01
List Price:  R2,717.55
You save:  R1,993.53
Лв71.89
List Price:  Лв269.84
You save:  Лв197.94
₩54,411.49
List Price:  ₩204,230.37
You save:  ₩149,818.87
₪146.79
List Price:  ₪551
You save:  ₪404.20
₱2,325.74
List Price:  ₱8,729.56
You save:  ₱6,403.81
¥6,241
List Price:  ¥23,425.26
You save:  ¥17,184.25
MX$660.41
List Price:  MX$2,478.82
You save:  MX$1,818.41
QR145.81
List Price:  QR547.31
You save:  QR401.49
P540.32
List Price:  P2,028.06
You save:  P1,487.74
KSh5,263.41
List Price:  KSh19,755.91
You save:  KSh14,492.50
E£1,864.07
List Price:  E£6,996.69
You save:  E£5,132.62
ብር2,296.85
List Price:  ብር8,621.10
You save:  ብር6,324.25
Kz33,897.57
List Price:  Kz127,232.57
You save:  Kz93,335
CLP$35,583.46
List Price:  CLP$133,560.46
You save:  CLP$97,977
CN¥283.11
List Price:  CN¥1,062.64
You save:  CN¥779.53
RD$2,339.29
List Price:  RD$8,780.39
You save:  RD$6,441.09
DA5,370.49
List Price:  DA20,157.84
You save:  DA14,787.34
FJ$90.26
List Price:  FJ$338.80
You save:  FJ$248.53
Q310.65
List Price:  Q1,166.03
You save:  Q855.37
GY$8,365.17
List Price:  GY$31,398.17
You save:  GY$23,033
ISK kr5,525.48
List Price:  ISK kr20,739.58
You save:  ISK kr15,214.10
DH396.18
List Price:  DH1,487.06
You save:  DH1,090.87
L704.34
List Price:  L2,643.70
You save:  L1,939.36
ден2,262.44
List Price:  ден8,491.95
You save:  ден6,229.50
MOP$321.21
List Price:  MOP$1,205.67
You save:  MOP$884.45
N$728.17
List Price:  N$2,733.14
You save:  N$2,004.97
C$1,471.63
List Price:  C$5,523.68
You save:  C$4,052.05
रु5,328.39
List Price:  रु19,999.82
You save:  रु14,671.43
S/149.45
List Price:  S/560.97
You save:  S/411.52
K155.32
List Price:  K583.01
You save:  K427.68
SAR149.83
List Price:  SAR562.38
You save:  SAR412.55
ZK1,032.56
List Price:  ZK3,875.67
You save:  ZK2,843.11
L182.82
List Price:  L686.21
You save:  L503.39
Kč907.33
List Price:  Kč3,405.61
You save:  Kč2,498.28
Ft14,151.39
List Price:  Ft53,116.42
You save:  Ft38,965.03
SEK kr425.77
List Price:  SEK kr1,598.12
You save:  SEK kr1,172.35
ARS$35,505.60
List Price:  ARS$133,268.21
You save:  ARS$97,762.61
Bs276.30
List Price:  Bs1,037.07
You save:  Bs760.77
COP$153,043.23
List Price:  COP$574,438.85
You save:  COP$421,395.62
₡20,465.10
List Price:  ₡76,814.59
You save:  ₡56,349.48
L988.24
List Price:  L3,709.33
You save:  L2,721.08
₲299,327.33
List Price:  ₲1,123,507.72
You save:  ₲824,180.38
$U1,538.57
List Price:  $U5,774.95
You save:  $U4,236.38
zł156.39
List Price:  zł587
You save:  zł430.61
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.