Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
2f2cdd5
Initial rework of the uarch of the CCU FSM
ricted98 Apr 12, 2024
096456d
Define a single Legacy param and propagate it
ricted98 Apr 12, 2024
38866ad
Add AMO support and make fixes to memory unit
ricted98 Apr 12, 2024
542f384
Simplify Ax state encoding
ricted98 Apr 15, 2024
f7960b5
Remove commented out code
ricted98 Apr 15, 2024
9c2f385
Move towards non-blocking implementation
ricted98 Apr 17, 2024
f46f1ab
Add some relevant comments and TODOs
ricted98 Apr 17, 2024
8d29df1
Add collision checks and fix memory CD FIFO handling
ricted98 Apr 18, 2024
d4472ae
Implement control on ID queues and change collision condition
ricted98 Apr 18, 2024
07ac64b
Make collision condition parametric
ricted98 Apr 18, 2024
b776ad5
Fix some bugs affecting memory writebacks
ricted98 Apr 18, 2024
82b3093
Add proper arbitration on CD channels
ricted98 Apr 21, 2024
7c39d21
Minor embellishments of the code
ricted98 Apr 21, 2024
506a41b
First changes to harmonize the management of the CD channel
ricted98 Apr 21, 2024
b3b0a75
Rework CD channel handling
ricted98 Apr 21, 2024
c015131
Fix spurious assign to enum
ricted98 Apr 21, 2024
81ad84d
Fix Bender.yml
ricted98 Apr 22, 2024
340828c
Pass DCacheIndexWidth parameter through Cfg
ricted98 Apr 22, 2024
c332fa1
Update W and B channels handling in memory unit
ricted98 Apr 23, 2024
63d2e6f
Save only the relevant part of the address in ID queues
ricted98 Apr 23, 2024
54019fe
Fix collision check lookup address
ricted98 Apr 24, 2024
15c50ad
Decouple AC reqs and CR resps
ricted98 Apr 26, 2024
e74eb7b
Rework the decoder block
ricted98 Apr 29, 2024
6b0e273
Correctly propagate AxiAddrWidth
ricted98 May 3, 2024
0e7b3a0
Fix w_last handling in memory unit
ricted98 May 3, 2024
9a4b617
Rework the design to reduce latency
ricted98 May 7, 2024
404bc15
Merge pull request #2 from pulp-platform/rt/reduce-latency-rebased
ricted98 May 9, 2024
912cada
Add performance events
ricted98 May 13, 2024
13f79f9
Allow multiple consecutive AC requests
ricted98 May 14, 2024
8de8e7c
Replace enum for AC state
ricted98 May 14, 2024
634da06
Merge pull request #3 from pulp-platform/rt/uarch-perf
ricted98 May 16, 2024
74333a3
Add perf counters to memory unit
ricted98 May 14, 2024
9c9c764
Remove AMO_WAIT_READ state
ricted98 May 16, 2024
63f3114
Disable perf counters by default and buffer them
ricted98 May 23, 2024
86be0f2
Retime AC request handling
ricted98 May 23, 2024
01cc655
Add bypass to `ccu_ctrl_decoder`
ricted98 May 28, 2024
fbaabcf
Freeze latency configuration
ricted98 May 28, 2024
06180ec
Fix naming convention for package parameters
ricted98 Jun 17, 2024
409b1bf
Add one cycle latency in id_queues to cut timing loops.
Jul 10, 2024
090a5f2
treewide: reorganize repository and add reworked CCU
ricted98 Jun 18, 2025
8d8bcb8
ccu_snoop_pipe: rename stall signal and fix missing default values
ricted98 Jun 18, 2025
8e79f76
ccu_snoop_pipe: add stall performance events
ricted98 Jun 18, 2025
2c4704e
ccu_snoop_pipe: remove leftover assignments
ricted98 Jun 18, 2025
917a9a9
ccu_top: add comment about replay table
ricted98 Jun 18, 2025
6b1c50d
ccu_tracker: add comments about deallocation logic
ricted98 Jun 18, 2025
5eac9e8
ccu_tracker: fix width in signal declaration
ricted98 Jun 18, 2025
5c45c03
ccu_snoop_pipe: fix formatting
ricted98 Jun 18, 2025
cfe7c20
ccu_snoop_pipe: fix missing signal declaration
ricted98 Jun 18, 2025
2990733
ace_pkg: fix `is_read_once` function
ricted98 Jun 19, 2025
af02279
ccu_snoop_pipe: fix tracker allocation during ATOPs
ricted98 Jun 20, 2025
c1742be
ccu_snoop_pipe: fix missing signals declaration
ricted98 Jun 20, 2025
5c6a90c
ccu_tracker: add performance events and empty signal
ricted98 Jun 20, 2025
707a9ff
ccu_top: rename write unit instance
ricted98 Jun 20, 2025
36b9ecc
ace_pkg: use more vendorized nomeclature for ACE util functions
ricted98 Jun 20, 2025
e0c2aa8
ace_pkg: fix formatting based on verible
ricted98 Jun 21, 2025
6f136aa
treewide: use ID bit to mark writebacks
ricted98 Jun 26, 2025
4c03a2c
ccu_pkg: remove unused struct typedef
ricted98 Jun 26, 2025
176a7e3
ccu_snoop_pipe: redefine stage 1 stall event
ricted98 Jun 26, 2025
ec2d9b8
ccu_cd_ctrl: fix `r_last` in read response from CD channel
ricted98 Jun 26, 2025
64a0b98
Bender.yml: update `axi` version
ricted98 Jun 29, 2025
1791b5b
scripts: update and clean up `.do` scripts
ricted98 Jun 30, 2025
9ba9d80
ace_pkg: remove unused type and add RRESP encoding
ricted98 Jul 23, 2025
5f8c4ba
ccu_cd_ctrl: use RRESP parameters to abstract encoding
ricted98 Jul 23, 2025
6fb49d2
ccu: add assertions
ricted98 Jul 23, 2025
d405462
ccu_cd_ctrl: fix typo
ricted98 Jul 23, 2025
8a51673
Bender.yml: update `axi` dependency to custom branch
ricted98 Jul 24, 2025
3028979
ccu_cd_ctrl: use `LenWidth` parameter from `axi_pkg`
ricted98 Jul 24, 2025
5aae0d2
license: fix headers
ricted98 Jul 28, 2025
9177971
include: add custom type and `__ACE_NO_ACKS` defines
ricted98 Aug 1, 2025
caecef1
src: add ACE mux and demux modules
ricted98 Aug 1, 2025
50a0c49
ccu: use ACE mux and demux modules
ricted98 Aug 1, 2025
d298dfe
Bender.yml: bump `axi`
ricted98 Sep 2, 2025
c5db5fb
ccu_frontend: integrate LR/SC monitor
ricted98 Sep 2, 2025
bd99a72
ccu_read: ensure per-master burst locking for R responses
ricted98 Sep 2, 2025
e52738b
treewide: CCU refactoring and repository cleanup
ricted98 Dec 10, 2025
123df29
ccu_pkg: fix `axiDataSize` computation
ricted98 Dec 12, 2025
f641e75
ccu_snoop_pipeline: fix AW address computation
ricted98 Dec 12, 2025
ada265b
ccu_top: fix packed array declaration
ricted98 Dec 12, 2025
10d0b14
ccu_write_engine: fix signal name typo
ricted98 Dec 12, 2025
8250205
ccu: remove shareable stall logic
ricted98 Dec 12, 2025
abe0cc6
ccu_pkg: remove leftover comment
ricted98 Dec 12, 2025
3dac804
ccu_snoop_pipeline: use `CACHE_BUFFERABLE` from `axi_pkg`
ricted98 Dec 12, 2025
083073e
ccu_read_engine: add decoupling fallthrough AR FIFO
ricted98 Dec 12, 2025
0370065
ccu_snoop_pipeline: add stub for performance events
ricted98 Dec 15, 2025
cff670e
ccu: add authorship comments
ricted98 Dec 15, 2025
b808a6a
ccu_snoop_pipeline: add register for performance events
ricted98 Dec 17, 2025
f12f1db
ccu: add replay support
ricted98 Dec 17, 2025
f50055a
ccu_replay: fix hazard setting during allocation
ricted98 Dec 19, 2025
c26967e
ccu_frontend: add few explanation comments
ricted98 Dec 19, 2025
d35b4c0
ccu_replay: logic bugfixes
ricted98 Feb 20, 2026
fdfc369
ccu_snoop_pipeline: fix comment typo and code alignment
ricted98 Feb 20, 2026
1178f0d
ccu: add CSRs
ricted98 Feb 20, 2026
1c7ea5d
ccu_snoop_pipeline: avoid hardcoded values
ricted98 Feb 20, 2026
85140ba
ccu_top: fix instance name
ricted98 Feb 20, 2026
0be22a2
pkg: refactor transaction decoding functions
ricted98 Mar 9, 2026
4dcf3c2
ccu_snoop_pipeline: fix indentation
ricted98 Mar 9, 2026
b12572f
ccu_snoop_pipeline: fix `ACPROT` propagation
ricted98 Mar 9, 2026
1bc1dde
ccu_snoop_pipeline: fix missing signal declarations
ricted98 Mar 9, 2026
4328668
ccu_top, ccu_frontend: insert parametric subordinate cut
ricted98 Mar 9, 2026
a69e26e
ccu_snoop_pipeline: fix `MakeUnique` handling
ricted98 Mar 9, 2026
29b1e95
ccu_csr_wrap: automate performance counters parameter computation
ricted98 Mar 9, 2026
ea619d3
ccu_csr: increase performance counters number and track new events
ricted98 Mar 11, 2026
7d91778
ccu_scoreboard: fix unwanted allocation when scoreboard is full
ricted98 Mar 11, 2026
61e0c0f
ccu_snoop_pipeline: fix stage0 stalling condition
ricted98 Mar 11, 2026
3a35e89
ccu_snoop_pipeline: add new performance events
ricted98 Mar 11, 2026
785d0fa
ccu: fix `make*` handling
ricted98 Mar 23, 2026
3934d97
ccu: add snoop miss and hit events
ricted98 Mar 23, 2026
96b9dd7
fronted: use custom arbiter
ricted98 Mar 25, 2026
a2f27b5
frontend: balance pipelining
ricted98 Mar 26, 2026
437fddb
ccu_csr: update generated code with peakrdl v1.5.0
ricted98 May 19, 2026
a55a6e4
ccu_frontend: fix exclusive dealloc
ricted98 May 19, 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
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,56 @@ This repository provides modules to implement cache coherence SoC's.
|------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|--------------------------------|
| [`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) |

## Verification

Generate the initial cache and memory states, as well as the transaction streams, with the following command:

```
make init_mem
```

You can control simulation parameters, such as the memory and cache sizes and structures, number of caches, and number of transactions, in `Makefile`.

You can simulate the top level design with
```
make -B sim-ace_ccu_top.log
```

### Coherency check

To run coherency check, run
```
make init_mem CHECK=1
```
It will generate the initial cache and memory states, and stall until given a prompt.

Next, open another terminal and simulate the top level design with
```
make -B sim-ace_ccu_top.log
```
Once the simulation finishes, press enter on the coherency check prompt. A coherency check will be run. A log file is generated called `cache_python.log`. Search with keyword `ERROR` to find whether coherency was broken during the simulation. When run with `DEBUG=1` (the default option), a pdb session is opened the moment a coherency problem is found.

## 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
128 changes: 128 additions & 0 deletions include/ace/convert.svh
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
// Copyright (c) 2025 ETH Zurich, University of Bologna
//
// Copyright and related rights are licensed under the Solderpad Hardware
// License, Version 0.51 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in writing, software, hardware and materials distributed under
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.


`ifndef ACE_CONVERT_SVH_
`define ACE_CONVERT_SVH_

`include "axi/assign.svh"

`define __ACE_TO_AXI_R(__opt_as, __lhs, __lhs_sep, __rhs, __rhs_sep) \
__opt_as __lhs``__lhs_sep``id = __rhs``__rhs_sep``id; \
__opt_as __lhs``__lhs_sep``data = __rhs``__rhs_sep``data; \
__opt_as __lhs``__lhs_sep``resp = __rhs``__rhs_sep``resp[1:0]; \
__opt_as __lhs``__lhs_sep``last = __rhs``__rhs_sep``last; \
__opt_as __lhs``__lhs_sep``user = __rhs``__rhs_sep``user;
`define __AXI_TO_ACE_AW(__opt_as, __lhs, __lhs_sep, __rhs, __rhs_sep) \
__opt_as __lhs``__lhs_sep``id = __rhs``__rhs_sep``id; \
__opt_as __lhs``__lhs_sep``addr = __rhs``__rhs_sep``addr; \
__opt_as __lhs``__lhs_sep``len = __rhs``__rhs_sep``len; \
__opt_as __lhs``__lhs_sep``size = __rhs``__rhs_sep``size; \
__opt_as __lhs``__lhs_sep``burst = __rhs``__rhs_sep``burst; \
__opt_as __lhs``__lhs_sep``lock = __rhs``__rhs_sep``lock; \
__opt_as __lhs``__lhs_sep``cache = __rhs``__rhs_sep``cache; \
__opt_as __lhs``__lhs_sep``prot = __rhs``__rhs_sep``prot; \
__opt_as __lhs``__lhs_sep``qos = __rhs``__rhs_sep``qos; \
__opt_as __lhs``__lhs_sep``region = __rhs``__rhs_sep``region; \
__opt_as __lhs``__lhs_sep``atop = __rhs``__rhs_sep``atop; \
__opt_as __lhs``__lhs_sep``user = __rhs``__rhs_sep``user; \
__opt_as __lhs``__lhs_sep``snoop = '0; \
__opt_as __lhs``__lhs_sep``bar = '0; \
__opt_as __lhs``__lhs_sep``domain = '0; \
__opt_as __lhs``__lhs_sep``awunique = '0;
`define __AXI_TO_ACE_AR(__opt_as, __lhs, __lhs_sep, __rhs, __rhs_sep) \
__opt_as __lhs``__lhs_sep``id = __rhs``__rhs_sep``id; \
__opt_as __lhs``__lhs_sep``addr = __rhs``__rhs_sep``addr; \
__opt_as __lhs``__lhs_sep``len = __rhs``__rhs_sep``len; \
__opt_as __lhs``__lhs_sep``size = __rhs``__rhs_sep``size; \
__opt_as __lhs``__lhs_sep``burst = __rhs``__rhs_sep``burst; \
__opt_as __lhs``__lhs_sep``lock = __rhs``__rhs_sep``lock; \
__opt_as __lhs``__lhs_sep``cache = __rhs``__rhs_sep``cache; \
__opt_as __lhs``__lhs_sep``prot = __rhs``__rhs_sep``prot; \
__opt_as __lhs``__lhs_sep``qos = __rhs``__rhs_sep``qos; \
__opt_as __lhs``__lhs_sep``region = __rhs``__rhs_sep``region; \
__opt_as __lhs``__lhs_sep``user = __rhs``__rhs_sep``user; \
__opt_as __lhs``__lhs_sep``snoop = '0; \
__opt_as __lhs``__lhs_sep``bar = '0; \
__opt_as __lhs``__lhs_sep``domain = '0;
`define __AXI_TO_ACE_R(__opt_as, __lhs, __lhs_sep, __rhs, __rhs_sep) \
__opt_as __lhs``__lhs_sep``id = __rhs``__rhs_sep``id; \
__opt_as __lhs``__lhs_sep``data = __rhs``__rhs_sep``data; \
__opt_as __lhs``__lhs_sep``resp = {2'b00, __rhs``__rhs_sep``resp}; \
__opt_as __lhs``__lhs_sep``last = __rhs``__rhs_sep``last; \
__opt_as __lhs``__lhs_sep``user = __rhs``__rhs_sep``user;

`define ACE_TO_AXI_ASSIGN_R_STRUCT(dst, src) \
`__ACE_TO_AXI_R(assign, dst, ., src, .)

`define AXI_TO_ACE_ASSIGN_AW_STRUCT(dst, src) \
`__AXI_TO_ACE_AW(assign, dst, ., src, .)

`define AXI_TO_ACE_ASSIGN_AR_STRUCT(dst, src) \
`__AXI_TO_ACE_AR(assign, dst, ., src, .)

`define AXI_TO_ACE_ASSIGN_R_STRUCT(dst, src) \
`__AXI_TO_ACE_R(assign, dst, ., src, .)

`define ACE_TO_AXI_SET_R_STRUCT(dst, src) \
`__ACE_TO_AXI_R(, dst, ., src, .)

`define AXI_TO_ACE_SET_AW_STRUCT(dst, src) \
`__AXI_TO_ACE_AW(, dst, ., src, .)

`define AXI_TO_ACE_SET_AR_STRUCT(dst, src) \
`__AXI_TO_ACE_AR(, dst, ., src, .)

`define AXI_TO_ACE_SET_R_STRUCT(dst, src) \
`__AXI_TO_ACE_R(, dst, ., src, .)


`define ACE_TO_AXI_ASSIGN_REQ(dst, src) \
`AXI_ASSIGN_AW_STRUCT(dst.aw, src.aw) \
`AXI_ASSIGN_AR_STRUCT(dst.ar, src.ar) \
`AXI_ASSIGN_W_STRUCT(dst.w, src.w) \
assign dst.aw_valid = src.aw_valid; \
assign dst.ar_valid = src.ar_valid; \
assign dst.w_valid = src.w_valid; \
assign dst.b_ready = src.b_ready; \
assign dst.r_ready = src.r_ready;

`define ACE_TO_AXI_ASSIGN_RESP(dst, src) \
`ACE_TO_AXI_ASSIGN_R_STRUCT(dst.r, src.r) \
`AXI_ASSIGN_B_STRUCT(dst.b, src.b) \
assign dst.aw_ready = src.aw_ready; \
assign dst.ar_ready = src.ar_ready; \
assign dst.w_ready = src.w_ready; \
assign dst.b_valid = src.b_valid; \
assign dst.r_valid = src.r_valid;

`define AXI_TO_ACE_ASSIGN_REQ(dst, src) \
`AXI_TO_ACE_ASSIGN_AW_STRUCT(dst.aw, src.aw) \
`AXI_TO_ACE_ASSIGN_AR_STRUCT(dst.ar, src.ar) \
`AXI_ASSIGN_W_STRUCT(dst.w, src.w) \
assign dst.aw_valid = src.aw_valid; \
assign dst.ar_valid = src.ar_valid; \
assign dst.w_valid = src.w_valid; \
assign dst.b_ready = src.b_ready; \
assign dst.r_ready = src.r_ready;


`define AXI_TO_ACE_ASSIGN_RESP(dst, src) \
`AXI_TO_ACE_ASSIGN_R_STRUCT(dst.r, src.r) \
`AXI_ASSIGN_B_STRUCT(dst.b, src.b) \
assign dst.aw_ready = src.aw_ready; \
assign dst.ar_ready = src.ar_ready; \
assign dst.w_ready = src.w_ready; \
assign dst.b_valid = src.b_valid; \
assign dst.r_valid = src.r_valid;


`endif // ACE_CONVERT_SVH_
Loading