[fpga] Porting device tests to the CW340
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
Part of #19009
Some tests are special-cased for the environment they run in (FPGA, DV-SIM, Verilator, etc.)
Often, a test will handle running on a CW310 but not a CW340.
The places that might require updates are:
* Device tests with special-casing for FPGAs because of clock speed requirements not covering the CW340.
* GPIO tests are currently broken: these need correct pad configurations for the CW340 boards to be defined.
* UART tests which use the second "device under test" UART are currently broken: opentitanlib can't seem to find this UART.
* SPI host tests are currently marked broken since we haven't got enough SPI flash chips installed in CI yet, but they're on the way.
* Some tests require some SPI and I2C devices connected by PMOD. We currently don't (and may not) support the break-out-board that we connect to PMOD on the CW340, so these are skipped.
* Tests which use the `binaries = { "...": "sram_program" }` seem to expect that program to have a single FPGA execution environment. They cannot depend on CW310 + CW340 binaries.
@a-will suggested we take this opportunity to pay back some technical debt around device tests special casing specific execution environments. Instead, tests should change their behaviour based on _properties_ of the environment, e.g. the clock speed, available pins, etc.
Contributor guide
Research direction
Start by inventorying the device tests with CW310/CW340 special cases, focusing on the GPIO, UART, SPI, I2C, and binary-execution cases listed here. Run the affected device tests and verify that environment-dependent behavior uses available properties, while unsupported hardware remains explicitly skipped.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100