From 9aece67a41879bf31ab29c2e418c7649bb8ec125 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Mon, 27 Mar 2023 15:39:47 +0200 Subject: [PATCH] testfw: test read bytes from CDI Signed-off-by: Daniel Lublin --- hw/application_fpga/fw/testfw/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/application_fpga/fw/testfw/main.c b/hw/application_fpga/fw/testfw/main.c index 5b5a9f7..835d370 100644 --- a/hw/application_fpga/fw/testfw/main.c +++ b/hw/application_fpga/fw/testfw/main.c @@ -238,6 +238,14 @@ int main() anyfailed = 1; } + // Should be able to read bytes from CDI. + uint8_t cdi_readback_bytes[CDI_WORDS * 4]; + memcpy(cdi_readback_bytes, (void *)cdi, CDI_WORDS * 4); + if (!memeq(cdi_writetest, cdi_readback_bytes, CDI_WORDS * 4)) { + failmsg("Can't read bytes from CDI"); + anyfailed = 1; + } + // Test FW_RAM. puts("\r\nTesting FW_RAM (takes 15s on hw)...\r\n"); for (unsigned int i = 0; i < TK1_MMIO_FW_RAM_SIZE; i++) {