AXI Protocol Questions
AXI Protocol Questions
Out-of-order is like rearranging tasks in a to-do list to get things done faster. In a computer processor, it
means changing the order of instructions in a program so that independent tasks can be done at the same
time. This helps the processor work more efficiently and completes tasks quicker.
Both techniques aim to improve system performance but operate at different levels: memory access in
the case of interleaving and instruction execution in the case of out-of-order execution.
Handling unaligned transfers in AXI is critical to ensure data integrity and proper communication between
components. AXI specification provides specific rules for it:
Data Strobes (WSTRB): indicate which bytes within the data bus are valid during a transfer.
Burst Length Extension (BLE): to indicate the number of data transfers within a burst.
Data Alignment and Padding: In some AXI implementations, unaligned transfers might be handled by
padding the data with extra bytes to make it aligned.
It includes BRESP (response from the slave to the write transaction), BVALID (validity of the write
response), BREADY (readiness of the master to accept the write response), and BID (write transaction
identifier).
Read Address Channel (AR):
This channel is used for read transactions initiated by the master.
It carries the read address (ARADDR) from the master to the slave, indicating the target memory location
from where the read data should be fetched.
Additional signals include ARVALID (validity of the read address), ARREADY (readiness of the slave to
accept the read address), ARID (read transaction identifier), ARLEN (number of data transfers within the
burst transaction), ARSIZE (size of the data transfer), ARBURST (type of burst transfer)
Read Data Channel (R)
This channel is used to send the read data (RDATA) from the slave to the master.
It also includes RVALID (validity of the read data and response), RREADY (readiness of the master to
accept the read data and response), RLAST (indicating the last transfer of the burst transaction), and
RRESP (response from the slave to the read transaction).
9. Why there was no write response for each beat in burst write. But there is a separate read response for
each beat in a read burst?
For read transfers, the information and the response flow are from slave to master. But for a write
transaction, the information and the response are in different directions.
So individual responses for each transfer will involve more clock cycles and unnecessary traffic because of
the two-way flow between master and slave.
So it is better to have a single response for a write transaction compared to a response for each transfer
in a read transaction.
10. How testplan environment is planned with AXI transfer with some subsystem.
Planning a test environment with AXI transfers involving a subsystem typically involves the following
steps:
• Understand the Requirements
• Define Test Goals
• Create a Testplan
• Design Testbench Architecture
• AXI Verification Components
• Test Sequences
• Coverage Goals
• Randomization and Constraints
• Error Handling
• Assertions
• Scoreboarding and Functional Checking
• Debugging and Visualization
• Run Testcases
• Coverage Closure
@Pallavi Thammina
• Test Report
By following these steps, the test plan environment for AXI transfers with the subsystem can be
effectively planned, executed, and validated (just mentioned the outline if required will add the details).
12. If there are multiple outstanding transactions pending, how you will debug the issue?
When there are multiple outstanding transactions pending in a system, debugging the issue can be
challenging due to the complexity of interactions between various components. Here are some steps to
help debug the issue:
Waveform Debugging: Use waveform viewers to analyze the signals and transactions in the system.
Transaction Logs: Enable transaction logging in the test bench to capture details of each transaction.
Coverage Analysis: Monitor functional and code coverage to ensure that all scenarios and corner cases
are exercised during simulation.
Reduce Testcase Size: If the issue occurs in a large testcase, try reducing the testcase size to create a
minimal reproduction case.
13. What is the minimum and maximum data bus width supported in AXI?
The data bus width as per spec can be 8,16,32...,1024 bits. So the minimum is 8 and maximum is
1024 bits.
16. What are burst types? diff between incr and wrap
Burst types refer to the data transfers occur between a master and a slave during a single AXI transaction.
There are 3 burst types
• FIXED - FIXED burst type is used when the master wants to perform multiple data transfers to the same
fixed address (e.g., for multiple write operations to the same register)
• INCR - INCR burst type is used for sequential data transfers, where addresses are accessed incrementally
from the initial address without wrapping around to the starting address.
INCR bursts are typically used for transferring consecutive data elements, like elements in an array or a
sequence of pixels in an image.
@Pallavi Thammina
• WRAP - WRAP burst type is used for circular or wrapped data transfers, where the address wraps around
to the starting address after reaching a certain boundary, allowing continuous circular access to the data.
WRAP bursts are commonly used in circular buffers or queues, where data needs to be continuously
processed without the need for additional address computations.
Suppose we have a circular buffer with a size of 16 bytes, and the memory addresses range from 0x0000
to 0x000F. When accessing this buffer, the memory address will "wrap around" back to the starting
address (0x0000) once it reaches the maximum address (0x000F).
18. Lower and Upper boundary wrap calculation by giving starting addr=0x24, length=8, transfer
size=32bits
1)Lower boundary = [int(starting addr)/(awsize*awlen)]*[(awsize*awlen)]
2)Upper boundary=(lower boundary + total no. of transfers)
3)Total No. of transfers = awsize * awlen
20. Write an assertion on handshake signals - ready and valid, ready comes after 5 cycles
from the start of valid h i g h ?
Property valid_b_ready;
@(posedge clk) disable iff(rst)
$rose(valid)|->##5 $rose(ready);
endproperty