Skip to content

Commit d794581

Browse files
committed
Add rocketchip unit-tests to regressions
1 parent 72d0c41 commit d794581

File tree

5 files changed

+77
-6
lines changed

5 files changed

+77
-6
lines changed

.github/scripts/defaults.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboom chipyard-spif
3333
grouping["group-accels"]="chipyard-mempress chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-manymmioaccels"
3434
grouping["group-constellation"]="chipyard-constellation"
3535
grouping["group-tracegen"]="tracegen tracegen-boom"
36-
grouping["group-other"]="icenet testchipip constellation"
36+
grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar"
3737
grouping["group-fpga"]="arty vcu118 vc707"
3838

3939
# key value store to get the build strings
@@ -69,6 +69,10 @@ mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests"
6969
mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests"
7070
mapping["icenet"]="SUB_PROJECT=icenet"
7171
mapping["testchipip"]="SUB_PROJECT=testchipip"
72+
mapping["rocketchip-amba"]="SUB_PROJECT=rocketchip CONFIG=AMBAUnitTestConfig"
73+
mapping["rocketchip-tlsimple"]="SUB_PROJECT=rocketchip CONFIG=TLSimpleUnitTestConfig"
74+
mapping["rocketchip-tlwidth"]="SUB_PROJECT=rocketchip CONFIG=TLWidthUnitTestConfig"
75+
mapping["rocketchip-tlxbar"]="SUB_PROJECT=rocketchip CONFIG=TLXbarUnitTestConfig"
7276

7377
mapping["arty"]="SUB_PROJECT=arty verilog"
7478
mapping["vcu118"]="SUB_PROJECT=vcu118 verilog"

.github/scripts/run-tests.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ run_tracegen () {
2828
make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@
2929
}
3030

31+
run_none () {
32+
make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ run-binary-fast BINARY=none $@
33+
}
34+
3135
case $1 in
3236
chipyard-rocket)
3337
run_bmark ${mapping[$1]}
@@ -119,13 +123,25 @@ case $1 in
119123
make run-binary-hex BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]}
120124
;;
121125
icenet)
122-
make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]}
126+
run_none ${mapping[$1]}
123127
;;
124128
testchipip)
125-
make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]}
129+
run_none ${mapping[$1]}
126130
;;
127131
constellation)
128-
make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]}
132+
run_none ${mapping[$1]}
133+
;;
134+
rocketchip-amba)
135+
run_none ${mapping[$1]}
136+
;;
137+
rocketchip-tlsimple)
138+
run_none ${mapping[$1]}
139+
;;
140+
rocketchip-tlwidth)
141+
run_none ${mapping[$1]}
142+
;;
143+
rocketchip-tlxbar)
144+
run_none ${mapping[$1]}
129145
;;
130146
*)
131147
echo "No set of tests for $1. Did you spell it right?"

.github/workflows/chipyard-run-tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,44 @@ jobs:
857857
group-key: "group-other"
858858
project-key: "testchipip"
859859

860+
rocketchip-run-tests:
861+
name: rocketchip-run-tests
862+
needs: prepare-chipyard-other
863+
runs-on: self-hosted
864+
steps:
865+
- name: Delete old checkout
866+
run: |
867+
ls -alh .
868+
rm -rf ${{ github.workspace }}/* || true
869+
rm -rf ${{ github.workspace }}/.* || true
870+
ls -alh .
871+
- name: Checkout
872+
uses: actions/checkout@v3
873+
- name: Git workaround
874+
uses: ./.github/actions/git-workaround
875+
- name: Create conda env
876+
uses: ./.github/actions/create-conda-env
877+
- name: Run amba tests
878+
uses: ./.github/actions/run-tests
879+
with:
880+
group-key: "group-other"
881+
project-key: "rocketchip-amba"
882+
- name: Run tlsimple tests
883+
uses: ./.github/actions/run-tests
884+
with:
885+
group-key: "group-other"
886+
project-key: "rocketchip-tlsimple"
887+
- name: Run tlwidth tests
888+
uses: ./.github/actions/run-tests
889+
with:
890+
group-key: "group-other"
891+
project-key: "rocketchip-tlwidth"
892+
- name: Run tlxbar tests
893+
uses: ./.github/actions/run-tests
894+
with:
895+
group-key: "group-other"
896+
project-key: "rocketchip-tlxbar"
897+
860898
constellation-run-tests:
861899
name: constellation-run-tests
862900
needs: prepare-chipyard-other
@@ -980,6 +1018,7 @@ jobs:
9801018
tracegen-run-tests,
9811019
icenet-run-tests,
9821020
testchipip-run-tests,
1021+
rocketchip-run-tests,
9831022
constellation-run-tests,
9841023
prepare-chipyard-fpga, # firesim-run-tests,
9851024
fireboom-run-tests]

variables.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ifeq ($(SUB_PROJECT),hwacha)
8989
TB ?= TestDriver
9090
TOP ?= ExampleRocketSystem
9191
endif
92-
# For TestChipIP developers
92+
# For TestChipIP developers running unit-tests
9393
ifeq ($(SUB_PROJECT),testchipip)
9494
SBT_PROJECT ?= chipyard
9595
MODEL ?= TestHarness
@@ -101,6 +101,18 @@ ifeq ($(SUB_PROJECT),testchipip)
101101
TB ?= TestDriver
102102
TOP ?= UnitTestSuite
103103
endif
104+
# For rocketchip developers running unit-tests
105+
ifeq ($(SUB_PROJECT),rocketchip)
106+
SBT_PROJECT ?= chipyard
107+
MODEL ?= TestHarness
108+
VLOG_MODEL ?= $(MODEL)
109+
MODEL_PACKAGE ?= chipyard.unittest
110+
CONFIG ?= TLSimpleUnitTestConfig
111+
CONFIG_PACKAGE ?= freechips.rocketchip.unittest
112+
GENERATOR_PACKAGE ?= chipyard
113+
TB ?= TestDriver
114+
TOP ?= UnitTestSuite
115+
endif
104116
# For IceNet developers
105117
ifeq ($(SUB_PROJECT),icenet)
106118
SBT_PROJECT ?= chipyard

0 commit comments

Comments
 (0)