diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index d2362dbd17..01d62e765d 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -33,7 +33,7 @@ grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboom chipyard-spif grouping["group-accels"]="chipyard-mempress chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-manymmioaccels" grouping["group-constellation"]="chipyard-constellation" grouping["group-tracegen"]="tracegen tracegen-boom" -grouping["group-other"]="icenet testchipip constellation" +grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar" grouping["group-fpga"]="arty vcu118 vc707" # key value store to get the build strings @@ -69,6 +69,10 @@ mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests" mapping["icenet"]="SUB_PROJECT=icenet" mapping["testchipip"]="SUB_PROJECT=testchipip" +mapping["rocketchip-amba"]="SUB_PROJECT=rocketchip CONFIG=AMBAUnitTestConfig" +mapping["rocketchip-tlsimple"]="SUB_PROJECT=rocketchip CONFIG=TLSimpleUnitTestConfig" +mapping["rocketchip-tlwidth"]="SUB_PROJECT=rocketchip CONFIG=TLWidthUnitTestConfig" +mapping["rocketchip-tlxbar"]="SUB_PROJECT=rocketchip CONFIG=TLXbarUnitTestConfig" mapping["arty"]="SUB_PROJECT=arty verilog" mapping["vcu118"]="SUB_PROJECT=vcu118 verilog" diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 8173486ec7..973baea2ca 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -28,6 +28,10 @@ run_tracegen () { make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } +run_none () { + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ run-binary-fast BINARY=none $@ +} + case $1 in chipyard-rocket) run_bmark ${mapping[$1]} @@ -120,13 +124,25 @@ case $1 in make run-binary-hex BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; icenet) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + run_none ${mapping[$1]} ;; testchipip) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + run_none ${mapping[$1]} ;; constellation) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + run_none ${mapping[$1]} + ;; + rocketchip-amba) + run_none ${mapping[$1]} + ;; + rocketchip-tlsimple) + run_none ${mapping[$1]} + ;; + rocketchip-tlwidth) + run_none ${mapping[$1]} + ;; + rocketchip-tlxbar) + run_none ${mapping[$1]} ;; *) echo "No set of tests for $1. Did you spell it right?" diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index d357637c43..231315be82 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -857,6 +857,44 @@ jobs: group-key: "group-other" project-key: "testchipip" + rocketchip-run-tests: + name: rocketchip-run-tests + needs: prepare-chipyard-other + runs-on: self-hosted + steps: + - name: Delete old checkout + run: | + ls -alh . + rm -rf ${{ github.workspace }}/* || true + rm -rf ${{ github.workspace }}/.* || true + ls -alh . + - name: Checkout + uses: actions/checkout@v3 + - name: Git workaround + uses: ./.github/actions/git-workaround + - name: Create conda env + uses: ./.github/actions/create-conda-env + - name: Run amba tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "rocketchip-amba" + - name: Run tlsimple tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "rocketchip-tlsimple" + - name: Run tlwidth tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "rocketchip-tlwidth" + - name: Run tlxbar tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "rocketchip-tlxbar" + constellation-run-tests: name: constellation-run-tests needs: prepare-chipyard-other @@ -980,6 +1018,7 @@ jobs: tracegen-run-tests, icenet-run-tests, testchipip-run-tests, + rocketchip-run-tests, constellation-run-tests, prepare-chipyard-fpga, # firesim-run-tests, fireboom-run-tests] diff --git a/generators/rocket-chip b/generators/rocket-chip index 78c43fe7f6..284b3608cc 160000 --- a/generators/rocket-chip +++ b/generators/rocket-chip @@ -1 +1 @@ -Subproject commit 78c43fe7f617f9352b05ea32316387778a8a2e19 +Subproject commit 284b3608ccdd084e7fe157364c4f3c7e27001652 diff --git a/variables.mk b/variables.mk index 89e66cd92d..dc4669af12 100644 --- a/variables.mk +++ b/variables.mk @@ -89,7 +89,7 @@ ifeq ($(SUB_PROJECT),hwacha) TB ?= TestDriver TOP ?= ExampleRocketSystem endif -# For TestChipIP developers +# For TestChipIP developers running unit-tests ifeq ($(SUB_PROJECT),testchipip) SBT_PROJECT ?= chipyard MODEL ?= TestHarness @@ -101,6 +101,18 @@ ifeq ($(SUB_PROJECT),testchipip) TB ?= TestDriver TOP ?= UnitTestSuite endif +# For rocketchip developers running unit-tests +ifeq ($(SUB_PROJECT),rocketchip) + SBT_PROJECT ?= chipyard + MODEL ?= TestHarness + VLOG_MODEL ?= $(MODEL) + MODEL_PACKAGE ?= chipyard.unittest + CONFIG ?= TLSimpleUnitTestConfig + CONFIG_PACKAGE ?= freechips.rocketchip.unittest + GENERATOR_PACKAGE ?= chipyard + TB ?= TestDriver + TOP ?= UnitTestSuite +endif # For IceNet developers ifeq ($(SUB_PROJECT),icenet) SBT_PROJECT ?= chipyard