Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hw: Improve performance counters for bring-up #155

Merged
merged 73 commits into from
Aug 9, 2024
Merged
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
9814f3f
Changed Scratch Registers Software Permissions to allow Read/Write an…
MilosHirsl May 16, 2024
b0671b2
Modified performance counters to track cache hits and misses during b…
MilosHirsl May 23, 2024
31d43f3
hw: Fix paths for peripheral registers generation
fischeti Jul 3, 2024
9f129c1
wip: Enable perf cnt metrics after reset
fischeti Jul 3, 2024
b55352f
hw: Fix unsupported operation for verilator
fischeti Jul 3, 2024
c69528c
hw: Format auto-generated peripheral sources
fischeti Jul 3, 2024
efc95db
hw: lint sources
fischeti Jul 3, 2024
3aea471
hw: Fix elaboration error
fischeti Jul 3, 2024
a35f26a
hw: Restructure performance counters
fischeti Jul 3, 2024
f663516
hw: Enable performance counters by default
fischeti Jul 16, 2024
2c5a49e
hw: Fix enable and reset of performance counters
fischeti Jul 16, 2024
4f7edfb
hw: Only allow clearing the performance counters by SW
fischeti Jul 16, 2024
16109f5
sw: Fix renamed parameter
fischeti Jul 16, 2024
ea0d502
sw: Refactor performance counter runtime functions
fischeti Jul 16, 2024
89feb4e
test: Improve performance counter test
fischeti Jul 16, 2024
6aad72a
sw: Remove deprecated performance counter usages
fischeti Jul 16, 2024
dc3c060
sw: Lint C sources
fischeti Jul 16, 2024
0aa353d
hw: Remove TODO comment
fischeti Jul 16, 2024
1de3ecd
hw: Waive linting errors of auto-generated reg files
fischeti Jul 16, 2024
0849bea
test: Don't run `perf_cnt` test on banshee
fischeti Jul 16, 2024
07148be
misc: Small fixes
fischeti Jul 19, 2024
b291ea2
periph: Remove unused parameters from peripherals
fischeti Jul 30, 2024
9ff5059
perf_cnt: Make it possible to track all DMA channels
fischeti Jul 30, 2024
eb0ba0e
perf_cnt: Fix hart select signal
fischeti Jul 31, 2024
88d5e22
periph: Remove redundant header file targets
fischeti Aug 5, 2024
63a20b8
periph: Move target to common Makefile
fischeti Aug 5, 2024
2249e94
periph: Regenerate regfile sources
fischeti Aug 5, 2024
20ddb74
Format sources, fix documentation and typos
fischeti Aug 5, 2024
66adb56
perip: Remove unused hardware barrier
fischeti Aug 5, 2024
37e8435
periph: Update regfile sources
fischeti Aug 5, 2024
b260be9
lint: Update waiver file for generated sources
fischeti Aug 5, 2024
a80cc8f
sw: Simplify `perf_cnt` functions
fischeti Aug 5, 2024
c52fd5e
test: Fix typo
fischeti Aug 5, 2024
9106309
sw: Add external linkage for inline perf_cnt functions
fischeti Aug 5, 2024
96d29d1
sw: Add document headers for performance counter functions
fischeti Aug 5, 2024
5288f93
Lint C sources
fischeti Aug 5, 2024
da57d70
Fix typo
fischeti Aug 5, 2024
944f9ab
periph: Move peripheral regfile to `generated` folder
fischeti Aug 5, 2024
681a404
periph: Add `_reg_pkg.sv` as additional target
fischeti Aug 5, 2024
d3e0581
make: Add phony `rtl` target
fischeti Aug 5, 2024
e11fec9
sim: Remove unecessary sed
fischeti Aug 6, 2024
a8c58b8
Revert "sim: Remove unecessary sed"
fischeti Aug 6, 2024
09a7109
make: Add `rtl` and `sw` to `all` target
fischeti Aug 6, 2024
086415d
make: Add `rtl` target to `help` command
fischeti Aug 6, 2024
061c437
make: Change reggen stdout message
fischeti Aug 6, 2024
660dd8c
make: Fix RTL source file list
fischeti Aug 6, 2024
715f340
Revert "Revert "sim: Remove unecessary sed""
fischeti Aug 6, 2024
fb90a0c
make: Fix non-existent `generated` folder prerequisite
fischeti Aug 6, 2024
2626fcf
ci: Update `bender` version
fischeti Aug 6, 2024
3b2e806
ci: Update `bender` version in Docker container
fischeti Aug 6, 2024
42f2af8
Bender.yml: No target for peripheral registers
fischeti Aug 6, 2024
8e3900c
Revert "make: Fix RTL source file list"
fischeti Aug 6, 2024
c968f2f
REVERT: Use custom docker container
fischeti Aug 6, 2024
e5a944a
Revert "ci: Update `bender` version in Docker container"
fischeti Aug 6, 2024
0953945
Revert "ci: Update `bender` version"
fischeti Aug 6, 2024
cc5c895
Revert "Revert "Revert "sim: Remove unecessary sed"""
fischeti Aug 6, 2024
6ec427e
Revert "REVERT: Use custom docker container"
fischeti Aug 6, 2024
505e070
periph: Track regfiles again in `hw` folder
fischeti Aug 6, 2024
b6c4983
ci: Add check that RTL sources are up to date
fischeti Aug 6, 2024
b907c5a
ci: Use container for checking sources
fischeti Aug 6, 2024
174b51b
ci: Don't use porcelain action
fischeti Aug 6, 2024
983458b
ci: Try new checkout version
fischeti Aug 7, 2024
0d28797
ci: Debug git version
fischeti Aug 7, 2024
cbe59e8
Revert "ci: Debug git version"
fischeti Aug 7, 2024
a234d6a
ci: Try again with porcelain action
fischeti Aug 7, 2024
0db2293
ci: Try something else
fischeti Aug 7, 2024
b8949f2
ci: Try another thing
fischeti Aug 7, 2024
ef9e468
ci: Try another thing
fischeti Aug 7, 2024
3113f7f
ci: Try another thing
fischeti Aug 7, 2024
814ed81
ci: Finally fix it
fischeti Aug 7, 2024
73661e5
lint: Remove non-existent Verilog sources
colluca Aug 7, 2024
c7dd9b0
lint: Merge source and opcode up-to-date jobs
colluca Aug 7, 2024
f184e67
target/snitch_cluster: Add `clean-rtl` Make target
colluca Aug 7, 2024
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
28 changes: 19 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
with:
paths: |
./hw
exclude_paths: |
./hw/future/test
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reviewdog_reporter: github-check
Expand All @@ -39,22 +37,34 @@ jobs:
uses: pulp-platform/pulp-actions/[email protected]

######################
# Opcodes Up-to-Date #
# Sources Up-to-Date #
######################
check-opcodes:
name: Check Opcodes Up-to-Date
runs-on: ubuntu-latest
sources-up-to-date:
name: Check Sources Up-to-Date
runs-on: ubuntu-22.04
container:
image: ghcr.io/pulp-platform/snitch_cluster:main
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Update opcodes and diff
- name: Generate opcodes
run: |
./util/generate-opcodes.sh
- name: Generate RTL sources
working-directory: target/snitch_cluster
run: |
make rtl
# For some reason, the checkout is done by a different user,
# than that running `git diff` (root, possibly due to Docker).
# So we need to set the repository as a safe directory.
- name: Git config safe.directory
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Diff porcelain
uses: mmontes11/[email protected]
with:
message: Found differences, please update all opcode
message: Found differences, please update all sources

#################
# Check License #
Expand Down
13 changes: 6 additions & 7 deletions hw/snitch_cluster/src/snitch_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ module snitch_cluster
tcdm_req_t [NrTCDMPortsCores-1:0] tcdm_req;
tcdm_rsp_t [NrTCDMPortsCores-1:0] tcdm_rsp;

core_events_t [NrCores-1:0] core_events;
tcdm_events_t tcdm_events;
dma_events_t dma_events;
core_events_t [NrCores-1:0] core_events;
tcdm_events_t tcdm_events;
dma_events_t [DMANumChannels-1:0] dma_events;
snitch_icache_pkg::icache_events_t [NrCores-1:0] icache_events;

// 4. Memory Subsystem (Core side).
Expand Down Expand Up @@ -959,7 +959,7 @@ module snitch_cluster
assign wide_axi_mst_req[SDMAMst + j] = axi_dma_req[j];
assign axi_dma_res[j] = wide_axi_mst_rsp[SDMAMst + j];
end
assign dma_events = dma_core_events[0]; // Only first channel is tracked
assign dma_events = dma_core_events;
end
end

Expand Down Expand Up @@ -1237,20 +1237,19 @@ module snitch_cluster
);

snitch_cluster_peripheral #(
.AddrWidth (PhysicalAddrWidth),
.reg_req_t (reg_req_t),
.reg_rsp_t (reg_rsp_t),
.tcdm_events_t (tcdm_events_t),
.dma_events_t (dma_events_t),
.NrCores (NrCores)
.NrCores (NrCores),
.DMANumChannels (DMANumChannels)
) i_snitch_cluster_peripheral (
.clk_i,
.rst_ni,
.reg_req_i (reg_req),
.reg_rsp_o (reg_rsp),
.icache_prefetch_enable_o (icache_prefetch_enable),
.cl_clint_o (cl_interrupt),
.cluster_hart_base_id_i (hart_base_id_i),
.core_events_i (core_events),
.tcdm_events_i (tcdm_events),
.dma_events_i (dma_events),
Expand Down
26 changes: 0 additions & 26 deletions hw/snitch_cluster/src/snitch_cluster_peripheral/Makefile

This file was deleted.

Loading
Loading