AMBA AXI Protocol
AMBA AXI Protocol
INTERVIEW QUESTIONS
SIMPLIFIED
Prasanthi Chanda
1. What is the purpose of BRESP and RRESP in AXI?
Example:
If a read request is made to an invalid memory address, the
slave might return RRESP = 11 (DECERR).
If a write completes successfully, BRESP = 00 (OKAY) will be
sent.
2. What is the role of WSTRB in an AXI write transaction?
Write upper 16
1100
bits only
AxCACHE MEANING
AxPROT MEANING
Use Case:
Memory protection in secure embedded systems.
Preventing unauthorized access to system registers.
5. What is the use of AWLOCK and ARLOCK?
AWLOCK and ARLOCK are used for atomic operations and exclusive
access transactions in AXI.
Bit Definition (2-bit signal)
VALUE MEANING
Key Points:
Each transaction uses two or three channels:
Write transactions: Use AW, W, and B channels.
Read transactions: Use AR and R channels.
Decoupling of channels allows high throughput (e.g., the master
can send multiple addresses before data is returned).
7. What is the purpose of AWREADY, WREADY, ARREADY,
RREADY, and BREADY?
These are handshake signals used for flow control between the
master and slave.
SIGNAL PURPOSE
Key Points:
A transaction completes only when both VALID and READY are
high at the same time.
These signals allow backpressure handling, meaning a slave can
slow down a fast master.
8. What are the different types of bursts in AXI and explain their
purpose?
AXI supports different types of burst transactions, which define
how data is transferred in multiple beats (or data units) during
a single transaction.
There are three main types of burst modes:
1. INCR (Incrementing Burst)
Description: The address is incremented by the size of the data
unit (e.g., 32-bit, 64-bit) for each beat.
Purpose: Suitable for sequential memory accesses where data is
stored in contiguous memory locations.
Example: A 4-beat transaction in an INCR burst will have
addresses incremented by the size of each data unit.
2. WRAP (Wrapped Burst)
Description: After reaching the end of the specified burst
length, the address wraps back to the starting address.
Purpose: Ideal for cache line accesses where the burst needs to
loop back to the start address.
Example: For a 4-byte burst in a 32-byte cache, after the fourth
beat, the address will wrap back to the start.
3. FIXED (Fixed Burst)
Description: The address remains constant throughout the
entire burst.
Purpose: Useful for situations like memory-mapped IO where
data is written to the same location multiple times (e.g., control
registers).
Example: Writing to the same memory location repeatedly
without changing the address.
Real Use Case:
INCR bursts are typically used in memory transfers between
processors and main memory.
WRAP bursts are used in video memory and cache controllers.
FIXED bursts are useful for control register accesses.
9. What is the significance of QOS in AXI, and how does it affect
transaction priorities?
QOS (Quality of Service) is a signal used to indicate the priority or
quality of a transaction in an AXI system, which can help prioritize
critical transactions over non-essential ones.
Function of QOS:
Defines Transaction Priority: It is typically used to prioritize
transactions based on their importance. Higher values indicate
higher priority.
Helps in Resource Allocation: In systems with limited resources,
such as bandwidth or memory, the QOS signal helps arbitrate
which transaction should be granted access to resources first.
Example of Use:
High Priority Transactions (e.g., critical data fetching for a CPU)
might be assigned a higher QOS value, ensuring that these
transactions are handled before others.
Low Priority Transactions (e.g., background memory clean-up)
may have a lower QOS value.
ADDR_PHASE: begin
WDATA <= 32'hA5A5_A5A5;
WVALID <= 1;
WSTRB <= 4'b1111;
WLAST <= (AWLEN == 0); // Last beat of burst
if (WREADY) begin
AWLEN <= AWLEN - 1;
if (AWLEN == 0) begin
state <= RESP_PHASE;
WVALID <= 0;
end
end
end
RESP_PHASE: begin
BREADY <= 1;
if (BVALID) begin
BREADY <= 0;
state <= IDLE; // Transaction complete
end
end
endcase
end
end
endmodule
12. Write a UVM-based AXI verification testbench that generates
write and read transactions.
AXI Transaction Class (UVM)
class axi_transaction extends uvm_sequence_item;
rand bit [31:0] addr;
rand bit [31:0] data;
rand bit write;
`uvm_object_utils(axi_transaction)
seq_item_port.item_done();
end
endtask
endclass
13. Write a UVM sequence to generate multiple AXI transactions
with random addresses and data.
task body();
axi_transaction txn;
for (int i = 0; i < 10; i++) begin
txn = axi_transaction::type_id::create("txn");
txn.addr = $random;
txn.data = $random;
txn.write = $random % 2; // Randomly choose read or
write
start_item(txn);
finish_item(txn);
end
endtask
endclass
14. Implement an AXI arbiter that handles two AXI masters
requesting access to a single AXI slave.
module axi_arbiter (
input logic clk,
input logic resetn,
MASTER1: begin
M1_GRANT <= 1;
M0_GRANT <= 0;
if (!M1_REQ) state <= MASTER0;
end
endcase
end
end
endmodule
uvm_analysis_port#(axi_transaction) mon_ap;
virtual axi_if vif;
INTERVIEW TIPS:
✅ Be clear and concise when explaining AXI transactions.
✅ Use diagrams to illustrate your answers in interviews.
✅ Highlight real-world debugging experiences with AXI protocols.
✅ Understand AXI timing, burst modes, and transaction
dependencies.
CONTACT DETAILS:
For the interview guidance, or any additional support, feel free to
contact ProV Logic :
Email : [email protected]
Phone : +91 91822 80927
LinkedIn : @ProV Logic