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
€37.87
List Price:  €142.15
You save:  €104.28
£31.55
List Price:  £118.43
You save:  £86.87
CA$55.89
List Price:  CA$209.78
You save:  CA$153.89
A$61.42
List Price:  A$230.55
You save:  A$169.12
S$53.66
List Price:  S$201.43
You save:  S$147.76
HK$310.94
List Price:  HK$1,167.12
You save:  HK$856.17
CHF 35.38
List Price:  CHF 132.82
You save:  CHF 97.44
NOK kr441.52
List Price:  NOK kr1,657.24
You save:  NOK kr1,215.71
DKK kr282.47
List Price:  DKK kr1,060.24
You save:  DKK kr777.77
NZ$67.94
List Price:  NZ$255.04
You save:  NZ$187.09
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.02
৳4,757.02
List Price:  ৳17,855.20
You save:  ৳13,098.18
RM178.63
List Price:  RM670.50
You save:  RM491.86
₦66,908.65
List Price:  ₦251,137.75
You save:  ₦184,229.10
₨11,062.35
List Price:  ₨41,521.90
You save:  ₨30,459.55
฿1,386.54
List Price:  ฿5,204.31
You save:  ฿3,817.77
₺1,376.80
List Price:  ₺5,167.77
You save:  ₺3,790.96
B$231.20
List Price:  B$867.82
You save:  B$636.61
R723.37
List Price:  R2,715.16
You save:  R1,991.78
Лв74.05
List Price:  Лв277.95
You save:  Лв203.90
₩55,812.30
List Price:  ₩209,488.24
You save:  ₩153,675.93
₪149.29
List Price:  ₪560.37
You save:  ₪411.07
₱2,357.82
List Price:  ₱8,849.97
You save:  ₱6,492.14
¥6,222.78
List Price:  ¥23,356.84
You save:  ¥17,134.06
MX$807.25
List Price:  MX$3,029.98
You save:  MX$2,222.73
QR145.17
List Price:  QR544.90
You save:  QR399.73
P541.58
List Price:  P2,032.82
You save:  P1,491.23
KSh5,173.52
List Price:  KSh19,418.52
You save:  KSh14,245
E£1,985.51
List Price:  E£7,452.51
You save:  E£5,467
ብር4,899.40
List Price:  ብር18,389.63
You save:  ብር13,490.22
Kz36,460.79
List Price:  Kz136,853.46
You save:  Kz100,392.67
CLP$38,803.03
List Price:  CLP$145,644.93
You save:  CLP$106,841.90
CN¥289.50
List Price:  CN¥1,086.62
You save:  CN¥797.12
RD$2,397.37
List Price:  RD$8,998.41
You save:  RD$6,601.03
DA5,330.55
List Price:  DA20,007.92
You save:  DA14,677.37
FJ$90.71
List Price:  FJ$340.49
You save:  FJ$249.77
Q307.31
List Price:  Q1,153.47
You save:  Q846.16
GY$8,324.22
List Price:  GY$31,244.48
You save:  GY$22,920.25
ISK kr5,502.71
List Price:  ISK kr20,654.11
You save:  ISK kr15,151.40
DH397.72
List Price:  DH1,492.82
You save:  DH1,095.10
L727.09
List Price:  L2,729.10
You save:  L2,002.01
ден2,327.48
List Price:  ден8,736.06
You save:  ден6,408.58
MOP$319.12
List Price:  MOP$1,197.83
You save:  MOP$878.70
N$719.71
List Price:  N$2,701.40
You save:  N$1,981.69
C$1,464.95
List Price:  C$5,498.63
You save:  C$4,033.67
रु5,378.70
List Price:  रु20,188.64
You save:  रु14,809.94
S/151.06
List Price:  S/567.01
You save:  S/415.95
K160.17
List Price:  K601.21
You save:  K441.03
SAR149.98
List Price:  SAR562.94
You save:  SAR412.96
ZK1,099.68
List Price:  ZK4,127.58
You save:  ZK3,027.90
L188.46
List Price:  L707.37
You save:  L518.91
Kč957.21
List Price:  Kč3,592.84
You save:  Kč2,635.63
Ft15,518.42
List Price:  Ft58,247.49
You save:  Ft42,729.07
SEK kr439.39
List Price:  SEK kr1,649.23
You save:  SEK kr1,209.83
ARS$40,020.14
List Price:  ARS$150,213.28
You save:  ARS$110,193.13
Bs276.06
List Price:  Bs1,036.20
You save:  Bs760.13
COP$176,073.59
List Price:  COP$660,881.98
You save:  COP$484,808.38
₡20,235.05
List Price:  ₡75,951.09
You save:  ₡55,716.04
L1,005.80
List Price:  L3,775.23
You save:  L2,769.43
₲310,029.48
List Price:  ₲1,163,677.61
You save:  ₲853,648.13
$U1,707.86
List Price:  $U6,410.37
You save:  $U4,702.50
zł164.29
List Price:  zł616.68
You save:  zł452.38
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.