Inside an AXI Crossbar

A crossbar is the bus matrix again, built for AXI. On AXI the address, the data and the reply travel apart. So the crossbar must remember where each one belongs.

You Will Be Able To

  • Say what a crossbar must do that the bus matrix of AHB did not: remember routes.
  • Work out the tag a subordinate sees when two managers use the same ID, and how the reply gets home.
  • Explain why write data follows the address that was taken, and not the address now on the wires.
Lesson
S4.6
Time
28 min
Runs on
Your browser
Check
5 questions

Two managers write at the same moment. Both writes succeed, and every handshake is legal. Yet a byte meant for the console is now in memory. The block between them looked at an address at the wrong time.

Before You Start

This is a senior page. It stands on three lessons of the Protocols track, and does not teach them again. They are AXI in one picture, the handshake and a write on three channels. For reads, add a read on two channels.

From this module you need the decoder of Address Decode and the bus matrix of Many Managers.

Five questions this page answers
Question
1What must a crossbar do that the bus matrix of AHB did not have to do?
2Two managers both use ID 01. How do their requests stay apart on the subordinate side?
3A reply carries no address. How does it find the manager that asked?
4Write data carries no address either. How does the crossbar know where it goes?
5Which order does the crossbar still owe a manager after it has changed the IDs?

The Idea: A Crossbar Remembers Routes

In the bus matrix, each manager had its own way in, and each subordinate had its own arbiter. An AXI crossbar is the same grid. Two managers with different destinations are served in the same cycles.

AHB made the way back easy. A manager had one transfer in its data phase, so the answer on the wires was the answer to that transfer. AXI gives this up on purpose. A request and its reply are separate handshakes, and many cycles can lie between them. A manager may send a second request while the first is still outstanding: sent, and not yet answered.

So the crossbar has a new job. It must remember a route for everything that travels without an address. A reply has no address on it. Write data has no address on it either.

The crossbar can learn a route at one moment only: the handshake of the address. Whatever it does not store at that edge is gone.

New Words

New words on this page
WordMeaning
EntranceThe port of one manager on the crossbar. It decodes the addresses of that manager.
CrossbarA bus matrix for AXI: an entrance for each manager, an arbiter at each subordinate, and a store of routes.
Stored routeThe remembered answer to "which subordinate?" or "which manager?" for one request.
OutstandingSent, and not yet answered.
TagThe ID as a subordinate sees it: the number of the entrance, placed in front of the manager's own ID.

The five channels of AXI are taught in the Protocols lessons listed above. This table is a reminder of their names, and of the three signal names this page uses.

A reminder of AXI names
NameWhat it is
AWthe channel for a write address, from manager to subordinate
Wthe channel for write data
Bthe channel for the reply to a write
ARthe channel for a read address
Rthe channel for read data, which is also the reply to a read
AWADDRthe address wires of the AW channel
ARIDthe ID that a manager puts on a read address
RIDthe ID that comes back with the read data

A handshake is one clock edge with two wires of a channel at 1. They are VALID, the wire of the sender, and READY, the wire of the receiver.

One Picture: Entrances, Routes and Tags

Two Entrances, Two Subordinates, and the Routes BetweenStep through the picture. Two managers send a request at the same edge, and both use ID 01.
  • Processor
  • Peripheral
  • Bus
  • Memory
Two Entrances, Two Subordinates, and the Routes BetweenStep through the picture. Two managers send a request at the same edge, and both use ID 01. component Manager 0 the processor: labelsits request with ID01 component Manager 1 DMA: also labels itsrequest with ID 01 component Entrance 0 decodes theaddresses of manager0, and stores itsroutes component Entrance 1 decodes theaddresses of manager1, and stores itsroutes component Console register a subordinate: oneregister at0x1000_0000 component SRAM word a subordinate: oneword at0x8000_0000 request, ID 01request, ID 01tag 001tag 101the other routethe other routereply, tag 001reply, tag 101
  1. component Manager 0the processor: labels its request with ID 01
    • request, ID 01 → Entrance 0
  2. component Manager 1DMA: also labels its request with ID 01
    • request, ID 01 → Entrance 1
  3. component Entrance 0decodes the addresses of manager 0, and stores its routes
    • tag 001 → Console register
    • the other route → SRAM word
  4. component Entrance 1decodes the addresses of manager 1, and stores its routes
    • tag 101 → SRAM word
    • the other route → Console register
  5. component Console registera subordinate: one register at 0x1000_0000
    • reply, tag 001 → Entrance 0
  6. component SRAM worda subordinate: one word at 0x8000_0000
    • reply, tag 101 → Entrance 1
  1. An entrance for each manager

    Each manager has its own entrance, with its own decoder. Nothing is shared up to this point, so both can send an address at the same edge.

  2. Four possible routes

    Each entrance can reach each subordinate. The address picks one route at the handshake, and the entrance stores that choice.

  3. The same ID twice

    Both managers chose ID 01. The crossbar puts the entrance number in front: 0 and 01 give 001, 1 and 01 give 101.

  4. The way back

    A reply carries its tag and no address. The first bit names the entrance. The crossbar removes that bit, and each manager sees ID 01 again.

  5. Write data

    Write data carries no address and no ID. It goes down the route its entrance stored when the address was taken.

Read the diagram as text
  • Manager 0: the processor: labels its request with ID 01
  • Manager 1: DMA: also labels its request with ID 01
  • Entrance 0: decodes the addresses of manager 0, and stores its routes
  • Entrance 1: decodes the addresses of manager 1, and stores its routes
  • Console register: a subordinate: one register at 0x1000_0000
  • SRAM word: a subordinate: one word at 0x8000_0000
  • Manager 0 → Entrance 0: request, ID 01
  • Manager 1 → Entrance 1: request, ID 01
  • Entrance 0 → Console register: tag 001
  • Entrance 1 → SRAM word: tag 101
  • Entrance 0 → SRAM word: the other route
  • Entrance 1 → Console register: the other route
  • Console register → Entrance 0: reply, tag 001
  • SRAM word → Entrance 1: reply, tag 101

Each arrow stands for a group of wires. The arbiters at the two subordinates are the subject of the next lesson and are not drawn.

Read the picture from left to right for a request, and from right to left for its reply. The two directions use different knowledge. The request is steered by its address. The reply is steered by its tag.

The Smallest Example, Worked by Hand: Tags and a Stored Route

Each manager has two bits of ID. The crossbar has two entrances, so one more bit is enough to tell them apart. That bit goes in front.

From an ID to a tag, and back
EntranceID from the managerTag at the subordinateReply tagGoes to entranceID given back
001001001001
101101101101
110110110110

The first two rows are the point. Both managers chose 01, and the subordinates still see two different tags. So the ID is always wider on the subordinate side than on the manager side.

Now the write. Manager 0 writes the byte 68 to the console. As soon as its address is taken, it shows its next address, which is in SRAM.

One write of manager 0, cycle by cycle
CycleHandshake on AWAWADDR on the wiresHandshake on WRoute stored in entrance 0
1yesthe consolenoconsole (stored at this edge)
2noSRAM: the next address, shown earlyyes: data 68console

The data of cycle 2 belongs to the address of cycle 1. A crossbar that decodes the wires in cycle 2 sends 68 to SRAM. A crossbar that uses its stored route sends it to the console.

The Rules

  1. Rule 1: An entrance decodes an address at its handshake, and stores the route.

    The AW handshake fixes where the write data will go. The AR handshake fixes who must get the reply.

  2. Rule 2: The crossbar puts the entrance number in front of the ID.

    Managers need not know each other. Two of them can use the same ID, and their requests still differ at the subordinate.

  3. Rule 3: A reply goes to the entrance its tag names, and the added bits are removed.

    The manager gets back exactly the ID it sent.

  4. Rule 4: Write data follows the stored route of the oldest address that still waits for data.

    The W channel has no address and, since AXI4, no ID. Only the order of the addresses says whose data it is.

  5. Rule 5: Replies with one ID reach a manager in the order of its requests.

    This holds even when the requests went to different subordinates. Changing the IDs inside the crossbar does not remove this duty.

Sources for These Rules

Arm AMBA AXI Protocol Specification, document IHI 0022, issue L. The handshake: section A2.3. Transaction IDs, and order within one ID: sections A5.1 and A5.3. The bits an interconnect adds to an ID, and their removal on the way back: section A5.4. Write data in the order of the write addresses: section A5.5. Replies with one ID from different subordinates in request order: sections A5.5 and A5.6. Any change to an ID must keep the order of the original ID: section A5.3.6.

The ID on write data existed in AXI3 only. See the Arm AMBA AXI and ACE Protocol Specification, IHI 0022, issue H.c, sections A2.3 and A5.1.

The specification says that bits are added and removed. Where they sit, and how many, is the choice of each crossbar. This lab puts one bit in front of two.

Now Run It

The lab at the end of this page has two managers, both test code, and two subordinates of one word each. In its output, m0 and m1 are the two managers. Each row is one handshake: the edge, the channel, the manager and what crossed.

Printed by the lab. The name target_tag is the tag stored at the subordinate, in binary. The name rid is the ID the manager gets back. A row with resp=00 is a read that succeeded.
e0 AW m0 addr=10000000
e0 AW m1 addr=80000000
e1 W  m0 data=00000068
e1 W  m1 data=000000d1
e3 B  m0 resp=00
e3 B  m1 resp=00
e4 AR m0 addr=10000000
e4 AR m1 addr=80000000
e6 R  m0 target_tag=001 rid=01 data=00000068 resp=00
e6 R  m1 target_tag=101 rid=01 data=000000d1 resp=00

Rule 1 at work: e0 has two AW rows. Both entrances take an address at the same edge, and each stores its own route.

Rule 4 at work: right after e0 the test code changes the AW address of m0 to SRAM. At e1 it sends the data 68. The read of the console at e4 comes back at e6 with 68. The byte went down the stored route, not to the address on the wires.

Rules 2 and 3 at work: both managers send ID 01 at e4. The two e6 rows show the tags 001 and 101 at the subordinates. Both managers get rid=01 back.

The run goes on after e6. Those rows show two managers that want the same subordinate. They belong to the next lesson.

This lab leaves things out. Each entrance allows one read and one write at a time, so rule 5 is never put to the test here. Every request is a single transfer. The managers are test code, which a later track replaces with real blocks.

Why It Is Built This Way

Design choiceThe alternativeWhat the choice buys, and costs
Store the route at the address handshakeDecode the address wires whenever data arrivesA manager is free to show its next address early. It costs a small store in each entrance.
Entrance number in front of the IDMake all managers agree on different IDsEach manager is designed alone and can be reused in another chip. The ID grows wider toward the subordinates.
No ID on write dataAn ID on every piece of write data, as AXI3 hadFewer wires and simpler subordinates. Data must come in the order of its addresses, so one stalled write holds up the next.

The second row has a limit worth knowing. The tag must fit through the narrowest port on its way. A subordinate with too few ID bits cannot sit behind this crossbar without a converter.

The Trap: The Address on the Wires

Back to the byte in the wrong device. The crossbar worked for months. In every test, the manager kept its address still until the data had gone. Decoding the wires at the data handshake gave the right answer every time.

Then a faster manager arrived. It showed its next address as soon as the first was taken, which the rules allow. The data of the first write now met the address of the second. One byte for the console landed in memory, and nothing reported an error.

When a write lands in the wrong place on AXI, do not start at the data. Find the edge where its address was taken, and ask what the crossbar stored there.

At Scale

This page2 entrances, 2 subordinates
A large chipdozens of entrances, several requests outstanding at each

This section looks ahead. Two entrances and one write at a time are easy to follow. A large crossbar has many entrances, and several requests outstanding at each.

  1. Count every entrance

    A debug port is an entrance too. Each one adds to the bits in front of the ID. Check the narrowest ID port on the whole way.

  2. A queue of routes

    With two addresses taken and no data yet, the entrance needs both routes, in order. The debug problem of this lesson starts from such a queue.

  3. Order across subordinates

    Rule 5 is the hard one at scale. The Protocols track takes it in three steps: one ID, different IDs and reads against writes.

  4. The hardware

    The return path is a wide multiplexer steered by the tag. A later track builds it in muxes and crossbars at scale.

Try It

Run the lab. For each of the first ten rows, say which entrance and which subordinate it involves.

In the test code, give the second manager another ID: change arid[1]=1 to arid[1]=2. Predict both e6 rows, then run.

Find the line of the test code that changes the write address of m0 after e0. Say why the byte 68 still reaches the console.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: e0 AW m0 addr=10000000 e0 AW m1 addr=80000000 e1 W m0 data=00000068 e1 W m1 data=000000d1 e3 B m0 resp=00 e3 B m1 resp=00 e4 AR m0 addr=10000000 e4 AR m1 addr=80000000 e6 R m0 target_tag=001 rid=01 data=00000068 resp=00 e6 R m1 target_tag=101 rid=01 data=000000d1 resp=00 e7 AR m0 addr=80000000 e7 AR m1 addr=80000000 e9 R m0 target_tag=001 rid=01 data=000000d1 resp=00 e11 R m1 target_tag=101 rid=01 data=000000d1 resp=00 e12 AR m0 addr=10007000 e14 R m0 target_tag=001 rid=01 data=00000000 resp=11
Read included file: axi_pair.sv
// Two AXI4-Lite manager ports, two one-word register targets and a default.
// Protection is fixed by the BFM. TAG_READ adds a single-beat AXI read-ID path.
// Each port admits one read and one write at a time. Each target arbitrates
// locally. Its read response register holds the payload until the owner takes it.
module axi_pair #(parameter bit TAG_READ = 0) (
  input logic clk, reset_n,
  input logic [1:0] awvalid, wvalid, bready, arvalid, rready,
  output logic [1:0] awready, wready, bvalid, arready, rvalid,
  input logic [31:0] awaddr[0:1],
  input logic [31:0] wdata[0:1],
  input logic [31:0] araddr[0:1],
  input logic [3:0] wstrb[2],
  input logic [1:0] arid[2],
  output logic [1:0] rid[0:1],
  output logic [1:0] rresp[0:1],
  output logic [1:0] bresp[0:1],
  output logic [31:0] rdata[2]
);
  function automatic logic [1:0] decode(input logic [31:0] address);
    case (address)
      32'h10000000: return 0; // console scratch word in this experiment
      32'h80000000: return 1; // first SRAM word
      default: return 2;
    endcase
  endfunction

  logic [1:0] have_aw, have_w, queued, reading;
  logic [1:0] write_target[2], read_target[2], local_id[2];
  logic [31:0] payload[2], word_q[2];
  logic [3:0] lanes[2];
  logic [2:0] occupied;
  logic lite_owner[3];
  logic [2:0] tag[3];
  logic [31:0] reply[3];
  wire owner[3];
  for (genvar t=0; t<3; t++)
    assign owner[t] = TAG_READ ? tag[t][2] : lite_owner[t];

  assign awready = ~have_aw & ~bvalid;
  assign wready = ~have_w & ~bvalid;
  assign arready = ~reading;

  always_comb begin
    rvalid = 0;
    for (int m=0; m<2; m++) begin
      rid[m] = 0;
      rresp[m] = 0;
      rdata[m] = 0;
    end
    for (int t=0; t<3; t++) begin
      if (occupied[t]) begin
        rvalid[owner[t]] = 1;
        rdata[owner[t]] = reply[t];
        rid[owner[t]] = TAG_READ ? tag[t][1:0] : 0;
        rresp[owner[t]] = t == 2 ? 2'b11 : 0;
      end
    end
  end

  always_ff @(posedge clk) begin
    if (!reset_n) begin
      have_aw <= 0;
      have_w <= 0;
      bvalid <= 0;
      queued <= 0;
      reading <= 0;
      occupied <= 0;
      word_q[0] <= 0;
      word_q[1] <= 0;
    end else begin
      for (int m=0; m<2; m++) begin
        if (awvalid[m] && awready[m]) begin
          write_target[m] <= decode(awaddr[m]);
          have_aw[m] <= 1;
        end
        if (wvalid[m] && wready[m]) begin
          payload[m] <= wdata[m];
          lanes[m] <= wstrb[m];
          have_w[m] <= 1;
        end
        if (bvalid[m] && bready[m]) bvalid[m] <= 0;
        if (arvalid[m] && arready[m]) begin
          read_target[m] <= decode(araddr[m]);
          local_id[m] <= arid[m];
          queued[m] <= 1;
          reading[m] <= 1;
        end
      end
      for (int t=0; t<3; t++) begin
        logic wrote, issued;
        wrote = 0;
        issued = 0;
        if (occupied[t] && rready[owner[t]]) begin
          occupied[t] <= 0;
          reading[owner[t]] <= 0;
        end
        // Fixed port order resolves ties independently at each target.
        for (int m=0; m<2; m++) begin
          if (!wrote && have_aw[m] && have_w[m] && write_target[m] == t) begin
            wrote = 1;
            if (t < 2)
              for (int b=0; b<4; b++)
                if (lanes[m][b]) word_q[t][8*b+:8] <= payload[m][8*b+:8];
            bresp[m] <= t == 2 ? 2'b11 : 0;
            bvalid[m] <= 1;
            have_aw[m] <= 0;
            have_w[m] <= 0;
          end
          if (!occupied[t] && !issued && queued[m] && read_target[m] == t) begin
            issued = 1;
            occupied[t] <= 1;
            queued[m] <= 0;
            lite_owner[t] <= m[0];
            tag[t] <= {m[0],local_id[m]};
            reply[t] <= t < 2 ? word_q[t] : 0;
          end
        end
      end
    end
  end
endmodule

Check Yourself

Predict the outputThe test code is changed. The last read now comes from m1, with ID 2, and asks for the SRAM word. That word holds d1. The row keeps the form of the other R rows. What is the last line the lab prints?
module tb;
  parameter bit TAG_READ = 1;
  bit clk, reset_n;
  always #5 clk = !clk;
  logic [1:0] awvalid=0, wvalid=0, bready=3, arvalid=0, rready=3;
  wire [1:0] awready, wready, bvalid, arready, rvalid;
  logic [31:0] awaddr[2], wdata[2], araddr[2];
  logic [3:0] wstrb[2];
  logic [1:0] arid[2];
  wire [1:0] rid[2], rresp[2], bresp[2];
  wire [31:0] rdata[2];
  axi_pair #(TAG_READ) fabric(.*);
  int edge_no;
  task automatic tick;
    @(posedge clk);
    for (int m=0; m<2; m++) begin
      if (awvalid[m] && awready[m]) $display("e%0d AW m%0d addr=%08h",edge_no,m,awaddr[m]);
      if (wvalid[m] && wready[m]) $display("e%0d W  m%0d data=%08h",edge_no,m,wdata[m]);
      if (bvalid[m] && bready[m]) $display("e%0d B  m%0d resp=%b",edge_no,m,bresp[m]);
      if (arvalid[m] && arready[m]) $display("e%0d AR m%0d addr=%08h",edge_no,m,araddr[m]);
      if (rvalid[m] && rready[m]) begin
        if (TAG_READ)
          $display("e%0d R  m%0d target_tag=%03b rid=%02b data=%08h resp=%b",
            edge_no,m,fabric.tag[fabric.read_target[m]],rid[m],rdata[m],rresp[m]);
        else $display("e%0d R  m%0d data=%08h resp=%b",edge_no,m,rdata[m],rresp[m]);
      end
    end
    @(negedge clk);
    edge_no++;
  endtask
  initial begin
    @(negedge clk);
    reset_n=1;
    awaddr[0]='h10000000; awaddr[1]='h80000000;
    wdata[0]='h68; wdata[1]='hd1; wstrb[0]=1; wstrb[1]=15;
    awvalid=3; tick();
    awvalid=0; awaddr[0]='h80000000; wvalid=3; tick();
    wvalid=0; repeat (2) tick();
    araddr[0]='h10000000; araddr[1]='h80000000;
    arid[0]=1; arid[1]=1; arvalid=3; tick();
    arvalid=0; repeat (2) tick();
    // Both managers now want SRAM. The second request stays queued.
    araddr[0]='h80000000; arvalid=3; tick();
    arvalid=0; repeat (4) tick();
    arid[1]=2; arvalid=2; tick();
    arvalid=0; repeat (2) tick();
    $finish;
  end
endmodule
Read included file: axi_pair.sv
// Two AXI4-Lite manager ports, two one-word register targets and a default.
// Protection is fixed by the BFM. TAG_READ adds a single-beat AXI read-ID path.
// Each port admits one read and one write at a time. Each target arbitrates
// locally. Its read response register holds the payload until the owner takes it.
module axi_pair #(parameter bit TAG_READ = 0) (
  input logic clk, reset_n,
  input logic [1:0] awvalid, wvalid, bready, arvalid, rready,
  output logic [1:0] awready, wready, bvalid, arready, rvalid,
  input logic [31:0] awaddr[0:1],
  input logic [31:0] wdata[0:1],
  input logic [31:0] araddr[0:1],
  input logic [3:0] wstrb[2],
  input logic [1:0] arid[2],
  output logic [1:0] rid[0:1],
  output logic [1:0] rresp[0:1],
  output logic [1:0] bresp[0:1],
  output logic [31:0] rdata[2]
);
  function automatic logic [1:0] decode(input logic [31:0] address);
    case (address)
      32'h10000000: return 0; // console scratch word in this experiment
      32'h80000000: return 1; // first SRAM word
      default: return 2;
    endcase
  endfunction

  logic [1:0] have_aw, have_w, queued, reading;
  logic [1:0] write_target[2], read_target[2], local_id[2];
  logic [31:0] payload[2], word_q[2];
  logic [3:0] lanes[2];
  logic [2:0] occupied;
  logic lite_owner[3];
  logic [2:0] tag[3];
  logic [31:0] reply[3];
  wire owner[3];
  for (genvar t=0; t<3; t++)
    assign owner[t] = TAG_READ ? tag[t][2] : lite_owner[t];

  assign awready = ~have_aw & ~bvalid;
  assign wready = ~have_w & ~bvalid;
  assign arready = ~reading;

  always_comb begin
    rvalid = 0;
    for (int m=0; m<2; m++) begin
      rid[m] = 0;
      rresp[m] = 0;
      rdata[m] = 0;
    end
    for (int t=0; t<3; t++) begin
      if (occupied[t]) begin
        rvalid[owner[t]] = 1;
        rdata[owner[t]] = reply[t];
        rid[owner[t]] = TAG_READ ? tag[t][1:0] : 0;
        rresp[owner[t]] = t == 2 ? 2'b11 : 0;
      end
    end
  end

  always_ff @(posedge clk) begin
    if (!reset_n) begin
      have_aw <= 0;
      have_w <= 0;
      bvalid <= 0;
      queued <= 0;
      reading <= 0;
      occupied <= 0;
      word_q[0] <= 0;
      word_q[1] <= 0;
    end else begin
      for (int m=0; m<2; m++) begin
        if (awvalid[m] && awready[m]) begin
          write_target[m] <= decode(awaddr[m]);
          have_aw[m] <= 1;
        end
        if (wvalid[m] && wready[m]) begin
          payload[m] <= wdata[m];
          lanes[m] <= wstrb[m];
          have_w[m] <= 1;
        end
        if (bvalid[m] && bready[m]) bvalid[m] <= 0;
        if (arvalid[m] && arready[m]) begin
          read_target[m] <= decode(araddr[m]);
          local_id[m] <= arid[m];
          queued[m] <= 1;
          reading[m] <= 1;
        end
      end
      for (int t=0; t<3; t++) begin
        logic wrote, issued;
        wrote = 0;
        issued = 0;
        if (occupied[t] && rready[owner[t]]) begin
          occupied[t] <= 0;
          reading[owner[t]] <= 0;
        end
        // Fixed port order resolves ties independently at each target.
        for (int m=0; m<2; m++) begin
          if (!wrote && have_aw[m] && have_w[m] && write_target[m] == t) begin
            wrote = 1;
            if (t < 2)
              for (int b=0; b<4; b++)
                if (lanes[m][b]) word_q[t][8*b+:8] <= payload[m][8*b+:8];
            bresp[m] <= t == 2 ? 2'b11 : 0;
            bvalid[m] <= 1;
            have_aw[m] <= 0;
            have_w[m] <= 0;
          end
          if (!occupied[t] && !issued && queued[m] && read_target[m] == t) begin
            issued = 1;
            occupied[t] <= 1;
            queued[m] <= 0;
            lite_owner[t] <= m[0];
            tag[t] <= {m[0],local_id[m]};
            reply[t] <= t < 2 ? word_q[t] : 0;
          end
        end
      end
    end
  end
endmodule
ConceptWhat must a crossbar do that the bus matrix of AHB did not have to do?
ConceptManager 1 sends ID 01 through a crossbar with two entrances. Which tag does the subordinate see?
ConceptThe address of a write to the console has been taken. Before its data goes, the manager shows an SRAM address on AW. Where does the data go?
ConceptAfter the crossbar has widened the IDs, what does it still owe each manager?

Common Mistakes

Wrong Pick the subordinate from the address wires when the write data arrives.

By then the wires may show the next address.

Fix Use the route stored at the handshake of the write address.

Wrong Treat an ID as a name that is unique in the whole chip.

Two managers may choose the same ID.

Fix Keep the entrance number with the ID until the reply is home.

Wrong Assume that new IDs inside the crossbar free it from the order of replies.

The manager still expects the order of its own ID.

Fix Return replies with one original ID in the order of their requests.

Remember

  • A crossbar is a bus matrix for AXI, and its new job is to remember routes.
  • An entrance decodes an address at its handshake and stores the route.
  • The entrance number goes in front of the ID, so equal IDs from two managers stay apart.
  • A reply is steered by its tag, and the manager gets its own ID back.
  • Write data has no address and no ID: it follows the stored route of the oldest waiting address.

Practice

Report a problem with this page