Skip to content

Commit 5dd3f4c

Browse files
authored
treewide: Miscellaneous changes to bump dependency in Occamy (#193)
* treewide: Remove verible, unused in Snitch * treewide: Update after iDMA integration * treewide: Bump `cluster_icache` * target: Turn assertions off for Verilator Required to bump to common_cells 1.38.0 * bender: Bump dependencies * target: Do not generate `*.dep` files on any `clean` target * target: Remove DWARF targets and dumps when `DEBUG=OFF` * target: Improve Makefile reusability for use in Occamy * target: Use Verilator to generate accurate dependency files * snRuntime: Rename `snitch_cluster_start.S` to `snrt.S` The shift to a name which is not specific to a particular system makes building system-specific snRuntime implementations easier, as these can reuse existing build scripts directly. * snRuntime: Improve all-to-all reduction routine * snRuntime: Improve `riscv_decls.h` * snRuntime: Explicitize transfer dependency in `snrt_init_tls` * util/sim: Improve Python imports in simulation classes * util/sim: Report interrupted processes as not completed * util/trace: Log line number on exception in DMA trace * ci: Encode `build-docker`->`deploy-docs` dependency * ci: Enable Docker build on forks * docs: Add missing `snitch_occupancy` metric
1 parent c4861da commit 5dd3f4c

40 files changed

+316
-221
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,48 @@ jobs:
3939
cache-to: type=gha,mode=max`
4040
file: util/container/Dockerfile
4141
push: true
42-
tags: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
42+
tags: ghcr.io/${{ github.repository_owner }}/snitch_cluster:${{ github.ref_name }}
4343

4444
########
4545
# Docs #
4646
########
4747

48-
docs:
48+
build-docs:
4949
name: Build documentation
5050
runs-on: ubuntu-22.04
5151
needs: build-docker
5252
if: >
5353
github.event_name != 'pull_request' ||
5454
github.event.pull_request.head.repo.full_name != github.repository
5555
container:
56-
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
56+
image: ghcr.io/${{ github.repository_owner }}/snitch_cluster:${{ github.ref_name }}
5757
steps:
5858
- uses: actions/checkout@v2
5959
- name: Build docs
6060
run: make docs
6161

62+
deploy-docs:
63+
name: Deploy documentation
64+
runs-on: ubuntu-22.04
65+
needs: build-docker
66+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
67+
container:
68+
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
69+
steps:
70+
- uses: actions/checkout@v2
71+
# For some reason, the checkout is done by a different user
72+
# than that deploying to Github (root, possibly due to Docker).
73+
# So we need to set the repository as a safe directory.
74+
- name: Git config safe.directory
75+
run: |
76+
git config --global --add safe.directory $GITHUB_WORKSPACE
77+
- name: Generate documentation sources
78+
run: |
79+
make doc-srcs
80+
make doxygen-docs
81+
- name: Build and deploy documentation
82+
run: mkdocs gh-deploy --force
83+
6284
#####################
6385
# Python unit tests #
6486
#####################
@@ -71,7 +93,7 @@ jobs:
7193
github.event_name != 'pull_request' ||
7294
github.event.pull_request.head.repo.full_name != github.repository
7395
container:
74-
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
96+
image: ghcr.io/${{ github.repository_owner }}/snitch_cluster:${{ github.ref_name }}
7597
steps:
7698
- uses: actions/checkout@v2
7799
- name: Run pytest
@@ -89,7 +111,7 @@ jobs:
89111
github.event_name != 'pull_request' ||
90112
github.event.pull_request.head.repo.full_name != github.repository
91113
container:
92-
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
114+
image: ghcr.io/${{ github.repository_owner }}/snitch_cluster:${{ github.ref_name }}
93115
steps:
94116
- uses: actions/checkout@v2
95117
with:
@@ -139,7 +161,7 @@ jobs:
139161
github.event_name != 'pull_request' ||
140162
github.event.pull_request.head.repo.full_name != github.repository
141163
container:
142-
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
164+
image: ghcr.io/${{ github.repository_owner }}/snitch_cluster:${{ github.ref_name }}
143165
steps:
144166
- uses: actions/checkout@v4
145167
with:

.github/workflows/publish-docs.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

Bender.lock

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ packages:
77
dependencies:
88
- common_cells
99
axi:
10-
revision: 4e54ac6766b160217a83a74d5a23af9bbf59e6ee
11-
version: null
10+
revision: 39f5f2d51c5e524f6fc5cf8b6e901f7dcc5622d7
11+
version: 0.39.6
1212
source:
1313
Git: https://github.com/pulp-platform/axi
1414
dependencies:
@@ -32,8 +32,8 @@ packages:
3232
dependencies:
3333
- common_cells
3434
cluster_icache:
35-
revision: 0e1fb6751d9684d968ba7fb40836e6118b448ecd
36-
version: 0.1.1
35+
revision: 64e21ae455bbdde850c4df13bef86ea55ac42537
36+
version: 0.2.0
3737
source:
3838
Git: https://github.com/pulp-platform/cluster_icache.git
3939
dependencies:
@@ -42,16 +42,16 @@ packages:
4242
- scm
4343
- tech_cells_generic
4444
common_cells:
45-
revision: c27bce39ebb2e6bae52f60960814a2afca7bd4cb
46-
version: 1.37.0
45+
revision: 9afda9abb565971649c2aa0985639c096f351171
46+
version: 1.38.0
4747
source:
4848
Git: https://github.com/pulp-platform/common_cells
4949
dependencies:
5050
- common_verification
5151
- tech_cells_generic
5252
common_verification:
53-
revision: 9c07fa860593b2caabd9b5681740c25fac04b878
54-
version: 0.2.3
53+
revision: fb1885f48ea46164a10568aeff51884389f67ae3
54+
version: 0.2.5
5555
source:
5656
Git: https://github.com/pulp-platform/common_verification.git
5757
dependencies: []
@@ -71,8 +71,8 @@ packages:
7171
dependencies:
7272
- common_cells
7373
idma:
74-
revision: 1a42da9d5c76f1cff0bcdaaacc474ed85631d734
75-
version: null
74+
revision: ff5d56fffb3767814db88d6bf8f381974ea33aa5
75+
version: 0.6.4
7676
source:
7777
Git: https://github.com/pulp-platform/iDMA
7878
dependencies:
@@ -83,16 +83,16 @@ packages:
8383
- obi
8484
- register_interface
8585
obi:
86-
revision: 5321106817e177d6c16ecc4daa922b96b1bc946b
87-
version: 0.1.5
86+
revision: 8097928cf1b43712f93d5356f336397879b4ad2c
87+
version: 0.1.6
8888
source:
8989
Git: https://github.com/pulp-platform/obi.git
9090
dependencies:
9191
- common_cells
9292
- common_verification
9393
register_interface:
94-
revision: ae616e5a1ec2b41e72d200e5ab09c65e94aebd3d
95-
version: 0.4.4
94+
revision: 5daa85d164cf6b54ad061ea1e4c6f3624556e467
95+
version: 0.4.5
9696
source:
9797
Git: https://github.com/pulp-platform/register_interface
9898
dependencies:
@@ -109,11 +109,12 @@ packages:
109109
- common_cells
110110
- tech_cells_generic
111111
scm:
112-
revision: 998466d2a3c2d7d572e43d2666d93c4f767d8d60
113-
version: 1.1.1
112+
revision: 472f99affe44ff7b282b519c047a3cfeb35b16c6
113+
version: 1.2.0
114114
source:
115115
Git: https://github.com/pulp-platform/scm.git
116-
dependencies: []
116+
dependencies:
117+
- tech_cells_generic
117118
tech_cells_generic:
118119
revision: 7968dd6e6180df2c644636bc6d2908a49f2190cf
119120
version: 0.2.13

Bender.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ package:
1919
- Matheus Cavalcante <matheusd@iis.ee.ethz.ch>
2020

2121
dependencies:
22-
axi: { git: https://github.com/pulp-platform/axi, rev: 4e54ac6766b160217a83a74d5a23af9bbf59e6ee }
23-
axi_riscv_atomics: { git: https://github.com/pulp-platform/axi_riscv_atomics, version: 0.6.0 }
24-
common_cells: { git: https://github.com/pulp-platform/common_cells, version: 1.35.0 }
25-
FPnew: { git: "https://github.com/pulp-platform/cvfpu.git", rev: pulp-v0.1.3 }
26-
register_interface: { git: https://github.com/pulp-platform/register_interface, version: 0.4.2 }
27-
tech_cells_generic: { git: https://github.com/pulp-platform/tech_cells_generic, version: 0.2.11 }
28-
riscv-dbg: { git: https://github.com/pulp-platform/riscv-dbg, version: 0.8.0 }
29-
cluster_icache: { git: https://github.com/pulp-platform/cluster_icache.git, version: 0.1.0 }
30-
idma: { git: https://github.com/pulp-platform/iDMA, rev: __deploy__9cbcd30__snitch-tracing }
22+
axi: { git: https://github.com/pulp-platform/axi, version: 0.39.6 }
23+
axi_riscv_atomics: { git: https://github.com/pulp-platform/axi_riscv_atomics, version: 0.6.0 }
24+
common_cells: { git: https://github.com/pulp-platform/common_cells, version: 1.35.0 }
25+
FPnew: { git: https://github.com/pulp-platform/cvfpu.git, rev: pulp-v0.1.3 }
26+
register_interface: { git: https://github.com/pulp-platform/register_interface, version: 0.4.2 }
27+
tech_cells_generic: { git: https://github.com/pulp-platform/tech_cells_generic, version: 0.2.13 }
28+
riscv-dbg: { git: https://github.com/pulp-platform/riscv-dbg, version: 0.8.0 }
29+
cluster_icache: { git: https://github.com/pulp-platform/cluster_icache.git, rev: 64e21ae455bbdde850c4df13bef86ea55ac42537 }
30+
idma: { git: https://github.com/pulp-platform/iDMA, version: 0.6.4 }
3131

3232
export_include_dirs:
3333
- hw/reqrsp_interface/include
@@ -185,10 +185,10 @@ sources:
185185
- target/common/test/tb_bin.sv
186186

187187
# target/snitch_cluster
188-
- target: snitch_cluster
188+
- target: snitch_cluster_wrapper
189189
files:
190190
- target/snitch_cluster/generated/snitch_cluster_wrapper.sv
191-
- target: all(snitch_cluster, any(simulation, verilator))
191+
- target: all(snitch_cluster_wrapper, any(simulation, verilator))
192192
files:
193193
- target/snitch_cluster/test/vip_snitch_cluster.sv
194194
- target/snitch_cluster/test/testharness.sv

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
2727
############
2828

2929
NONFREE_REMOTE ?= git@iis-git.ee.ethz.ch:pulp-restricted/snitch-cluster-nonfree.git
30-
NONFREE_COMMIT ?= e30961e20a23a76442da27d2ba07c9fe20f3b575
30+
NONFREE_COMMIT ?= 35cdb5b03778d3ec52e6d8fa0856ee789489b25a
3131
NONFREE_DIR = $(ROOT)/nonfree
3232

3333
all: nonfree

docs/ug/trace_analysis.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ In the following table you can find a complete list of all the performance metri
128128
|`snitch_issues` |Total number of instructions issued by Snitch, excluding those offloaded to the FPSS (see `snitch_fseq_offloads`). |
129129
|`snitch_fseq_offloads` |Total number of instructions offloaded by Snitch to the FPSS. |
130130
|`snitch_fseq_rel_offloads`|The ratio between `snitch_fseq_offloads` and the total number of instructions issued by Snitch core proper, i.e. `snitch_issues + snitch_fseq_offloads`. |
131+
|`snitch_occupancy` |IPC of the Snitch core, calculated as `snitch_issues / cycles`. |
131132
|`fpss_issues` |Total number of instructions issued by the FPSS. It counts repeated issues from the FREP sequencer. |
132133
|`fpss_fpu_issues` |Similar to `fpss_issues`, but counts only instructions destined to the FPU proper. It does not for instance include instructions issued to the FPSS's LSU. |
133134
|`fseq_yield` |The ratio between `fpss_issues` and `snitch_fseq_offloads`. The difference lies in the FREP sequencer possibly replicating instructions. If the sequencer is not used this ratio should amount to 1.|

hw/snitch_cluster/src/snitch_cluster.sv

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/// Snitch Cluster Top-Level.
2323
module snitch_cluster
2424
import snitch_pkg::*;
25+
import snitch_icache_pkg::*;
2526
#(
2627
/// Width of physical address.
2728
parameter int unsigned PhysicalAddrWidth = 48,
@@ -66,8 +67,8 @@ module snitch_cluster
6667
parameter int unsigned ICacheLineWidth [NrHives] = '{default: 0},
6768
/// Number of icache lines per set.
6869
parameter int unsigned ICacheLineCount [NrHives] = '{default: 0},
69-
/// Number of icache sets.
70-
parameter int unsigned ICacheSets [NrHives] = '{default: 0},
70+
/// Number of icache ways.
71+
parameter int unsigned ICacheWays [NrHives] = '{default: 0},
7172
/// Enable virtual memory support.
7273
parameter bit VMSupport = 1,
7374
/// Per-core enabling of the standard `E` ISA reduced-register extension.
@@ -523,10 +524,10 @@ module snitch_cluster
523524
tcdm_req_t [NrTCDMPortsCores-1:0] tcdm_req;
524525
tcdm_rsp_t [NrTCDMPortsCores-1:0] tcdm_rsp;
525526

526-
core_events_t [NrCores-1:0] core_events;
527-
tcdm_events_t tcdm_events;
528-
dma_events_t [DMANumChannels-1:0] dma_events;
529-
snitch_icache_pkg::icache_events_t [NrCores-1:0] icache_events;
527+
core_events_t [NrCores-1:0] core_events;
528+
tcdm_events_t tcdm_events;
529+
dma_events_t [DMANumChannels-1:0] dma_events;
530+
icache_l0_events_t [NrCores-1:0] icache_events;
530531

531532
// 4. Memory Subsystem (Core side).
532533
reqrsp_req_t [NrCores-1:0] core_req;
@@ -981,7 +982,7 @@ module snitch_cluster
981982
hive_req_t [HiveSize-1:0] hive_req_reshape;
982983
hive_rsp_t [HiveSize-1:0] hive_rsp_reshape;
983984

984-
snitch_icache_pkg::icache_events_t [HiveSize-1:0] icache_events_reshape;
985+
icache_l0_events_t [HiveSize-1:0] icache_events_reshape;
985986

986987
for (genvar j = 0; j < NrCores; j++) begin : gen_hive_matrix
987988
// Check whether the core actually belongs to the current hive.
@@ -1005,7 +1006,7 @@ module snitch_cluster
10051006
.CoreCount (HiveSize),
10061007
.ICacheLineWidth (ICacheLineWidth[i]),
10071008
.ICacheLineCount (ICacheLineCount[i]),
1008-
.ICacheSets (ICacheSets[i]),
1009+
.ICacheWays (ICacheWays[i]),
10091010
.IsoCrossing (IsoCrossing),
10101011
.sram_cfg_t (sram_cfg_t),
10111012
.sram_cfgs_t (sram_cfgs_t),

hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral.sv

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
module snitch_cluster_peripheral
1010
import snitch_pkg::*;
11+
import snitch_icache_pkg::*;
1112
import snitch_cluster_peripheral_reg_pkg::*;
1213
#(
1314
// Nr of cores in the cluster
@@ -20,24 +21,24 @@ module snitch_cluster_peripheral
2021
parameter type tcdm_events_t = logic,
2122
parameter type dma_events_t = logic
2223
) (
23-
input logic clk_i,
24-
input logic rst_ni,
25-
26-
input reg_req_t reg_req_i,
27-
output reg_rsp_t reg_rsp_o,
28-
29-
output logic icache_prefetch_enable_o,
30-
output logic [NrCores-1:0] cl_clint_o,
31-
input core_events_t [NrCores-1:0] core_events_i,
32-
input tcdm_events_t tcdm_events_i,
33-
input dma_events_t [DMANumChannels-1:0] dma_events_i,
34-
input snitch_icache_pkg::icache_events_t [NrCores-1:0] icache_events_i
24+
input logic clk_i,
25+
input logic rst_ni,
26+
27+
input reg_req_t reg_req_i,
28+
output reg_rsp_t reg_rsp_o,
29+
30+
output logic icache_prefetch_enable_o,
31+
output logic [NrCores-1:0] cl_clint_o,
32+
input core_events_t [NrCores-1:0] core_events_i,
33+
input tcdm_events_t tcdm_events_i,
34+
input dma_events_t [DMANumChannels-1:0] dma_events_i,
35+
input icache_l0_events_t [NrCores-1:0] icache_events_i
3536
);
3637

3738
// Pipeline register to ease timing.
3839
tcdm_events_t tcdm_events_q;
3940
dma_events_t [DMANumChannels-1:0] dma_events_q;
40-
snitch_icache_pkg::icache_events_t [NrCores-1:0] icache_events_q;
41+
icache_l0_events_t [NrCores-1:0] icache_events_q;
4142
`FF(tcdm_events_q, tcdm_events_i, '0)
4243
`FF(dma_events_q, dma_events_i, '0)
4344
`FF(icache_events_q, icache_events_i, '0)

hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ package ${cfg['cluster']['name']}_pkg;
7575

7676
localparam int unsigned ICacheLineWidth [NrHives] = '{${icache_cfg('cacheline')}};
7777
localparam int unsigned ICacheLineCount [NrHives] = '{${icache_cfg('depth')}};
78-
localparam int unsigned ICacheSets [NrHives] = '{${icache_cfg('sets')}};
78+
localparam int unsigned ICacheWays [NrHives] = '{${icache_cfg('ways')}};
7979

8080
localparam int unsigned Hive [NrCores] = '{${core_cfg('hive')}};
8181

@@ -288,7 +288,7 @@ module ${cfg['cluster']['name']}_wrapper (
288288
.DMANumChannels (${cfg['cluster']['dma_nr_channels']}),
289289
.ICacheLineWidth (${cfg['cluster']['name']}_pkg::ICacheLineWidth),
290290
.ICacheLineCount (${cfg['cluster']['name']}_pkg::ICacheLineCount),
291-
.ICacheSets (${cfg['cluster']['name']}_pkg::ICacheSets),
291+
.ICacheWays (${cfg['cluster']['name']}_pkg::ICacheWays),
292292
.VMSupport (${int(cfg['cluster']['vm_support'])}),
293293
.RVE (${core_isa('e')}),
294294
.RVF (${core_isa('f')}),

0 commit comments

Comments
 (0)