Skip to content

Commit

Permalink
Move HITL test control logic from Tcl to Haskell
Browse files Browse the repository at this point in the history
This enables more fine-grained control of HITL test control execution from
Haskell code. It:

 * Moves test control logic from `bittide-shake/data/tcl/HardwareTest.tcl` to
   `bittide-shake/src/Clash/Shake/Vivado.hs`. Instead of letting Vivado execute
   Tcl files, it is now controlled by attaching to stdin and stdout of Vivado in
   Tcl mode through the new vivado-hs package.

 * Test definitions are no longer stored in JSON files, but using the new HitlTest
   type.
  • Loading branch information
JvWesterveld authored and martijnbastiaan committed Sep 6, 2024
1 parent 06b3b08 commit 0c1035d
Show file tree
Hide file tree
Showing 39 changed files with 1,908 additions and 2,111 deletions.
26 changes: 13 additions & 13 deletions .github/synthesis/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
{"top": "switchCalendar1k", "stage": "hdl"},
{"top": "switchCalendar1kReducedPins", "stage": "pnr"},

{"top": "boardTestExtended", "stage": "test", "targets": "All" },
{"top": "boardTestSimple", "stage": "test", "targets": "All" },
{"top": "extraProbesTest", "stage": "test", "targets": "Specific [0]" },
{"top": "fincFdecTests", "stage": "test", "targets": "Specific [-1]"},
{"top": "fullMeshHwCcTest", "stage": "test", "targets": "All" },
{"top": "fullMeshHwCcWithRiscvTest", "stage": "test", "targets": "All" },
{"top": "fullMeshSwCcTest", "stage": "test", "targets": "All" },
{"top": "hwCcTopologyTest", "stage": "test", "targets": "All" },
{"top": "linkConfigurationTest", "stage": "test", "targets": "All" },
{"top": "syncInSyncOut", "stage": "test", "targets": "All" },
{"top": "temperatureMonitor", "stage": "test", "targets": "All" },
{"top": "transceiversUpTest", "stage": "test", "targets": "All" },
{"top": "vexRiscvTest", "stage": "test", "targets": "Specific [-1]"}
{"top": "boardTestExtended", "stage": "test"},
{"top": "boardTestSimple", "stage": "test"},
{"top": "extraProbesTest", "stage": "test"},
{"top": "fincFdecTests", "stage": "test"},
{"top": "fullMeshHwCcTest", "stage": "test"},
{"top": "fullMeshHwCcWithRiscvTest", "stage": "test"},
{"top": "fullMeshSwCcTest", "stage": "test"},
{"top": "hwCcTopologyTest", "stage": "test"},
{"top": "linkConfigurationTest", "stage": "test"},
{"top": "syncInSyncOut", "stage": "test"},
{"top": "temperatureMonitor", "stage": "test"},
{"top": "transceiversUpTest", "stage": "test"},
{"top": "vexRiscvTest", "stage": "test"}
]
11 changes: 5 additions & 6 deletions .github/synthesis/staging.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[
{"top": "fullMeshHwCcTest", "stage": "test", "targets": "All"},
{"top": "fullMeshSwCcTest", "stage": "test", "targets": "All"},
{"top": "linkConfigurationTest", "stage": "test", "targets": "All"},
{"top": "safeDffSynchronizer", "stage": "hdl"},
{"top": "transceiversUpTest", "stage": "test", "targets": "All"},
{"top": "vexRiscvTest", "stage": "test", "targets": "Specific [-1]"}
{"top": "fullMeshHwCcTest", "stage": "test"},
{"top": "fullMeshSwCcTest", "stage": "test"},
{"top": "linkConfigurationTest", "stage": "test"},
{"top": "transceiversUpTest", "stage": "test"},
{"top": "vexRiscvTest", "stage": "test"}
]
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
./cargo.sh build --frozen --release
export BITTIDE_ARTIFACT_ACCESS_TOKEN="${{ secrets.GITHUB_TOKEN }}"
export RUNREF="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
cabal run -- bittide-tools:cc-plot ${{ github.run_id }}:hwCcTopologyTest _build/plot hitl-topology-plots
cabal run -- bittide-tools:cc-plot ${{ github.run_id }}:hwCcTopologyTest hitl-topology-plots
- name: Generate clock control reports
run: |
Expand Down Expand Up @@ -641,7 +641,7 @@ jobs:
- name: Run tests on hardware
run: |
.github/scripts/with_vivado.sh \
shake ${{ matrix.target.top }}:test --hardware-targets="${{ matrix.target.targets}}"
shake ${{ matrix.target.top }}:test
- name: Archive ILA data
if: ${{ !cancelled() }}
Expand Down
1 change: 1 addition & 0 deletions bittide-experiments/bittide-experiments.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ common common-options
ghc-typelits-extra,
ghc-typelits-knownnat,
ghc-typelits-natnormalise,
template-haskell,

library
import: common-options
Expand Down
Loading

0 comments on commit 0c1035d

Please sign in to comment.