[ci] Enable bitstream generation and FPGA testing for the CW310 board
This commit enables the bistream generation and FPGA testing for the
ChipWhisperer CW310 FPGA board in CI. To this end, support for this
board is added to the pytest-based test infrastructure. Finally, the
test configuration is changed to run all tests on the CW310 FPGA board
(including previously disabled OTBN and Entropy Source tests), and only
a small number of tests on the NexysVideo board.
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
diff --git a/test/systemtest/utils.py b/test/systemtest/utils.py
index e5bbbdd..9ee37f2 100644
--- a/test/systemtest/utils.py
+++ b/test/systemtest/utils.py
@@ -203,7 +203,7 @@
class LoggingSerial(serial.Serial):
- """ Acess to a serial console which logs all read/written data to file. """
+ """ Access to a serial console which logs all read/written data to file. """
def __init__(self,
*args,
log_dir_path,
@@ -366,16 +366,21 @@
def load_sw_over_spi(tmp_path,
- spiflash_path,
+ loader_path,
sw_test_bin,
- spiflash_args=[],
+ loader_args=[],
timeout=600):
- """ Use the spiflash utility to load software onto a device. """
+ """ Use the specified loader utility to load software onto a device. """
log.info("Flashing device software from {} over SPI".format(
str(sw_test_bin)))
- cmd_flash = [spiflash_path, '--input', sw_test_bin] + spiflash_args
+ # cw310_loader.py supports both loading bistream and firmware.
+ if re.search('cw310_loader', str(loader_path)):
+ bin_arg = '--firmware'
+ else: # spiflash loads firmware only.
+ bin_arg = '--input'
+ cmd_flash = [loader_path, bin_arg, sw_test_bin] + loader_args
p_flash = Process(cmd_flash, logdir=tmp_path, cwd=tmp_path)
p_flash.run()
p_flash.proc.wait(timeout=timeout)