How the AXI-style ready/valid handshake works

  Рет қаралды 8,808

VHDLwhiz.com

VHDLwhiz.com

Күн бұрын

Пікірлер: 20
@user-uq6po8dv6i
@user-uq6po8dv6i 2 жыл бұрын
This is a great video. The AXI protocol, in general, is used ubiquitously, but no one ever bothers to dive into it and explain it. They just say, "It works, leave it at that.". But we're engineers, we can never leave it at that.
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
Thank! I'm glad you liked it.
@etherbladenet8123
@etherbladenet8123 2 жыл бұрын
Hi Jonas, once "valid" is asserted it must remain asserted until the handshake occurs.
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
Yes, you are right. To follow the AXI specification 'valid' must remain high until 'ready' becomes high during the same clock cycle.
@stevenaumov2731
@stevenaumov2731 Жыл бұрын
Not just the same cycle...any cycle thereafter. Once asserted,, valid must not de-assert once until a handshake occurs, no matter how many cycles it takes to occur. If this rule is violated, then you can potentially get into a situation where no transfer ever takes place because the sender and receiver can enter the "no transfer" situation you describe in your video.
@yuwuxiong1165
@yuwuxiong1165 Жыл бұрын
When exactly the sending data (in green boxes) are sampled by the receiver (suppose both valid and ready are asserted)? If the receiver uses DFF to register the incoming data, I guess the sampling time is at the raising edge of the clock, which is located at the "tail" of the green boxes. In this case, the setup time (for the receiver) is long enough, while the hold time might be a concern. The wavedrom diagram always draws the green boxes a bit offset (to the right direction) of the corresponding clock cycle, probably considering the Tcd and Tpd of the sender. This offset gives a bit room for hold time for the receiver, I guess.
@VHDLwhiz
@VHDLwhiz Жыл бұрын
My intention was to show a diagram of a perfect world with regards to timing; like the waveform in a VHDL simulator. I can see the transition of the data boxes appear a little offset to the right. But for the sake of this example you can assume that any changes happen exactly on the rising clock edge and that the receiving FFs have no problem sampling the value that the data signal had just before the rising edge. Of course, in reality, there are setup and hold time requirements that must be respected. The good thing is that in FPGA design the synthesis and PAR tools will take care of that for us if we use the same clock, or clocks with a known phase relationship, on the sender and receiver sides. But, yes, timing is something you need to think about if that's not the case. Then I would consider a different interface like a 4-way handshake. By the way, we created such a 4-way clock domain crossing handshake in the VHDLwhiz Membership previous month. We created clock domain crossing modules to convert between this synchronous ready/valid handshake and the asynchronous req/ack handshake. academy.vhdlwhiz.com/membership Click here to get to the video and downloadable if you are a member: academy.vhdlwhiz.com/products/vhdlwhiz-membership/categories/3260833/posts/2169140370
@mrsmelaniecook
@mrsmelaniecook 2 жыл бұрын
Thank you so much for this clear explanation.
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
You're welcome! 😊
@khaaaled2007
@khaaaled2007 2 жыл бұрын
Thanks for the video and article, very well put, in an attempt to better understand these things I created a little project with something similar to what you have here, three modules, one reads data from a file and generates a stream, one receives the data calculates the square then streams it to the third which receives it and writes it into a file, my issue is that I don't know if what I have works as an AXI protocol or not, I have a testbench, I can see that the received data is the square of the generated data but everything is delayed by one clock cycle, does that mean I have made a mistake in implementing the AXI protocole? I guess a more speceific question would be this, does the first module (AXI Stream Source) only send data when the final module (sink) is ready, and the in between module (Multiplier) is just a mediator
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
First, I should mention that the AXI interface has more rules than described in this video. That's why I wrote "AXI-style" in the video. It's not the complete story. But the ready/valid handshake is useful with or without AXI. The output data will usually be delayed by one or more clock cycles when it passes through a module that does some transformation to it. That's any process that takes the clock as an input. It adds registers (flip-flops) to the data path, thereby delaying the output. If your multiplier module uses a clock cycle, you must ensure that the ready and valid signals on that module's input and output sides still work. All modules must conform to the flow control rules (send/accept data when ready and valid are '1'). However, if the multiplier module is combinational (doesn't use the clock), you can simply pass the ready/valid signals through this module. That's because it doesn't consume simulation time, and in the FPGA, it will just add to the combinational path between your source and sink modules.
@khaaaled2007
@khaaaled2007 2 жыл бұрын
@@VHDLwhiz Thank you very much for the response, very insightful and instructive, I didn't consider the possibility of having the module be fully combinational, I'm guessing the trade off there is that the acheivable maximum frequency would be lowered but the design would require less clock cycles to run(?). The design I have is clocked so I will try to modify it to be combinational and maybe learn a thing or two by observing the frequency.
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
@@khaaaled2007 Yes, that is correct. But if everything were combinational, we wouldn't need flow control. Typically, we want to create data processing pipelines that split the operations over multiple clock cycles. Then we need ways to ensure that data only transfers when modules are ready to accept it. One way to fix that is to add flow control signals. For example, by using the ready/valid handshake. The number of clock cycles usually doesn't matter. It's the throughput that counts, and this will be the same, even if you add pipeline stages.
@joshuanuka1180
@joshuanuka1180 Жыл бұрын
Is it possible for D1 to be sent before D0?
@diegogarridomendoza2828
@diegogarridomendoza2828 2 жыл бұрын
You are the man!
@VHDLwhiz
@VHDLwhiz 2 жыл бұрын
Thanks, Diego. 🙂
@ranjeetkumar2709
@ranjeetkumar2709 Жыл бұрын
Hellow sir, I am from india and I really enjoy the ready valid handshake data transfer scheme for AXI/AMBA Protocol .but will u please explain this in using verikog and system verikohl please
@VHDLwhiz
@VHDLwhiz Жыл бұрын
Hello, Ranjeet. The VHDLwhiz website and KZbin channel focus on VHDL. Verilog and SV are good too, but I don't want to divert too much from the original concept.
@brianwang5660
@brianwang5660 Жыл бұрын
You look 23 years old in this video, congratulations. 😄
@VHDLwhiz
@VHDLwhiz Жыл бұрын
Haha, thanks 😄
How to create a signal vector in VHDL: std_logic_vector
10:11
VHDLwhiz.com
Рет қаралды 40 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Understanding SPI
11:50
Rohde & Schwarz
Рет қаралды 117 М.
The AXI Protocol, AXI MM and AXI Streaming Interfaces [English]
18:56
Renzym Education
Рет қаралды 19 М.
What is AXI (Part 1)
7:04
Dillon Huff
Рет қаралды 94 М.
How a Signal is different from a Variable in VHDL
5:02
VHDLwhiz.com
Рет қаралды 47 М.
A Beginner's Guide to Microcontrollers
15:18
Electronic Wizard
Рет қаралды 50 М.
The Ready Valid Protocol
5:52
Dillon Huff
Рет қаралды 10 М.
RS232 interface with the 6551 UART
22:45
Ben Eater
Рет қаралды 216 М.
MATLAB to FPGA in 5 Steps
23:04
MATLAB
Рет қаралды 20 М.
Lec87 - AXI bus handshaking
21:12
NPTEL-NOC IITM
Рет қаралды 25 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН