Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c8710c5
treewide: reorganize repository and add reworked CCU
ricted98 Jun 16, 2026
e28c727
ccu_snoop_pipe: rename stall signal and fix missing default values
ricted98 Jun 18, 2025
54c37eb
ccu_snoop_pipe: add stall performance events
ricted98 Jun 18, 2025
b07d6ed
ccu_snoop_pipe: remove leftover assignments
ricted98 Jun 18, 2025
2c31fde
ccu_top: add comment about replay table
ricted98 Jun 18, 2025
345a6a5
ccu_tracker: add comments about deallocation logic
ricted98 Jun 18, 2025
e0bffe1
ccu_tracker: fix width in signal declaration
ricted98 Jun 18, 2025
ff5813e
ccu_snoop_pipe: fix formatting
ricted98 Jun 18, 2025
4e41dee
ccu_snoop_pipe: fix missing signal declaration
ricted98 Jun 18, 2025
f3a20a4
ace_pkg: fix `is_read_once` function
ricted98 Jun 19, 2025
e40383b
ccu_snoop_pipe: fix tracker allocation during ATOPs
ricted98 Jun 20, 2025
d2ed442
ccu_snoop_pipe: fix missing signals declaration
ricted98 Jun 20, 2025
dd3e67e
ccu_tracker: add performance events and empty signal
ricted98 Jun 20, 2025
330e2c9
ccu_top: rename write unit instance
ricted98 Jun 20, 2025
5bdbe89
ace_pkg: use more vendorized nomeclature for ACE util functions
ricted98 Jun 20, 2025
5158b2d
ace_pkg: fix formatting based on verible
ricted98 Jun 21, 2025
ec644f8
treewide: use ID bit to mark writebacks
ricted98 Jun 26, 2025
9005019
ccu_pkg: remove unused struct typedef
ricted98 Jun 26, 2025
de59d4e
ccu_snoop_pipe: redefine stage 1 stall event
ricted98 Jun 26, 2025
ecf3ba3
ccu_cd_ctrl: fix `r_last` in read response from CD channel
ricted98 Jun 26, 2025
02c44a2
Bender.yml: update `axi` version
ricted98 Jun 29, 2025
d049c4d
scripts: update and clean up `.do` scripts
ricted98 Jun 30, 2025
d59e699
ace_pkg: remove unused type and add RRESP encoding
ricted98 Jul 23, 2025
1913c76
ccu_cd_ctrl: use RRESP parameters to abstract encoding
ricted98 Jul 23, 2025
88c324c
ccu: add assertions
ricted98 Jul 23, 2025
0729e9b
ccu_cd_ctrl: fix typo
ricted98 Jul 23, 2025
a4c5a92
Bender.yml: update `axi` dependency to custom branch
ricted98 Jul 24, 2025
398c2a2
ccu_cd_ctrl: use `LenWidth` parameter from `axi_pkg`
ricted98 Jul 24, 2025
9ce8552
license: fix headers
ricted98 Jul 28, 2025
332f7bf
include: add custom type and `__ACE_NO_ACKS` defines
ricted98 Aug 1, 2025
a0ebfd6
src: add ACE mux and demux modules
ricted98 Aug 1, 2025
ad436d7
ccu: use ACE mux and demux modules
ricted98 Aug 1, 2025
5590f26
Bender.yml: bump `axi`
ricted98 Sep 2, 2025
87cfda3
ccu_frontend: integrate LR/SC monitor
ricted98 Sep 2, 2025
86be092
ccu_read: ensure per-master burst locking for R responses
ricted98 Sep 2, 2025
de9608a
treewide: CCU refactoring and repository cleanup
ricted98 Dec 10, 2025
5b3873c
ccu_pkg: fix `axiDataSize` computation
ricted98 Dec 12, 2025
e64cd6f
ccu_snoop_pipeline: fix AW address computation
ricted98 Dec 12, 2025
d98418f
ccu_top: fix packed array declaration
ricted98 Dec 12, 2025
1915f39
ccu_write_engine: fix signal name typo
ricted98 Dec 12, 2025
7a49003
ccu: remove shareable stall logic
ricted98 Dec 12, 2025
47d50ff
ccu_pkg: remove leftover comment
ricted98 Dec 12, 2025
fc3530b
ccu_snoop_pipeline: use `CACHE_BUFFERABLE` from `axi_pkg`
ricted98 Dec 12, 2025
7ffa878
ccu_read_engine: add decoupling fallthrough AR FIFO
ricted98 Dec 12, 2025
5281fdc
ccu_snoop_pipeline: add stub for performance events
ricted98 Dec 15, 2025
fef6d6e
ccu: add authorship comments
ricted98 Dec 15, 2025
abe5fca
ccu_snoop_pipeline: add register for performance events
ricted98 Dec 17, 2025
e6165e4
ccu: add replay support
ricted98 Dec 17, 2025
908a4c9
ccu_replay: fix hazard setting during allocation
ricted98 Dec 19, 2025
046c070
ccu_frontend: add few explanation comments
ricted98 Dec 19, 2025
21d7cbf
ccu_replay: logic bugfixes
ricted98 Feb 20, 2026
3a91065
ccu_snoop_pipeline: fix comment typo and code alignment
ricted98 Feb 20, 2026
362a572
ccu: add CSRs
ricted98 Feb 20, 2026
804505a
ccu_snoop_pipeline: avoid hardcoded values
ricted98 Feb 20, 2026
5e777ee
ccu_top: fix instance name
ricted98 Feb 20, 2026
02c5f46
pkg: refactor transaction decoding functions
ricted98 Mar 9, 2026
8c65499
ccu_snoop_pipeline: fix indentation
ricted98 Mar 9, 2026
86efac2
ccu_snoop_pipeline: fix `ACPROT` propagation
ricted98 Mar 9, 2026
903a05f
ccu_snoop_pipeline: fix missing signal declarations
ricted98 Mar 9, 2026
cb5e2e5
ccu_top, ccu_frontend: insert parametric subordinate cut
ricted98 Mar 9, 2026
a754a7c
ccu_snoop_pipeline: fix `MakeUnique` handling
ricted98 Mar 9, 2026
2490d92
ccu_csr_wrap: automate performance counters parameter computation
ricted98 Mar 9, 2026
78b142c
ccu_csr: increase performance counters number and track new events
ricted98 Mar 11, 2026
b99ef26
ccu_scoreboard: fix unwanted allocation when scoreboard is full
ricted98 Mar 11, 2026
37dcf0d
ccu_snoop_pipeline: fix stage0 stalling condition
ricted98 Mar 11, 2026
7047842
ccu_snoop_pipeline: add new performance events
ricted98 Mar 11, 2026
09f7673
ccu: fix `make*` handling
ricted98 Mar 23, 2026
15944f3
ccu: add snoop miss and hit events
ricted98 Mar 23, 2026
a260c5a
fronted: use custom arbiter
ricted98 Mar 25, 2026
6e533cc
frontend: balance pipelining
ricted98 Mar 26, 2026
ea9d068
ccu_csr: update generated code with peakrdl v1.5.0
ricted98 May 19, 2026
90bce47
ccu_frontend: fix exclusive dealloc
ricted98 May 19, 2026
8621483
README.md: cleanup
ricted98 Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 48 additions & 23 deletions Bender.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,63 @@
package:
name: ace
# Authors in alphabetical order (surname)
authors:
# Alphabetically ordered by last name (maintainers first)
- "Aleksi Korsman <aleksi.korsman@aalto.fi>"
- "Riccardo Tedeschi <riccardo.tedeschi6@unibo.it>"

dependencies:
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.39.0-beta.2 }
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.39.9 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.39.0 }
axi_riscv_atomics: { git: "https://github.com/pulp-platform/axi_riscv_atomics.git", rev: 6d3c8b4 } # branch: master
apb: { git: "https://github.com/pulp-platform/apb.git", version: 0.2.4 }

export_include_dirs:
- include

sources:
# Source files grouped in levels. Files in level 0 have no dependencies on files in this
# package. Files in level 1 only depend on files in level 0, files in level 2 on files in
# levels 1 and 0, etc. Files within a level are ordered alphabetically.
# Level 0
# Generic ACE package and interfaces
- src/ace_pkg.sv
- src/snoop_pkg.sv
# Level 1
- src/ace_intf.sv
- src/snoop_intf.sv
# Level 2
- src/ace_trs_dec.sv
- src/ccu_fsm.sv
# Level 3
- src/ace_ccu_top.sv
# CCU package
- src/ccu/ccu_pkg.sv
# CCU generated regs
- src/ccu/regs/generated/ccu_csr_pkg.sv
- src/ccu/regs/generated/ccu_csr.sv
# CCU source files
- src/ccu/ccu_csr_wrap.sv
- src/ccu/ccu_exclusive_monitor.sv
- src/ccu/ccu_frontend_arbiter.sv
- src/ccu/ccu_frontend.sv
- src/ccu/ccu_read_engine.sv
- src/ccu/ccu_replay.sv
- src/ccu/ccu_scoreboard.sv
- src/ccu/ccu_snoop_pipeline.sv
- src/ccu/ccu_top.sv
- src/ccu/ccu_write_engine.sv

- target: simulation
files:
- src/ace_test.sv
- src/snoop_test.sv
#- target: simulation
# files:
# - src/ace_test.sv
# - src/snoop_test.sv

- target: test
files:
# Level 0
- test/tb_ace_ccu_pkg.sv
# Level 1
- test/tb_ace_ccu_top.sv
#- target: test
# files:
# # Level 0
# - test/tb_ace_ccu_pkg.sv
# # Level 1
# - test/tb_ace_ccu_top.sv

#- target: vscode
# files:
# - src/ccu/ccu_ctrl_wr_snoop.sv

# - target: test
# files:
# # Level 0
# - test/vip/ace_test_pkg.sv
# - test/vip/snoop_test_pkg.sv
# # Level 1
# - test/vip/cache_test_pkg.sv
# # Level 2
# - test/tb_ace_ccu_top.sv
56 changes: 56 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,44 @@ TBS ?= ace_ccu_top \

SIM_TARGETS := $(addsuffix .log,$(addprefix sim-,$(TBS)))

####### Simulation parameters #######
# Address width
ADDR_WIDTH ?= 32
# AXI/ACE data width
DATA_WIDTH ?= 64
# Cache line word width
WORD_WIDTH ?= 64
# Number of words in a cache line
CACHELINE_WORDS ?= 4
# Number of ways in the cache model
WAYS ?= 2
# Number of sets in the cache model
SETS ?= 16
# Number of cached masters
NMASTERS ?= 4
# Number of master groups
NGROUPS ?= 2
# Number of transactions to be generated per master
NTRANSACTIONS ?= 100
# Location of the generated files
MEM_DIR ?= $(PWD)/build/mem
# Seed for initial state generation. If empty, no seed
SEED ?= 10
# Run coherency check after simulation
CHECK ?= 0
# Debug mode for coherency checking
DEBUG ?= 1

export ADDR_WIDTH
export DATA_WIDTH
export WORD_WIDTH
export CACHELINE_WORDS
export WAYS
export SETS
export NMASTERS
export NGROUPS
export NTRANSACTIONS
export MEM_DIR

.SHELL: bash

Expand Down Expand Up @@ -51,6 +89,24 @@ sim_all: $(SIM_TARGETS)
build:
mkdir -p $@

build/mem: build
mkdir -p $@

init_mem: build/mem
python3 test/vip/python/cache_coherency_test.py \
--addr_width ${ADDR_WIDTH} \
--data_width ${DATA_WIDTH} \
--word_width ${WORD_WIDTH} \
--cacheline_words ${CACHELINE_WORDS} \
--ways ${WAYS} \
--sets ${SETS} \
--n_caches ${NMASTERS} \
--n_transactions ${NTRANSACTIONS} \
--target_dir $(MEM_DIR) \
--seed $(SEED) \
$(if $(filter 1, $(CHECK)),--check) \
$(if $(filter 1, $(DEBUG)),--debug)


elab.log: Bender.yml | build
export SYNOPSYS_DC="$(SYNOPSYS_DC)"; cd build && ../scripts/synth.sh | tee ../$@
Expand Down
63 changes: 57 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,64 @@
# ACE SystemVerilog modules for cache coherent SoC design

This repository provides modules to implement cache coherence SoC's.
> 🚧 **Work in progress:** this repository is under active development. Breaking changes can happen at any time. 🚧

## List of modules
This repository provides modules to implement cache coherence SoCs.

| Name | Description | Doc |
|------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|--------------------------------|
| [`ace_ccu_top`](src/ace_ccu_top.sv) | ACE interconnector, broadcasts snooping messages to the cache controllers and AXI transactions to the slave | [Doc](doc/ace_ccu_top.md) |
## Repository structure

```
src/
├── ace_intf.sv # ACE bus interface definitions
├── ace_pkg.sv # ACE type definitions and constants
├── snoop_intf.sv # Snoop channel interface definitions
└── ccu/ # Coherence Control Unit
├── ccu_top.sv
├── ccu_pkg.sv
├── ccu_frontend.sv
├── ccu_frontend_arbiter.sv
├── ccu_read_engine.sv
├── ccu_write_engine.sv
├── ccu_snoop_pipeline.sv
├── ccu_replay.sv
├── ccu_exclusive_monitor.sv
├── ccu_csr_wrap.sv
├── ccu_scoreboard.sv
└── regs/ # CSR definitions and generated register files

include/
└── ace/ # SystemVerilog header files (typedef, assign, convert, domain macros)
```

## Include files

| Name | Description |
|---------------------------------------------------|----------------------------------------------------|
| [`ace/typedef.svh`](include/ace/typedef.svh) | Macros for defining ACE and snoop struct types |
| [`ace/assign.svh`](include/ace/assign.svh) | Macros for assigning ACE and snoop signals |
| [`ace/convert.svh`](include/ace/convert.svh) | Macros for converting between ACE signal formats |
| [`ace/domain.svh`](include/ace/domain.svh) | Macros for ACE domain signal handling |

## License

The ACE repository is released under Solderpad v0.51 (SHL-0.51) see [LICENSE](LICENSE)
The ACE repository is released under Solderpad v0.51 (SHL-0.51) see [LICENSE](LICENSE)

## Publication

If you use ACE/Culsans in your work, you can cite us:

```
@article{tedeschi2024culsans,
title={Culsans: An Efficient Snoop-based Coherency Unit
for the CVA6 Open Source RISC-V application processor},
volume={10},
number={2},
journal={WiPiEC Journal - Works in Progress in Embedded Computing Journal},
author={Tedeschi, Riccardo and Valente, Luca and Ottavi, Gianmarco and
Zelioli, Enrico and Wistoff, Nils and
Giacometti, Massimiliano and Basit Sajjad, Abdul and
Benini, Luca and Rossi, Davide},
year={2024},
month={Aug.}
}

```
15 changes: 5 additions & 10 deletions include/ace/assign.svh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
`define ACE_ASSIGN_SVH_

`include "axi/assign.svh"
`include "ace/assign.svh"

////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal implementation for assigning one ACE struct or interface to another struct or interface.
Expand Down Expand Up @@ -71,9 +72,7 @@
__opt_as __lhs.b_ready = __rhs.b_ready; \
`__ACE_TO_AR(__opt_as, __lhs.ar, __lhs_sep, __rhs.ar, __rhs_sep) \
__opt_as __lhs.ar_valid = __rhs.ar_valid; \
__opt_as __lhs.r_ready = __rhs.r_ready; \
__opt_as __lhs.wack = __rhs.wack; \
__opt_as __lhs.rack = __rhs.rack;
__opt_as __lhs.r_ready = __rhs.r_ready;
`define __ACE_TO_RESP(__opt_as, __lhs, __lhs_sep, __rhs, __rhs_sep) \
__opt_as __lhs.aw_ready = __rhs.aw_ready; \
__opt_as __lhs.ar_ready = __rhs.ar_ready; \
Expand Down Expand Up @@ -116,9 +115,7 @@
`AXI_ASSIGN_W(slv, mst) \
`AXI_ASSIGN_B(mst, slv) \
`ACE_ASSIGN_AR(slv, mst) \
`ACE_ASSIGN_R(mst, slv) \
assign slv.wack = mst.wack; \
assign slv.rack = mst.rack;
`ACE_ASSIGN_R(mst, slv)

////////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -146,9 +143,7 @@
assign mon_dv.ar_ready = axi_if.ar_ready; \
`__ACE_TO_R(assign, mon_dv.r, _, axi_if.r, _) \
assign mon_dv.r_valid = axi_if.r_valid; \
assign mon_dv.r_ready = axi_if.r_ready; \
assign mon_dv.wack = axi_if.wack; \
assign mon_dv.rack = axi_if.rack;
assign mon_dv.r_ready = axi_if.r_ready;
////////////////////////////////////////////////////////////////////////////////////////////////////


Expand Down Expand Up @@ -317,7 +312,7 @@
__opt_as __lhs.cd_valid = __rhs.cd_valid; \
`__SNOOP_TO_CD(__opt_as, __lhs.cd, __lhs_sep, __rhs.cd, __rhs_sep) \
__opt_as __lhs.cr_valid = __rhs.cr_valid; \
__opt_as __lhs.cr_resp = __rhs.cr_resp;
__opt_as __lhs.cr = __rhs.cr;
////////////////////////////////////////////////////////////////////////////////////////////////////


Expand Down
Loading