Difficulty: Easy · Puzzle 1 of 6 · Topic: AXI Protocol Puzzles
AXI4. A master wants one INCR write of 32 beats of 4 bytes starting at 0x0FC0. Is it legal? If not, split it into the fewest legal bursts: give each burst's address and AWLEN. (The Python run applies the AXI4 address rules to confirm the split.)
// AXI4 write address channel request
AWADDR = 32'h0000_0FC0;
AWBURST = 2'b01; // INCR
AWSIZE = 3'd2; // 4 bytes per beat
AWLEN = 8'd31; // 32 beatsTotal size is 128 bytes. How many bytes remain until the next 4 KB boundary at 0x1000?
1) 32 beats x 4 bytes = 128 bytes, so the burst covers 0x0FC0 to 0x103F.
2) It crosses the 4 KB boundary at 0x1000 -> illegal (a burst must never cross a 4 KB boundary).
3) Bytes before the boundary: 0x1000 - 0x0FC0 = 0x40 = 64 bytes = 16 beats.
4) Burst 1: address 0x0FC0, 16 beats, AWLEN=15. Burst 2: address 0x1000, the remaining 16 beats, AWLEN=15.Answer: Illegal as issued. Split into two INCR bursts: 0x0FC0 with AWLEN=15 and 0x1000 with AWLEN=15.
Checked by running a model of the rule in a Python model. A Python model of the AXI4 address rules (first beat may be unaligned, later beats are size-aligned) checks the split and the unaligned follow-up.
AWLEN=31 is well inside the 256-beat INCR limit, so the length alone looks fine. The rule is about the address range, so a generator that only constrains AWLEN <= 255 produces illegal bursts whenever the start address is close enough to a 4 KB boundary; and the fix is to split, not to clamp the length at a fixed 16.
For INCR with AWADDR=0x1F2C, AWSIZE=3 (8 bytes per beat), what is the largest legal AWLEN? Model answer: 26 (27 beats). The first beat transfers only 4 bytes up to the aligned address 0x1F30, then 26 aligned 8-byte beats end exactly at 0x1FFF; AWLEN=27 would cross 0x2000.