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

Separate generation step from HW build #214

Merged
merged 8 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
70 changes: 61 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
bender vendor init
make -C target/snitch_cluster sw \
CFG_OVERRIDE=cfg/default.hjson
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/default.hjson
- name: Build Hardware
run: |
make -C target/snitch_cluster bin/snitch_cluster.vlt -j$(nproc) \
Expand Down Expand Up @@ -75,6 +79,10 @@ jobs:
CFG_OVERRIDE=cfg/snax-mac.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-mac.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-mac.hjson \
Expand All @@ -100,6 +108,10 @@ jobs:
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic \
CFG_OVERRIDE=cfg/snax-gemm.hjson
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-gemm.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-gemm.hjson \
Expand All @@ -125,6 +137,10 @@ jobs:
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic \
CFG_OVERRIDE=cfg/snax-streamer-gemm.hjson
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-gemm.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemm.hjson \
Expand All @@ -144,6 +160,10 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-gemm-add-c.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemm-add-c.hjson \
Expand All @@ -164,6 +184,10 @@ jobs:
CFG_OVERRIDE=cfg/snax-streamer-gemm-conv.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic -j$(nproc)
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-gemm-conv.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemm-conv.hjson \
Expand All @@ -189,6 +213,10 @@ jobs:
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic \
CFG_OVERRIDE=cfg/snax-data-reshuffler.hjson
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-data-reshuffler.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-data-reshuffler.hjson \
Expand All @@ -215,6 +243,10 @@ jobs:
CFG_OVERRIDE=cfg/snax-mac-mult.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-mac-mult.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-mac-mult.hjson \
Expand All @@ -241,6 +273,10 @@ jobs:
CFG_OVERRIDE=cfg/snax-alu.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-alu.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-alu.hjson \
Expand All @@ -267,6 +303,10 @@ jobs:
CFG_OVERRIDE=cfg/snax-streamer-simd.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-simd.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-simd.hjson \
Expand All @@ -287,6 +327,10 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-wide-gemm-data-reshuffler.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-wide-gemm-data-reshuffler.hjson \
Expand All @@ -301,16 +345,20 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemmX.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt -j$(nproc)
- name: Build Software
run: |
make -C target/snitch_cluster sw \
CFG_OVERRIDE=cfg/snax-streamer-gemmX.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-gemmX.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemmX.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt -j$(nproc)
- name: Run Tests
working-directory: target/snitch_cluster
run: |-
Expand All @@ -327,16 +375,20 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemmX-xdma.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt -j$(nproc)
- name: Build Software
run: |
make -C target/snitch_cluster sw \
CFG_OVERRIDE=cfg/snax-streamer-gemmX-xdma.hjson \
SELECT_RUNTIME=rtl-generic \
SELECT_TOOLCHAIN=llvm-generic
- name: Generate RTL
run: |
make -C target/snitch_cluster rtl-gen \
CFG_OVERRIDE=cfg/snax-streamer-gemmX-xdma.hjson
- name: Build Hardware
run: |
make CFG_OVERRIDE=cfg/snax-streamer-gemmX-xdma.hjson \
-C target/snitch_cluster bin/snitch_cluster.vlt -j$(nproc)
- name: Run Tests
working-directory: target/snitch_cluster
run: |-
Expand All @@ -345,7 +397,7 @@ jobs:
sw/snax-streamer-gemm-conv-simd-run.yaml \
sw/snax-xdma-run.yaml -j

############################################
#########################################
# Build SW on Snitch Cluster w/ Banshee #
#########################################

Expand Down
15 changes: 15 additions & 0 deletions hw/chisel_acc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
#
# Xiaoling Yi <[email protected]>


####################
# Path Definitions #
####################

MK_CUR_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

CHISEL_GENERATED_DIR = $(MK_CUR_DIR)generated

#######################
# Function Definition #
#######################
define gen_snax_acc_sv_file
mkdir -p $(MK_CUR_DIR)generated/$(1) && cd $(MK_CUR_DIR) && sbt "runMain snax_acc.$(1).$(2)"
endef
Expand Down Expand Up @@ -39,6 +47,13 @@ DR_SCALA_SOURCES := $(wildcard src/main/scala/snax_acc/$(DR_PKG_NAME)/*.scala)
$(DR_GENERATED_FILES): $(DR_SCALA_SOURCES)
$(call gen_snax_acc_sv_file,$(DR_PKG_NAME),$(DR))

.PHONY: rtl-chisel-acc-gen

rtl-chisel-acc-gen:
$(call gen_snax_acc_sv_file,$(GEMM_PKG_NAME),$(GEMM))
$(call gen_snax_acc_sv_file,$(GEMMX_PKG_NAME),$(GEMMX))
$(call gen_snax_acc_sv_file,$(DR_PKG_NAME),$(DR))

.PHONY: clean-data clean

clean:
Expand Down
2 changes: 1 addition & 1 deletion hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ${',' if not loop.last else ''}

// Main cluster package
// verilog_lint: waive-start package-filename
package ${cfg['pkg_name']};
package ${cfg['name']}_pkg;

// Addressing Parameters
localparam int unsigned HartBaseID = ${to_sv_hex(cfg['cluster_base_hartid'], 10)};
Expand Down
Loading
Loading