SlideShare une entreprise Scribd logo
1  sur  5
Télécharger pour lire hors ligne
Figure 1 The FIFO Interface
Valid
Ready
Data
Module A
(Source)
Module B
(Sink)
In Figure 1, two modules (called the source and the sink) are connected to one another. When data
is being passed from module to module, the source is the module that is outputting data. The sink is
the module that is receiving that data.
In addition to showing the source and the sink, Figure 1 also shows three signals between the two:
Data, Valid, and Ready. Data is the wire that actually passes data from the source to the sink. Valid and
Ready are known as handshaking signals which allow the source and the sink to communicate with
regards to when it is time to pass the data.
The Valid signal (output from the source and input to the sink) indicates that the source has put
valid data on the Data line this cycle. Valid is what is called a state signal: it is high only when data
is valid. If data is not valid on the Data line during a particular cycle, Valid should be low during that
cycle.
The Ready signal (output from the sink and input to the source) indicates that the sink is ready to
receive new data. Ready can be asserted as soon as the sink is ready to receive new data. Whenever the
sink is not ready to receive new data, Ready should be low.
1
ECE105: Interfaces
KAUST College of Engineering
Department of Electrical Engineering and Computer Science
1 Overview
Perhaps the most important part of creating a large design is how well you connect the different pieces
that comprise the design. Specifically, you are concerned with how the outputs of one component connect
to the inputs of another component.
This document will discuss a general handshake-based interface (input/output port specification)
that modules in your design can conform to. By following this interface specification, you will be able to
connect different modules with no complexity or combinational logic stuck in between them. By following
this interface specification, you will also avoid designing around your own timing assumptions of when
different components need data. As the interface is handshake-based, modules will instead talk to one
another with regards to when they need data.
2 The FIFO Interface
This document’s interface specification, which we will the FIFO Interface as it works especially well
with units that pass data in a single direction, such as FIFOs, is shown in Figure 1.
3 The Handshake and Data Transfer
The FIFO Interface handshake ensures that data passes from the source to the sink only when the source
has valid data to pass and when the sink is ready to receive that data. In other words, when Valid and
Ready are both high, data on Data will be latched into the sink on the next rising edge. This is an
important point: since EECS150 is concerned with synchronous design, data will only be transferred at
the rising edge. This handshake, and when it passes data, is shown in Figure 2.
Figure 2 Data transfer at the rising edge
Clock
Valid
Ready
t
r
a
n
s
f
e
r
This transfer of data happens on every rising edge where Valid and Ready are both asserted. For each
rising edge, however, only one piece of data is transferred. For example, if Valid and Ready are both high
for two consecutive cycles, we transfer two data words (on consecutive clock cycles; see Figure 3).
Note that data transfer only occurs when both Valid and Ready are high. For example, in Figure 4,
neither Valid nor Ready are high. Thus, no data is transferred. Likewise in Figure 5 and Figure 6: if
only one of the two handshaking signals is high, no data is transferred. Figure 7 shows another example:
if the two handshaking signals are both high at some point, but are out of phase, no data is transferred.
4 Advantages of the FIFO Interface
The FIFO Interface eliminates timing assumptions in your design and removes intermediate combina-
tional logic between modules.
Modules that interface with different pieces of hardware must follow the rules laid out by that hard-
ware down to the cycle. To keep track of when every piece of data must be sent / every control signal
must be asserted, students will often construct external counters that count time to determine when
different events should happen. This type of design is crippled by the fact that students are making large
timing assumptions about when each of their modules requires data X or control signal Y. Each module
doesnt give feedback on these counters: they are either right or wrong, but are not based on the actual
state of the module. If a counter gets misaligned, the circuit will fail horribly.
By basing data transfer on handshaking, each module that is handling the data has input as to when
the data should and can be passed along. After designing each module, you as the student can forget
about the timing of that module, and trust that it will keep track of when it is done processing data
and when it is ready to receive more data. The second benefit of the FIFO interface is that it provides
a 2-wire standard for connecting modules. To connect to modules that follow the FIFO interface, all
2
Figure 3 Two data transfers at two consecutive rising edges
Clock
Valid
Ready
t
r
a
n
s
f
e
r
t
r
a
n
s
f
e
r
Figure 4 Both handshaking signals are low: no data is transferred
Clock
Valid
Ready
Figure 5 Valid is high and Ready is low: no data is transferred
Clock
Valid
Ready
3
Figure 6 Valid is low and Ready is high: no data is transferred
Clock
Valid
Ready
Figure 7 Both handshaking signals are high at some point, but are out of phase: no data is transferred
Clock
Valid
Ready
you have to do is connect the Data port from the source to the sink, the Valid port from the source to
the sink, and the Ready port from the sink to the source. When students don’t follow this standard,
they typically substitute in large and complex messes of combinational logic in between each of their
modules to connect them together. If you design by the FIFO interface, and internalize the
logic that generates Valid and Ready, when it comes time to connect modules, you can do so
by just connecting ports together. Down the road of the project, this will save you many hours
of frustration.
5 When to use the FIFO Interface
The FIFO Interface coordinates data transfer. Hence, whenever a module you write passes data to
another module, that data should have accompanying Valid and Ready signals. For each Data line that
you write these handshaking signals for, you eliminate your own timing assumptions about when that
data is supposed to be passed from source to sink, and eliminate a potentially nasty bed of combinational
logic between the source and sink.
Some modules will have more than one Data port. Such modules should have more than one pair of
handshaking signals. For example, the standard FIFO, for which this interface is named, takes data in
and passes data out again. A typical FIFO is shown in Figure 8. Notice that the FIFO serves as both a
source and sink. This is perfectly fine: the FIFO passes and receives data.
4
Figure 8 A FIFO functioning as both a source and sink
Valid
Ready
Data
Module A
(Source)
FIFO
Sink Source
Module B
(Sink)
Valid
Ready
Data
6 A Danger: Combinational Loops
When you design using the FIFO Interface, you must be sure that the Valid and Ready signals are not
combinationally linked at either end. In other words, you should not be able to trace a path from:
1. The output of the Valid signal (in the source)
2. Through the combinational logic that generates the Ready signal (in the sink)
3. Back to the combinational logic that generates the Valid signal (again, in the source)
and visa versa when tracing a path starting at the Ready signal. This path is illustrated in Figure 9.
Figure 9 A combinational loop: avoid this at all costs
Combinational Logic Combinational Logic
Valid
Source
Ready
Sink
If you don’t heed this advice, your design will contain a combinational loop. Treat combinational
loops as you would latches: if you have one in your design, your circuit will fail miserably.
Rev. Name Date Description
A Wrote new document; based on Greg Gibeling’s publications
on the FIFO Interface
5
Ahmed Abdelazeem 11/20/23

Contenu connexe

Similaire à ready_valid_interface.pdf

Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
John Mathias
 
Input output organization
Input output organizationInput output organization
Input output organization
abdulugc
 
OSI - OSI Reference Model and TCP (Transmission Control Protocol)
OSI - OSI Reference Model and TCP (Transmission Control Protocol)OSI - OSI Reference Model and TCP (Transmission Control Protocol)
OSI - OSI Reference Model and TCP (Transmission Control Protocol)
Dktechnozone.in
 
BSA 385 Week 3 Individual Assignment Essay
BSA 385 Week 3 Individual Assignment EssayBSA 385 Week 3 Individual Assignment Essay
BSA 385 Week 3 Individual Assignment Essay
Tara Smith
 

Similaire à ready_valid_interface.pdf (20)

data link layer to print
data link layer to printdata link layer to print
data link layer to print
 
Paper id 27201415
Paper id 27201415Paper id 27201415
Paper id 27201415
 
NAVEEN UART BATCH 43
NAVEEN UART BATCH 43NAVEEN UART BATCH 43
NAVEEN UART BATCH 43
 
Automation and Robotics 20ME51I Week 3 Theory Notes.pdf
Automation and Robotics 20ME51I Week 3 Theory Notes.pdfAutomation and Robotics 20ME51I Week 3 Theory Notes.pdf
Automation and Robotics 20ME51I Week 3 Theory Notes.pdf
 
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
 
Osi(1)
Osi(1)Osi(1)
Osi(1)
 
OSI MODEL AND ITS LAYERS FUNCTION
OSI  MODEL AND ITS LAYERS FUNCTIONOSI  MODEL AND ITS LAYERS FUNCTION
OSI MODEL AND ITS LAYERS FUNCTION
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Network protocol lectures
Network protocol  lecturesNetwork protocol  lectures
Network protocol lectures
 
Unit1-INTRODUCTION AND PHYSICAL LAYER.pptx
Unit1-INTRODUCTION AND PHYSICAL LAYER.pptxUnit1-INTRODUCTION AND PHYSICAL LAYER.pptx
Unit1-INTRODUCTION AND PHYSICAL LAYER.pptx
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3
 
Osi model
Osi modelOsi model
Osi model
 
Asynchronous Data Transfer.pptx
Asynchronous Data Transfer.pptxAsynchronous Data Transfer.pptx
Asynchronous Data Transfer.pptx
 
Chapter 6 pc
Chapter 6 pcChapter 6 pc
Chapter 6 pc
 
OSI - OSI Reference Model and TCP (Transmission Control Protocol)
OSI - OSI Reference Model and TCP (Transmission Control Protocol)OSI - OSI Reference Model and TCP (Transmission Control Protocol)
OSI - OSI Reference Model and TCP (Transmission Control Protocol)
 
Mobile Imaging Whitepaper
Mobile Imaging WhitepaperMobile Imaging Whitepaper
Mobile Imaging Whitepaper
 
Class notes 1
Class notes 1Class notes 1
Class notes 1
 
Asynchronous data transfer
Asynchronous  data  transferAsynchronous  data  transfer
Asynchronous data transfer
 
BSA 385 Week 3 Individual Assignment Essay
BSA 385 Week 3 Individual Assignment EssayBSA 385 Week 3 Individual Assignment Essay
BSA 385 Week 3 Individual Assignment Essay
 
Chapter 7 principles of data communication
Chapter 7   principles of data communicationChapter 7   principles of data communication
Chapter 7 principles of data communication
 

Plus de Ahmed Abdelazeem

9. Routing.pdf
9. Routing.pdf9. Routing.pdf
9. Routing.pdf
Ahmed Abdelazeem
 
Physical Implementation: I/O Pad Insertion for Innovus.pdf
Physical Implementation: I/O Pad Insertion for Innovus.pdfPhysical Implementation: I/O Pad Insertion for Innovus.pdf
Physical Implementation: I/O Pad Insertion for Innovus.pdf
Ahmed Abdelazeem
 
1. Introduction to PnR.pptx
1. Introduction to PnR.pptx1. Introduction to PnR.pptx
1. Introduction to PnR.pptx
Ahmed Abdelazeem
 
ASIC_Design.pdf
ASIC_Design.pdfASIC_Design.pdf
ASIC_Design.pdf
Ahmed Abdelazeem
 

Plus de Ahmed Abdelazeem (20)

10. Signoff.pdf
10. Signoff.pdf10. Signoff.pdf
10. Signoff.pdf
 
9. Routing.pdf
9. Routing.pdf9. Routing.pdf
9. Routing.pdf
 
8. Clock Tree Synthesis.pdf
8. Clock Tree Synthesis.pdf8. Clock Tree Synthesis.pdf
8. Clock Tree Synthesis.pdf
 
7. Placement.pdf
7. Placement.pdf7. Placement.pdf
7. Placement.pdf
 
6. Design Planning.pdf
6. Design Planning.pdf6. Design Planning.pdf
6. Design Planning.pdf
 
5. Data and Timing Setup Introduction.pdf
5. Data and Timing Setup Introduction.pdf5. Data and Timing Setup Introduction.pdf
5. Data and Timing Setup Introduction.pdf
 
What is the Difference Between the target_library and link_library Variables?
What is the Difference Between the target_library and link_library Variables?What is the Difference Between the target_library and link_library Variables?
What is the Difference Between the target_library and link_library Variables?
 
Physical Implementation: I/O Pad Insertion for Innovus.pdf
Physical Implementation: I/O Pad Insertion for Innovus.pdfPhysical Implementation: I/O Pad Insertion for Innovus.pdf
Physical Implementation: I/O Pad Insertion for Innovus.pdf
 
Learn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examplesLearn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examples
 
wire vs. reg.pdf
wire vs. reg.pdfwire vs. reg.pdf
wire vs. reg.pdf
 
verilog_fsm.pdf
verilog_fsm.pdfverilog_fsm.pdf
verilog_fsm.pdf
 
always_at_blocks.pdf
always_at_blocks.pdfalways_at_blocks.pdf
always_at_blocks.pdf
 
1. Introduction to PnR.pptx
1. Introduction to PnR.pptx1. Introduction to PnR.pptx
1. Introduction to PnR.pptx
 
5. DFT.pptx
5. DFT.pptx5. DFT.pptx
5. DFT.pptx
 
4. Formal Equivalence Checking (Formality).pptx
4. Formal Equivalence Checking (Formality).pptx4. Formal Equivalence Checking (Formality).pptx
4. Formal Equivalence Checking (Formality).pptx
 
3. Synthesis.pptx
3. Synthesis.pptx3. Synthesis.pptx
3. Synthesis.pptx
 
Routing.pdf
Routing.pdfRouting.pdf
Routing.pdf
 
Clock Tree Synthesis.pdf
Clock Tree Synthesis.pdfClock Tree Synthesis.pdf
Clock Tree Synthesis.pdf
 
ASIC_Design.pdf
ASIC_Design.pdfASIC_Design.pdf
ASIC_Design.pdf
 
Placement.pdf
Placement.pdfPlacement.pdf
Placement.pdf
 

Dernier

在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
oopacde
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
Abortion pills in Riyadh +966572737505 get cytotec
 
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotecAbortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Buy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
Buy best abortion pills Doha [+966572737505 | Planned cytotec QatarBuy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
Buy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
samsungultra782445
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Obat Aborsi 088980685493 Jual Obat Aborsi
 
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
DUBAI (+971)581248768 BUY ABORTION PILLS IN ABU dhabi...Qatar
 
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
mestb
 
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
Vibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptxVibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptx
joshuaclack73
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
Obat Cytotec
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
ayoqf
 

Dernier (20)

在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotecAbortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
Abortion pills in Jeddah Saudi Arabia! +966572737505 Where to buy cytotec
 
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhhMatrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
 
Buy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
Buy best abortion pills Doha [+966572737505 | Planned cytotec QatarBuy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
Buy best abortion pills Doha [+966572737505 | Planned cytotec Qatar
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
 
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
Contact +971581248768 to buy 100% original and safe abortion pills in Dubai a...
 
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
 
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
 
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
 
Cyber-Security-power point presentation.
Cyber-Security-power point presentation.Cyber-Security-power point presentation.
Cyber-Security-power point presentation.
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
 
Vibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptxVibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptx
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
 
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
 
Mahindra XUV new version for smooth travelling
Mahindra XUV new version for smooth travellingMahindra XUV new version for smooth travelling
Mahindra XUV new version for smooth travelling
 

ready_valid_interface.pdf

  • 1. Figure 1 The FIFO Interface Valid Ready Data Module A (Source) Module B (Sink) In Figure 1, two modules (called the source and the sink) are connected to one another. When data is being passed from module to module, the source is the module that is outputting data. The sink is the module that is receiving that data. In addition to showing the source and the sink, Figure 1 also shows three signals between the two: Data, Valid, and Ready. Data is the wire that actually passes data from the source to the sink. Valid and Ready are known as handshaking signals which allow the source and the sink to communicate with regards to when it is time to pass the data. The Valid signal (output from the source and input to the sink) indicates that the source has put valid data on the Data line this cycle. Valid is what is called a state signal: it is high only when data is valid. If data is not valid on the Data line during a particular cycle, Valid should be low during that cycle. The Ready signal (output from the sink and input to the source) indicates that the sink is ready to receive new data. Ready can be asserted as soon as the sink is ready to receive new data. Whenever the sink is not ready to receive new data, Ready should be low. 1 ECE105: Interfaces KAUST College of Engineering Department of Electrical Engineering and Computer Science 1 Overview Perhaps the most important part of creating a large design is how well you connect the different pieces that comprise the design. Specifically, you are concerned with how the outputs of one component connect to the inputs of another component. This document will discuss a general handshake-based interface (input/output port specification) that modules in your design can conform to. By following this interface specification, you will be able to connect different modules with no complexity or combinational logic stuck in between them. By following this interface specification, you will also avoid designing around your own timing assumptions of when different components need data. As the interface is handshake-based, modules will instead talk to one another with regards to when they need data. 2 The FIFO Interface This document’s interface specification, which we will the FIFO Interface as it works especially well with units that pass data in a single direction, such as FIFOs, is shown in Figure 1.
  • 2. 3 The Handshake and Data Transfer The FIFO Interface handshake ensures that data passes from the source to the sink only when the source has valid data to pass and when the sink is ready to receive that data. In other words, when Valid and Ready are both high, data on Data will be latched into the sink on the next rising edge. This is an important point: since EECS150 is concerned with synchronous design, data will only be transferred at the rising edge. This handshake, and when it passes data, is shown in Figure 2. Figure 2 Data transfer at the rising edge Clock Valid Ready t r a n s f e r This transfer of data happens on every rising edge where Valid and Ready are both asserted. For each rising edge, however, only one piece of data is transferred. For example, if Valid and Ready are both high for two consecutive cycles, we transfer two data words (on consecutive clock cycles; see Figure 3). Note that data transfer only occurs when both Valid and Ready are high. For example, in Figure 4, neither Valid nor Ready are high. Thus, no data is transferred. Likewise in Figure 5 and Figure 6: if only one of the two handshaking signals is high, no data is transferred. Figure 7 shows another example: if the two handshaking signals are both high at some point, but are out of phase, no data is transferred. 4 Advantages of the FIFO Interface The FIFO Interface eliminates timing assumptions in your design and removes intermediate combina- tional logic between modules. Modules that interface with different pieces of hardware must follow the rules laid out by that hard- ware down to the cycle. To keep track of when every piece of data must be sent / every control signal must be asserted, students will often construct external counters that count time to determine when different events should happen. This type of design is crippled by the fact that students are making large timing assumptions about when each of their modules requires data X or control signal Y. Each module doesnt give feedback on these counters: they are either right or wrong, but are not based on the actual state of the module. If a counter gets misaligned, the circuit will fail horribly. By basing data transfer on handshaking, each module that is handling the data has input as to when the data should and can be passed along. After designing each module, you as the student can forget about the timing of that module, and trust that it will keep track of when it is done processing data and when it is ready to receive more data. The second benefit of the FIFO interface is that it provides a 2-wire standard for connecting modules. To connect to modules that follow the FIFO interface, all 2
  • 3. Figure 3 Two data transfers at two consecutive rising edges Clock Valid Ready t r a n s f e r t r a n s f e r Figure 4 Both handshaking signals are low: no data is transferred Clock Valid Ready Figure 5 Valid is high and Ready is low: no data is transferred Clock Valid Ready 3
  • 4. Figure 6 Valid is low and Ready is high: no data is transferred Clock Valid Ready Figure 7 Both handshaking signals are high at some point, but are out of phase: no data is transferred Clock Valid Ready you have to do is connect the Data port from the source to the sink, the Valid port from the source to the sink, and the Ready port from the sink to the source. When students don’t follow this standard, they typically substitute in large and complex messes of combinational logic in between each of their modules to connect them together. If you design by the FIFO interface, and internalize the logic that generates Valid and Ready, when it comes time to connect modules, you can do so by just connecting ports together. Down the road of the project, this will save you many hours of frustration. 5 When to use the FIFO Interface The FIFO Interface coordinates data transfer. Hence, whenever a module you write passes data to another module, that data should have accompanying Valid and Ready signals. For each Data line that you write these handshaking signals for, you eliminate your own timing assumptions about when that data is supposed to be passed from source to sink, and eliminate a potentially nasty bed of combinational logic between the source and sink. Some modules will have more than one Data port. Such modules should have more than one pair of handshaking signals. For example, the standard FIFO, for which this interface is named, takes data in and passes data out again. A typical FIFO is shown in Figure 8. Notice that the FIFO serves as both a source and sink. This is perfectly fine: the FIFO passes and receives data. 4
  • 5. Figure 8 A FIFO functioning as both a source and sink Valid Ready Data Module A (Source) FIFO Sink Source Module B (Sink) Valid Ready Data 6 A Danger: Combinational Loops When you design using the FIFO Interface, you must be sure that the Valid and Ready signals are not combinationally linked at either end. In other words, you should not be able to trace a path from: 1. The output of the Valid signal (in the source) 2. Through the combinational logic that generates the Ready signal (in the sink) 3. Back to the combinational logic that generates the Valid signal (again, in the source) and visa versa when tracing a path starting at the Ready signal. This path is illustrated in Figure 9. Figure 9 A combinational loop: avoid this at all costs Combinational Logic Combinational Logic Valid Source Ready Sink If you don’t heed this advice, your design will contain a combinational loop. Treat combinational loops as you would latches: if you have one in your design, your circuit will fail miserably. Rev. Name Date Description A Wrote new document; based on Greg Gibeling’s publications on the FIFO Interface 5 Ahmed Abdelazeem 11/20/23