Asynchronous FIFO Assertions

11 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.72
List Price:  €137.82
You save:  €101.10
£31.44
List Price:  £118.03
You save:  £86.58
CA$54.39
List Price:  CA$204.16
You save:  CA$149.77
A$59.61
List Price:  A$223.77
You save:  A$164.15
S$53.77
List Price:  S$201.83
You save:  S$148.06
HK$311.71
List Price:  HK$1,170
You save:  HK$858.29
CHF 36.31
List Price:  CHF 136.30
You save:  CHF 99.99
NOK kr429.08
List Price:  NOK kr1,610.56
You save:  NOK kr1,181.47
DKK kr274.24
List Price:  DKK kr1,029.34
You save:  DKK kr755.10
NZ$65.12
List Price:  NZ$244.43
You save:  NZ$179.31
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.03
৳4,677.80
List Price:  ৳17,557.85
You save:  ৳12,880.05
RM187.26
List Price:  RM702.89
You save:  RM515.62
₦58,726.50
List Price:  ₦220,426.50
You save:  ₦161,700
₨11,069.72
List Price:  ₨41,549.55
You save:  ₨30,479.83
฿1,448.10
List Price:  ฿5,435.38
You save:  ฿3,987.27
₺1,288.12
List Price:  ₺4,834.89
You save:  ₺3,546.77
B$203.92
List Price:  B$765.43
You save:  B$561.50
R722.07
List Price:  R2,710.25
You save:  R1,988.18
Лв71.86
List Price:  Лв269.73
You save:  Лв197.87
₩54,107.88
List Price:  ₩203,090.78
You save:  ₩148,982.90
₪147.99
List Price:  ₪555.49
You save:  ₪407.50
₱2,305.73
List Price:  ₱8,654.43
You save:  ₱6,348.70
¥6,219.21
List Price:  ¥23,343.46
You save:  ¥17,124.25
MX$663.51
List Price:  MX$2,490.45
You save:  MX$1,826.94
QR144.93
List Price:  QR544
You save:  QR399.07
P541.27
List Price:  P2,031.63
You save:  P1,490.35
KSh5,233.45
List Price:  KSh19,643.45
You save:  KSh14,410
E£1,874.05
List Price:  E£7,034.15
You save:  E£5,160.10
ብር2,288.33
List Price:  ብር8,589.13
You save:  ብር6,300.80
Kz33,854.30
List Price:  Kz127,070.17
You save:  Kz93,215.87
CLP$35,735.18
List Price:  CLP$134,129.93
You save:  CLP$98,394.75
CN¥288.56
List Price:  CN¥1,083.11
You save:  CN¥794.55
RD$2,327.95
List Price:  RD$8,737.85
You save:  RD$6,409.89
DA5,368.23
List Price:  DA20,149.35
You save:  DA14,781.11
FJ$89.01
List Price:  FJ$334.11
You save:  FJ$245.10
Q310.36
List Price:  Q1,164.94
You save:  Q854.57
GY$8,357.53
List Price:  GY$31,369.50
You save:  GY$23,011.97
ISK kr5,524.68
List Price:  ISK kr20,736.58
You save:  ISK kr15,211.90
DH395.67
List Price:  DH1,485.15
You save:  DH1,089.48
L703.19
List Price:  L2,639.39
You save:  L1,936.19
ден2,259.20
List Price:  ден8,479.80
You save:  ден6,220.59
MOP$321.03
List Price:  MOP$1,204.99
You save:  MOP$883.95
N$727.07
List Price:  N$2,729.04
You save:  N$2,001.96
C$1,468.16
List Price:  C$5,510.66
You save:  C$4,042.50
रु5,325.62
List Price:  रु19,989.41
You save:  रु14,663.79
S/148.41
List Price:  S/557.05
You save:  S/408.64
K155.02
List Price:  K581.88
You save:  K426.85
SAR149.81
List Price:  SAR562.31
You save:  SAR412.50
ZK1,014.37
List Price:  ZK3,807.41
You save:  ZK2,793.03
L182.81
List Price:  L686.20
You save:  L503.38
Kč907.58
List Price:  Kč3,406.56
You save:  Kč2,498.98
Ft14,227.57
List Price:  Ft53,402.36
You save:  Ft39,174.79
SEK kr428.14
List Price:  SEK kr1,607.01
You save:  SEK kr1,178.86
ARS$35,425.66
List Price:  ARS$132,968.16
You save:  ARS$97,542.50
Bs276.01
List Price:  Bs1,036.01
You save:  Bs759.99
COP$152,096.36
List Price:  COP$570,884.85
You save:  COP$418,788.49
₡20,444.36
List Price:  ₡76,736.73
You save:  ₡56,292.37
L983.98
List Price:  L3,693.32
You save:  L2,709.33
₲299,307.64
List Price:  ₲1,123,433.84
You save:  ₲824,126.19
$U1,539.62
List Price:  $U5,778.89
You save:  $U4,239.27
zł156.62
List Price:  zł587.88
You save:  zł431.25
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 20. This is a short lecture, which I have devoted specifically to asynchronous FIFO assertions that are synchronous workflows. And obviously they're asynchronous ciphers. We will cover for synchronous FIFO into one of the quizzes. But asynchronous FIFO is very important because I'm pretty sure in your designs, you will come across asynchronous five fours all the time. And one of the key places where you put your assertions This is a general rule of thumb.

The key places where you put your assertions are around FIFO or around both types of iPhones because that's where majority of the bugs emerge. Okay, let's look at an asynchronous FIFO. Let me show you this diagram here first. This is a a deep FIFO it has right clock recall Reset, because there is a right clock and there is a read clock. They both work off of different clocks, or they can work off of the same clock, but there are differences in their phases. For example, because of that this is an asynchronous FIFO.

You we'll have five for data in you have five for data out. This is a five five empty condition obviously, and this is the five for full condition. And this is the five for right pointer, this is where five four will write. And this is the FIFO read pointer, which is where, which is from where Pfeiffer will read. Now, most of the assertions for a given FIFO synchronous or asynchronous are very straightforward. But in asynchronous FIFO as I just say, the write and read clocks are asynchronous, which means that the most important property to change Is that a data transfer from right to retroarch.

In other words, whenever we write something at the right pointer, whenever read pointer reaches that same right pointer, that the data that we wrote must be the data that we read. If there is a bug, then those two data will not match. So let's see the different type of assertions that we will write for this asynchronous FIFO. First, let's check for FIFO empty condition. So, what does that mean? It means if the FIFO is empty, then the read pointer does not change.

That means you cannot read from an empty FIFO that's another way to look at it. So here's the property to check for it. At fathers have read blog no direct clock is different from right clock, which is quite specific to an asynchronous FIFO synchronous FIFO will not have that issue. Select positive read clock, disable if read clock reset is asserted, always choose your disable if condition very carefully. Otherwise you will have performance implications during a simulation, because you don't want to find your property unnecessarily. So here I'm disabling this property.

Whenever there is a read clog reset asserted. Then what I'm doing is I'm checking to see that if the FIFO is empty, empty is one of the variables in your design. It implies that at next clock at next pauses of read clock again, if past value of read pointer is unknown, always make sure that when you look at the past value That is not unknown. Otherwise you're going to compare past unknown value with current known value and things will fail. So, if it is not unknown, then we want to make sure that the current rate pointer is the same as the pass rate pointer, which means read pointer did not change. And that's exactly what we are looking for in this particular property, to see that if the five four is empty, we do not read we do not read means your read pointed has not changed.

So this is a simple assertion that you can write or you can pretty much use this particular assertion for your FIFO. Similarly, if the FIFO is for data, right, pointer does not change. This is identical to the previous assertion only that we are now going to deal with right clock. Right clock reset, and if it's full, then it bothers your clock. See, right is in advance is posted. So here we are simply checking to see that the right pointer is the same as the right pointer.

So these are identical in terms of FIFO foolin FIFO empty conditions. Now, let's look at the very interesting assertion or condition that we need to check. Like I said at the beginning of the lecture, that the most important thing you need to check in an asynchronous assertion is that data that is written at a right pointer or when data is written on a given slot of the FIFO is the same data that is read when read pointer reaches that right pointer, because the read the read clock and the right clock are asynchronous, and you're crossing the clock boundary. So this is one of the most important assertions you Right. Okay, let's start at the bottom. I'm asserting a property called Data check, and I'm sending it a right pointer hierarchically embedded into my design.

The idea here is that again, I'm giving the data check property quote unquote genetic parameterised so that I can always send it different right pointers from different parts of the design. And I don't need to change my code property itself. So I'm going to call data check with a given right pointer. Property data check defines two local variables PTR pointer and data of type integer. Then at the pauses of right talk, right clock because we are going to deal with right pointer in this particular condition. So you have to be very careful which clock you're dealing with.

Again, disable the condition If the right plug reset or read clock reset is asserted whenever a reset for write or read clock is asserted, we don't want to deal with this property, we don't want to continue any further. If that is not the case, and if right is enabled that we are indeed writing, and we need to make sure that the right for the FIFO is not full. If this is true, then what we are going to do is we are going to take the right pointer and store it into the local variable PTR. We are also going to take the right data basically the FIFO in whatever the data that's on the FIFO in data input and store it into the local variable data. And as always, I always attach a sub routine which is a display and basically show what's going on. Now what we have done is we have stored the right pointer and we have stored the right data If this is true, that means we have completed a write, then we need to make sure that whatever we read from that particular location is the same as what was written to that location.

So what I'm going to do is I'm going to call a sequence called read detect. And I'm going to send it the right pointer, which was stored into the local variable PTR. In this and I'll get to first met in a second. Now in this sequence, what we are saying is okay, when the sequences involved, we are going to make sure that from now from time, quote, unquote, clock zero to clock forever. It read is enabled, and five is not empty. Again, we want to make sure that you're not going to read from an empty FIFO reasonable and FIFO is not empty and the read pointer equal to pointer.

So, we are going to wait for this condition to match forever if you are reading and whenever read pointer is equal to right pointer, because right pointer was against wrote into pointer and the pointer was sent to read detect. So, now what we have done is we have waited till right pointer becomes equal to read pointer. If that is the case, then and back now to the first match, what I'm saying is the very first time this condition, shine is met because it can meet multiple times we are going to wait forever. I don't care. I just want the very first match of this particular expression, this expression that I want to move forward. So the very first time read pointer is equal to right pointer will come here and we'll make sure that five out meaning the data output or, or the data that is being read is the same data that were written this data.

If you see here again, this is the data in which we store the data that was written. So as soon as this condition is met, meaning as soon as right pointer is equal to the read pointer, we are going to make sure that the data that is read out is the same as data that are written. So study this carefully is not that complicated, but this is how you would make sure that the asynchronous FIFO crosses the right and read clock. Clock boundaries. That's pretty much it. As I said, this is a short lecture and I have exposed to you a very important property, you can literally take this property and apply it to your asynchronous FIFO for your project.

Thanks for attending the lecture, and I'll see you in the next lecture soon.

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.