Coherent Interconnects: ACE and CHI in One Picture

A snoop bus works for two caches. A chip with dozens of caching agents needs a fabric that knows where each line lives. Follow one read through ACE, then CHI, and see what the home node is for.

You Will Be Able To

  • Name the snoop channels ACE adds to AXI and the node types and channels of CHI.
  • Order the messages of a coherent read that finds the line dirty in another cache.
  • Explain why a home node must snoop before it trusts memory.
Lesson
S9.4
Time
30 min
Runs on
Your browser
Check
5 questions

In S9.3 every cache watched one bus. Picture forty caches there, each checking its tags for every miss anyone makes, and almost always answering "not here".

ACE answers by adding snoop channels to AXI, and CHI by sending messages to a home node. Follow one read through both.

Before You Start

This lesson is senior material, and it is not yet rebuilt in the form of the lessons before it. It uses many names of two Arm specifications without defining each one.

You need Cache Coherence: MSI and MESI: the states of a line, snooping, and the holder of a dirty copy that answers in place of memory.

You need AXI: its five channels and the handshake on each. The Protocols track teaches them in AXI in One Picture and the three lessons after it. Inside an AXI Crossbar shows how an interconnect joins them.

Every Manager Is a Party

Start with ap_soc. Its AHB-Lite fabric has no snoop channels, and today no manager has a cache, so all of them see SRAM directly. Give the processor a data cache, and one DMA write leaves its copy old without anyone knowing.

A Second Manager Reaches SRAMStep along the DMA path. Every manager that reaches SRAM is a party the coherence rules must cover.
A Second Manager Reaches SRAMManagers connect to the AHB-Lite backbone. A bridge connects its peripheral window to APB. Arrows show request or signal direction. Dashed lines distribute clock and reset. ap_soc v1.0 Interrupt requests AHB-Lite fabric. AHB-Lite fabric AHB-Lite fabric APB peripheral bus. APB peripheral bus APB peripheral bus ap_rv32. Issues instruction fetches, loads and stores. ap_rv32Processor JTAG debug. Provides external debug access to the core and fabric. JTAG debug AHB-to-APB bridge. Accepts AHB transfers and issues APB peripheral accesses. AHB-to-APB bridge ap_crg. Distributes clocks and resets. ap_crgClock / reset Power control. Sequences supply domains. Power control Pin mux. Selects the peripheral function connected to each pad. Pin mux Boot ROM. Reset vector and boot code. Boot ROM4 KiB ap_clint. Core-local timer and software interrupts. ap_clint ap_plic. Platform interrupt controller, 16 sources. ap_plic UART0. Serial console. UART0 GPIO. 16 general-purpose pins. GPIO Timer / PWM. Timer and pulse-width modulation. Timer / PWM Watchdog. Watchdog reset control. Watchdog ap_sysctl. Chip ID, reset cause, clock control, pin mux and straps. ap_sysctl SPI. SPI controller. SPI DMA. DMA control registers; transfers use its AHB manager port. DMA SRAM. Program and data memory. SRAM64 KiB CLK. Package connection. CLK RST. Package connection. RST JTAG. Package connection. JTAG UART TX. Package connection. UART TX UART RX. Package connection. UART RX GPIO pins. Package connection. GPIO pins
A Second Manager Reaches SRAMManagers connect to the AHB-Lite backbone. A bridge connects its peripheral window to APB. Arrows show request or signal direction. Dashed lines distribute clock and reset. ap_soc v1.0 AHB-Lite fabric. AHB-Lite fabric AHB-Lite fabric APB peripheral bus. APB peripheral bus APB peripheral bus ap_rv32. Issues instruction fetches, loads and stores. ap_rv32Processor JTAG debug. Provides external debug access to the core and fabric. JTAG debug AHB-to-APB bridge. Accepts AHB transfers and issues APB peripheral accesses. AHB-to-APB bridge ap_crg. Distributes clocks and resets. ap_crgClock / reset Power control. Sequences supply domains. Power control Pin mux. Selects the peripheral function connected to each pad. Pin mux Boot ROM. Reset vector and boot code. Boot ROM4 KiB ap_clint. Core-local timer and software interrupts. ap_clint ap_plic. Platform interrupt controller, 16 sources. ap_plic UART0. Serial console. UART0 GPIO. 16 general-purpose pins. GPIO Timer / PWM. Timer and pulse-width modulation. Timer / PWM Watchdog. Watchdog reset control. Watchdog ap_sysctl. Chip ID, reset cause, clock control, pin mux and straps. ap_sysctl SPI. SPI controller. SPI DMA. DMA control registers; transfers use its AHB manager port. DMA SRAM. Program and data memory. SRAM64 KiB CLK. Package connection. CLK RST. Package connection. RST JTAG. Package connection. JTAG UART TX. Package connection. UART TX UART RX. Package connection. UART RX GPIO pins. Package connection. GPIO pins
  • DMA
  • AHB-Lite fabric
  • SRAM
Read the chip as text

Managers connect to the AHB-Lite backbone. A bridge connects its peripheral window to APB. Arrows show request or signal direction. Dashed lines distribute clock and reset.

  • AHB-Lite fabric · AHB-Lite fabric
  • APB peripheral bus · APB peripheral bus
  • ap_rv32 · Issues instruction fetches, loads and stores.
  • JTAG debug · Provides external debug access to the core and fabric.
  • AHB-to-APB bridge · Accepts AHB transfers and issues APB peripheral accesses.
  • ap_crg · Distributes clocks and resets.
  • Power control · Sequences supply domains.
  • Pin mux · Selects the peripheral function connected to each pad.
  • Boot ROM · Reset vector and boot code.
  • ap_clint · Core-local timer and software interrupts.
  • ap_plic · Platform interrupt controller, 16 sources.
  • UART0 · Serial console.
  • GPIO · 16 general-purpose pins.
  • Timer / PWM · Timer and pulse-width modulation.
  • Watchdog · Watchdog reset control.
  • ap_sysctl · Chip ID, reset cause, clock control, pin mux and straps.
  • SPI · SPI controller.
  • DMA · DMA control registers; transfers use its AHB manager port.
  • SRAM · Program and data memory.
  • CLK · Package connection.
  • RST · Package connection.
  • JTAG · Package connection.
  • UART TX · Package connection.
  • UART RX · Package connection.
  • GPIO pins · Package connection.
  • CLK → ap_crg (clock)
  • RST → ap_crg (clock)
  • Power control → ap_crg (power)
  • ap_crg → ap_rv32 (clock)
  • ap_crg → AHB-Lite fabric (clock)
  • ap_crg → Boot ROM (clock)
  • ap_crg → APB peripheral bus (clock)
  • ap_clint → ap_rv32 (interrupt)
  • ap_plic → ap_rv32 (interrupt)
  • AHB-Lite fabric → ap_clint (data)
  • JTAG → JTAG debug (debug)
  • DMA → AHB-Lite fabric (data)
  • UART0 → Pin mux (data)
  • GPIO → Pin mux (data)
  • Pin mux → UART TX (data)
  • UART RX → Pin mux (data)
  • Pin mux → GPIO pins (data)
  • ap_rv32 → AHB-Lite fabric (data)
  • JTAG debug → AHB-Lite fabric (data)
  • AHB-to-APB bridge → APB peripheral bus (data)
  • AHB-Lite fabric → AHB-to-APB bridge (data)
  • AHB-Lite fabric → Boot ROM (data)
  • AHB-Lite fabric → ap_plic (data)
  • APB peripheral bus → UART0 (data)
  • APB peripheral bus → GPIO (data)
  • APB peripheral bus → Timer / PWM (data)
  • APB peripheral bus → Watchdog (data)
  • APB peripheral bus → ap_sysctl (data)
  • APB peripheral bus → SPI (data)
  • APB peripheral bus → DMA (data)
  • AHB-Lite fabric → SRAM (data)
  1. The DMA engine has no cache. CHI calls such a requester an RN-I (B1.6).
  2. ap_soc uses AHB-Lite here, with no snoop channels.
  3. The write lands in SRAM. A cached copy elsewhere is now old unless the fabric snooped it.

A coherent fabric answers one question on every request: does any cache hold a newer copy? The lab below is a model, not ap_soc RTL. Two caching requesters, a home and memory print each message by its specification name.

Both specifications use five full states (ACE D1.2.3, CHI B4.1). UC and UD are unique, SC and SD may be shared, and I is invalid. D means dirty. CHI adds partial and empty states, left out here.

Set beside S9.3, UC behaves like MESI's E and UD like its M. That comparison is ours, not the specifications'. One difference: an SC copy may differ from memory while another cache holds the line SD.

Snoop Channels Added to AXI

In S9.3 every cache heard every command, because all of them shared one bus. AXI has no such path, so ACE adds three channels for each caching manager (D1.3.2). AC brings a snoop address in, CR carries the one response every snoop needs, and the optional CD carries snooped data out.

The read data gains two response bits (D3.2.1). IsShared tells the requester to hold the line shared or unique. PassDirty tells it whether it now owes memory a write-back. RACK then tells the interconnect the read is done (D1.3.3).

Nodes and Channels in CHI

CHI drops the bus picture and sends messages between nodes (B1.6). A requester with a coherent cache is an RN-F. The home node, HN-F, owns coherence for its addresses, and memory sits behind a subordinate node, SN-F.

Every request for a line meets at its home, so one place decides the order and the snoops. The home is the point of coherence and is expected to be the point of serialisation (B1.3, B1.6). Messages use four channels: REQ, SNP, RSP for responses without data, and DAT (B2.1).

QuestionACE (IHI 0022H.c)CHI (IHI 0050 issue G)
Who decides what to snoop?The interconnectThe home node, the point of coherence
How does the snoop arrive?AC channel into each caching managerA snoop message on SNP
Where does snoop data go?CD channel to the interconnect onlyTo the home, or forwarded straight to the requester
How is the result reported?RRESP bits IsShared and PassDirtyThe state in the response, such as CompData_SC
How does the requester finish?RACKCompAck on RSP

ACE sections D1.3, D3.2.1 and D3.7; CHI sections B1.6, B1.7 and B2.1.

A Read That Needs a Snoop

In the CHI view, RN-F1 takes the line with ReadUnique, then stores 5a with no message. A store to a Unique line is silent (B4.6), so memory still holds 00.

Icarus, VIEW = 0.
t1  RN-F1 -> HN-F  REQ ReadUnique
t2  HN-F  -> RN-F0 SNP SnpUnique
t3  RN-F0 -> HN-F  RSP SnpResp_I
t4  HN-F  -> SN-F  REQ ReadNoSnp
t5  SN-F  -> RN-F1 DAT CompData_UC data=00
t6  RN-F1 -> HN-F  RSP CompAck
after the store: RN-F0=I RN-F1=UD memory=00
t7  RN-F0 -> HN-F  REQ ReadShared
t8  HN-F  -> RN-F1 SNP SnpShared
t9  RN-F1 -> HN-F  DAT SnpRespData_SC_PD data=5a
t10 HN-F  -> RN-F0 DAT CompData_SC data=5a
t11 RN-F0 -> HN-F  RSP CompAck
t12 HN-F  -> SN-F  REQ WriteNoSnp
t13 SN-F  -> HN-F  RSP CompDBIDResp
t14 HN-F  -> SN-F  DAT NCBWrData data=5a
after the read: RN-F0=SC RN-F1=SC memory=5a
The Same Read in CHI TermsMessages between nodes on four channels: REQ, SNP, RSP and DAT.
  • Processor
  • Bus
  • Memory
The Same Read in CHI TermsMessages between nodes on four channels: REQ, SNP, RSP and DAT. component RN-F0 requester, holds I component HN-F home node component RN-F1 requester, holds UD component SN-F subordinate: memory ReadSharedSnpSharedSnpRespData_SC_PDCompData_SCWriteNoSnp,NCBWrData
  1. component RN-F0requester, holds I
    • ReadShared → HN-F
  2. component HN-Fhome node
    • SnpShared → RN-F1
    • CompData_SC → RN-F0
    • WriteNoSnp, NCBWrData → SN-F
  3. component RN-F1requester, holds UD
    • SnpRespData_SC_PD → HN-F
  4. component SN-Fsubordinate: memory
  1. Request

    RN-F0 sends ReadShared on REQ.

  2. Snoop

    The home sends SnpShared on SNP.

  3. Snoop data

    RN-F1 returns the line, keeps SC and passes the dirt.

  4. Completion

    CompData_SC goes to RN-F0, which answers CompAck.

  5. Clean memory

    The home writes the line to the subordinate.

Read the diagram as text
  • RN-F0: requester, holds I
  • HN-F: home node
  • RN-F1: requester, holds UD
  • SN-F: subordinate: memory
  • RN-F0 → HN-F: ReadShared
  • HN-F → RN-F1: SnpShared
  • RN-F1 → HN-F: SnpRespData_SC_PD
  • HN-F → RN-F0: CompData_SC
  • HN-F → SN-F: WriteNoSnp, NCBWrData

The S9.4 lab in CHI terms (B1.6, B2.1). The read matches the start of Figure B5.25; the clean follows Figure B5.4.

At t8 the home snoops RN-F1, which answers SnpRespData_SC_PD: here is the data, I keep SC, the dirt is yours. RN-F0 gets 5a at t10 and sends CompAck. The home now owes memory the write, paid at t12 to t14.

Two steps are our home's choices. Table B4.25 expects SnpSharedFwd for ReadShared, and B4.4.2 permits plain SnpShared instead. Table B4.46 expects UD to keep its dirt as SD; dropping to SC with PD is permitted.

Back at t5, memory sent the data straight to RN-F1: Direct Memory Transfer (B1.7). Now the same read in ACE.

Icarus, VIEW = 1, second read.
t8  M0    -> ICN   AR  ReadShared
t9  ICN   -> M1    AC  ReadShared
t10 M1    -> ICN   CR  DataTransfer=1 PassDirty=1 IsShared=1
t11 M1    -> ICN   CD  data=5a
t12 ICN   -> M0    R   data=5a IsShared=1 PassDirty=0
t13 M0    -> ICN   RACK
t14 ICN   -> MEM   AW+W write data=5a
t15 MEM   -> ICN   B   OKAY
after the read: M0=SC M1=SC memory=5a
The Read in ACE TermsAXI channels plus three snoop channels per caching manager.
  • Processor
  • Bus
  • Memory
The Read in ACE TermsAXI channels plus three snoop channels per caching manager. component Manager M0 loads, holds I component Interconnect snoops, then answers component Manager M1 holds the line UD component Memory AXI subordinate AR ReadSharedAC snoopCR + CD dataR data, IsSharedAW + W write
  1. component Manager M0loads, holds I
    • AR ReadShared → Interconnect
  2. component Interconnectsnoops, then answers
    • AC snoop → Manager M1
    • R data, IsShared → Manager M0
    • AW + W write → Memory
  3. component Manager M1holds the line UD
    • CR + CD data → Interconnect
  4. component MemoryAXI subordinate
  1. Read address

    M0 sends ReadShared on AR.

  2. Snoop

    The interconnect snoops M1 on AC.

  3. Snoop answer

    M1 answers on CR and sends the line on CD.

  4. Read data

    M0 gets the line on R with IsShared set, then raises RACK.

  5. Clean memory

    The interconnect writes the dirty line to memory.

Read the diagram as text
  • Manager M0: loads, holds I
  • Interconnect: snoops, then answers
  • Manager M1: holds the line UD
  • Memory: AXI subordinate
  • Manager M0 → Interconnect: AR ReadShared
  • Interconnect → Manager M1: AC snoop
  • Manager M1 → Interconnect: CR + CD data
  • Interconnect → Manager M0: R data, IsShared
  • Interconnect → Memory: AW + W write

Architecture drawing of the S9.4 lab in ACE terms (IHI 0022H.c, D1.3 and D5.3.2).

The order matches: the request at t8, the snoop at t9, the answer at t10 and t11, then R, RACK and the write. But ACE snoop data always goes to the interconnect on CD, which returns it on R (D1.3.4). CHI can skip that hop.

Let the Owner Send the Data

In the CHI run, 5a crossed the fabric twice, at t9 and t10. Direct Cache Transfer cuts a hop (B1.7). The home sends one RN-F a forwarding snoop, such as SnpSharedFwd, naming the requester (B4.4.1). That cache sends CompData to the requester and a snoop response to the home. CompAck still goes to the home.

Snoop response names follow one pattern (B4.5.3). SnpResp carries no data and uses RSP. SnpRespData carries the line to the home on DAT. Then come the state the cache keeps, _PD if it passes the dirt, and _Fwded_ with the state it forwarded.

Must the line go to the home? For a plain snoop, dirty data always does, Shared Clean data only when RetToSrc is set, and Unique Clean data may. For a forwarding snoop with RetToSrc clear, clean data never does. Dirty data does only when the dirt can neither stay nor travel with the copy (B4.9).

For SnpShared, Table B4.46 expects the cache to give up only uniqueness. UC becomes SC, and UD becomes SD unless DoNotGoToSD is set (B4.10). S9.4.1 asks you to build both forwarding flows from these rules.

Why the Home Snoops First

Suppose the home skipped t8 and read memory at once. RN-F0 would fill with 00 while RN-F1 held 5a: the S9.3 bug, one level up. So the home must snoop a Unique Dirty holder (B4.4.1). In Figure B5.2 it sends ReadNoSnp only after the snoop response.

To avoid snooping everyone, a home keeps a snoop filter of requesters that may hold each line (B1.6). Clean lines drop silently (B4.6), so an entry may be stale, which only wastes a snoop. Missing a holder is the real bug, and S9.4.2 hands you one.

From a Crossbar to a Packet Network

A crossbar is simple and ordered but suits few nodes. A ring trades wiring for latency, and a mesh scales by adding rows and columns of switches (B1.2). So each CHI packet carries source and target node IDs (B1.3, B3.2). A system address map turns an address into the home's node ID (B3.1), like S4.1's memory map one level up.

What the Full Specifications Add

CHI also defines exclusive accesses (B6), cache stashing (B7), DVM (B8), error handling (B9) and memory tagging (B12). A credited link layer sits below (B13, B14). ACE adds barriers and DVM messages (D1.2.1). A full CHI module belongs to the Protocols track.

At Scale

ap_soc~12 blocks
Phone-class SoChundreds of blocks

The lab has one home and two requesters. A server mesh has many homes, each owning a slice of the addresses.

  1. Spread the homes

    The address map spreads lines across several home nodes, so no single point serialises the chip.

  2. Filter the snoops

    An imprecise filter wastes snoops. A filter that misses a holder returns stale data.

  3. Shorten the path

    Direct Memory and Direct Cache Transfer send data straight to the requester, removing a hop (B1.7).

Order the Messages of a Shared Read practises the flows; A Home Node That Skips the Snoop breaks the promise.

Try It

Sources for the Flows

Arm AMBA CHI Architecture Specification, IHI 0050 issue G: B1.6, B1.7, B2.1, B4.1, B4.4, B4.5.3, B4.6, B4.9 and B4.10.

The same specification: Tables B4.25 and B4.46 and Figures B5.2 to B5.4 and B5.25.

Arm AMBA AXI and ACE Protocol Specification, IHI 0022H.c: D1.2.3, D1.3, D3.2.1 and D3.7.

The same specification: Table D5-8 for snoop responses.

Teaching choices of this model: the home with no snoop filter, the plain SnpShared and the SC end state.

The 8-bit line and the immediate memory write are teaching choices too.

Run with VIEW = 0, then VIEW = 1. Match each CHI line to its ACE line.

Find the message that tells the home RN-F1 kept a copy. Which part of its name says so?

Remove the store that makes RN-F1 Unique Dirty and run again. Which path does the read take now?

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: t1 RN-F1 -> HN-F REQ ReadUnique t2 HN-F -> RN-F0 SNP SnpUnique t3 RN-F0 -> HN-F RSP SnpResp_I t4 HN-F -> SN-F REQ ReadNoSnp t5 SN-F -> RN-F1 DAT CompData_UC data=00 t6 RN-F1 -> HN-F RSP CompAck after the store: RN-F0=I RN-F1=UD memory=00 t7 RN-F0 -> HN-F REQ ReadShared t8 HN-F -> RN-F1 SNP SnpShared t9 RN-F1 -> HN-F DAT SnpRespData_SC_PD data=5a t10 HN-F -> RN-F0 DAT CompData_SC data=5a t11 RN-F0 -> HN-F RSP CompAck t12 HN-F -> SN-F REQ WriteNoSnp t13 SN-F -> HN-F RSP CompDBIDResp t14 HN-F -> SN-F DAT NCBWrData data=5a after the read: RN-F0=SC RN-F1=SC memory=5a

Check Yourself

Predict the outputWhat final line does the ACE view print?
module tb;
  // VIEW 0 names each step as CHI does. VIEW 1 names the same steps in ACE.
  localparam int VIEW = 1;
  // Line states use the names both specifications share (CHI B4.1, ACE D1.2.3).
  localparam int I = 0, UC = 1, UD = 2, SC = 3;
  // Node numbers: two requesters with caches, the home in the fabric, memory.
  localparam int RN0 = 0, RN1 = 1, HOME = 2, MEM = 3;
  int state [2];
  logic [7:0] line [2];
  logic [7:0] memory = 8'h00;
  int t = 0;

  function automatic string node(int n);
    if (VIEW == 0) return n == RN0 ? "RN-F0" : n == RN1 ? "RN-F1" : n == HOME ? "HN-F" : "SN-F";
    return n == RN0 ? "M0" : n == RN1 ? "M1" : n == HOME ? "ICN" : "MEM";
  endfunction
  function automatic string name(int s);
    return s == UC ? "UC" : s == UD ? "UD" : s == SC ? "SC" : "I";
  endfunction
  task automatic say(int from, int to, string what);
    t++;
    $display("t%-2d %-5s -> %-5s %s", t, node(from), node(to), what);
  endtask
  task automatic chi(int from, int to, string what);  // printed in the CHI view only
    if (VIEW == 0) say(from, to, what);
  endtask
  task automatic ace(int from, int to, string what);  // printed in the ACE view only
    if (VIEW == 1) say(from, to, what);
  endtask

  // A read for a load. The home in this model always snoops the other
  // requester: it has no snoop filter yet.
  task automatic read_shared(int req);
    int peer = 1 - req;
    chi(req, HOME, "REQ ReadShared");
    ace(req, HOME, "AR  ReadShared");
    chi(HOME, peer, "SNP SnpShared");
    ace(HOME, peer, "AC  ReadShared");
    if (state[peer] == UD) begin
      // The dirty owner keeps a clean shared copy and passes the dirt on.
      chi(peer, HOME, $sformatf("DAT SnpRespData_SC_PD data=%02h", line[peer]));
      ace(peer, HOME, "CR  DataTransfer=1 PassDirty=1 IsShared=1");
      ace(peer, HOME, $sformatf("CD  data=%02h", line[peer]));
      state[peer] = SC;
      line[req] = line[peer];
      chi(HOME, req, $sformatf("DAT CompData_SC data=%02h", line[req]));
      ace(HOME, req, $sformatf("R   data=%02h IsShared=1 PassDirty=0", line[req]));
      state[req] = SC;
      chi(req, HOME, "RSP CompAck");
      ace(req, HOME, "RACK");
      // The home took the dirty responsibility. This model cleans at once.
      chi(HOME, MEM, "REQ WriteNoSnp");
      chi(MEM, HOME, "RSP CompDBIDResp");
      chi(HOME, MEM, $sformatf("DAT NCBWrData data=%02h", line[req]));
      ace(HOME, MEM, $sformatf("AW+W write data=%02h", line[req]));
      ace(MEM, HOME, "B   OKAY");
      memory = line[req];
    end else begin
      // Nobody else holds the line, so memory supplies it.
      chi(peer, HOME, "RSP SnpResp_I");
      ace(peer, HOME, "CR  DataTransfer=0 IsShared=0");
      chi(HOME, MEM, "REQ ReadNoSnp");
      ace(HOME, MEM, "AR  read");
      line[req] = memory;
      chi(MEM, req, $sformatf("DAT CompData_UC data=%02h", line[req]));
      ace(MEM, HOME, $sformatf("R   data=%02h", line[req]));
      ace(HOME, req, $sformatf("R   data=%02h IsShared=0 PassDirty=0", line[req]));
      state[req] = UC;
      chi(req, HOME, "RSP CompAck");
      ace(req, HOME, "RACK");
    end
  endtask

  // A read for a store from a requester whose peer holds nothing.
  task automatic read_unique(int req);
    int peer = 1 - req;
    chi(req, HOME, "REQ ReadUnique");
    ace(req, HOME, "AR  ReadUnique");
    chi(HOME, peer, "SNP SnpUnique");
    ace(HOME, peer, "AC  ReadUnique");
    chi(peer, HOME, "RSP SnpResp_I");
    ace(peer, HOME, "CR  DataTransfer=0 IsShared=0");
    chi(HOME, MEM, "REQ ReadNoSnp");
    ace(HOME, MEM, "AR  read");
    line[req] = memory;
    chi(MEM, req, $sformatf("DAT CompData_UC data=%02h", line[req]));
    ace(MEM, HOME, $sformatf("R   data=%02h", line[req]));
    ace(HOME, req, $sformatf("R   data=%02h IsShared=0 PassDirty=0", line[req]));
    state[req] = UC;
    chi(req, HOME, "RSP CompAck");
    ace(req, HOME, "RACK");
  endtask

  task automatic show(string label);
    $display("%s: %s=%s %s=%s memory=%02h", label, node(RN0), name(state[RN0]),
             node(RN1), name(state[RN1]), memory);
  endtask

  initial begin
    state[RN0] = I;
    state[RN1] = I;
    read_unique(RN1);
    line[RN1] = 8'h5a;              // a store to a Unique line needs no message
    state[RN1] = UD;
    show("after the store");
    read_shared(RN0);
    show("after the read");
  end
endmodule
ConceptWhich CHI node is the point of coherence for its addresses?
ConceptWhich ACE channel carries snooped data out of a manager?
ConceptRN-F1 holds a line UD. Which response to SnpShared keeps SC and passes the dirt?
ConceptWhy do large chips route CHI packets by node ID?

Common Mistakes

Wrong Read memory as soon as the request arrives.

A Unique Dirty copy elsewhere makes memory stale.

Fix Snoop the holder first and use its data when it returns some.

Wrong Treat a snoop filter entry as proof that a cache holds the line.

Clean lines can be dropped silently, so entries may be stale.

Fix Keep the filter a superset and expect SnpResp_I sometimes.

Wrong Expect ACE to forward data between caches.

ACE snoop data goes to the interconnect on CD.

Fix Use CHI forwarding snoops for Direct Cache Transfer.

Remember

  • ACE adds AC, CR and CD channels and the IsShared and PassDirty bits to AXI.
  • CHI sends messages between requester, home and subordinate nodes on REQ, SNP, RSP and DAT.
  • A home must snoop a Unique Dirty holder before memory may answer.

Practice

Report a problem with this page