Skip to content

Commit

Permalink
Add SNAX GEMM (pulp-platform#25)
Browse files Browse the repository at this point in the history
* bender: Add snax-gemm to bender

* bender: Update bender with latest snax-gemm repo

* hw: Add snax-gemm.sv

* hw: Modify snitch_cluster and add snax-gemm instance

* hw: Modify snitch cluster template

* docs: Modify snitch cluster schema

* lint: Exclude snax_gemm from license check

* hw: Lint snax_gemm

* cfg: Modify snax.hjson with new config

* improve gemm

* modify gemm.sv

* hw: modify status CSR

* cfg: Add snax-hjson configuration

* tests: Renamed snax-run.yaml to snax-mac-run.yaml

* cfg: Modify to use MAC generation

* cfg: Rename snax.hjson to snax-mac.hjson

* ci: Change build to SNAX-MAC runs

* cfg: Modify snax-gemm.hjson

* tests: Add snax-gemm-run.yaml

* ci: Add the SNAX-GEMM in CI

* ci: Fix lint indentation

* cfg: Take out original Snitch compute core templates

---------

Co-authored-by: xiaoling-yi <[email protected]>
  • Loading branch information
2 people authored and JosseVanDelm committed Dec 11, 2023
1 parent 0b29e68 commit eb67e8a
Show file tree
Hide file tree
Showing 13 changed files with 656 additions and 62 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
# Simulate SW on Snax Cluster w/ Verilator #
############################################

sw-snax-cluster-vlt:
name: Simulate SW on SNAX Cluster w/ Verilator
sw-snax-mac-cluster-vlt:
name: Simulate SW on SNAX MAC Cluster w/ Verilator
runs-on: ubuntu-22.04
container:
image: ghcr.io/pulp-platform/snitch_cluster:main
Expand All @@ -61,7 +61,7 @@ jobs:
submodules: 'recursive'
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax.hjson \
make CFG_OVERRIDE=cfg/snax-mac.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt
- name: Build Software
run: |
Expand All @@ -70,8 +70,30 @@ jobs:
- name: Run Tests
working-directory: target/snitch_cluster
run: |-
./run.py sw/tests/snax-run.yaml --simulator verilator
./run.py sw/apps/snax-run.yaml --simulator verilator
./run.py sw/tests/snax-mac-run.yaml --simulator verilator
./run.py sw/apps/snax-mac-run.yaml --simulator verilator
sw-snax-gemm-cluster-vlt:
name: Simulate SW on SNAX GEMM Cluster w/ Verilator
runs-on: ubuntu-22.04
container:
image: ghcr.io/pulp-platform/snitch_cluster:main
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-gemm.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt
- name: Build Software
run: |
make -C target/snitch_cluster sw
- name: Run Tests
working-directory: target/snitch_cluster
run: |-
./run.py sw/tests/snax-gemm-run.yaml --simulator verilator
./run.py sw/apps/snax-gemm-run.yaml --simulator verilator
############################################
# Build SW on Snitch Cluster w/ Banshee #
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
sw/math/Makefile
hw/snitch/src/csr_snax_def.sv
hw/snax_hwpe_mac/src/*
hw/snax_gemm/src/*
target/snitch_cluster/sw/apps/snax-mac/*
target/snitch_cluster/sw/apps/snax-mac-simple/*
Expand Down
10 changes: 9 additions & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ package:
- Nils Wistoff <[email protected]>
- Luca Bertaccini <[email protected]>
- Matheus Cavalcante <[email protected]>
- Xiaoling Yi <[email protected]>
- Ryan Antonio <[email protected]>

dependencies:
axi: { git: https://github.com/pulp-platform/axi, version: 0.39.0 }
Expand All @@ -27,6 +29,7 @@ dependencies:
tech_cells_generic: { git: https://github.com/pulp-platform/tech_cells_generic, version: 0.2.11 }
riscv-dbg: { git: https://github.com/pulp-platform/riscv-dbg, version: 0.8.0 }
hwpe-mac-engine: { git: https://github.com/KULeuven-MICAS/hwpe-mac-engine.git, rev: 5d3b4525b665169fc8321c8a811f3c83ad3c72e8 }
snax-gemm: { git: https://github.com/KULeuven-MICAS/snax-gemm.git, rev: 6b538447969cb0c00a4b749b38d68ae932c6aca1 }

vendor_package:
- name: musl
Expand Down Expand Up @@ -184,13 +187,18 @@ sources:
files:
- hw/snitch/test/snitch_l0_tlb_tb.sv

# hwpe_mac
# snax mac
- files:
# Level 0
- hw/snax_hwpe_mac/src/snax_hwpe_ctrl.sv
- hw/snax_hwpe_mac/src/snax_hwpe_to_reqrsp.sv
- hw/snax_hwpe_mac/src/snax_mac.sv

# snax gemm
- files:
# Level 0
- hw/snax_gemm/src/snax_gemm.sv

# snitch_vm
- files:
- hw/snitch_vm/src/snitch_ptw.sv
Expand Down
10 changes: 5 additions & 5 deletions docs/schema/snitch_cluster.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@
"description": "Enable Smallfloat vector extension (SIMD).",
"default": false
},
"snax": {
"type": "boolean",
"title": "SNAX Extension",
"description": "Enable Snitch Accelerator eXtension (SNAX)",
"default": false
"snax_acc": {
"type": "number",
"title": "SNAX Accelerator Extension",
"description": "Enable specific Snitch Accelerator eXtension (SNAX). 1 for MAC engine and 2 for GEMM engine.",
"default": 0
},
"snax_tcdm_ports": {
"type": "number",
Expand Down
Loading

0 comments on commit eb67e8a

Please sign in to comment.