[dv] Add support for HW_ID for SW#584
Conversation
martin-velay
commented
May 26, 2026
- Related to issue [DV infra] Extend the dv_window register to support querying the platform #423
- This commit adds support for a HW_ID register that can be used by SW DV tests to identify the hardware they are running on. This is useful for SW DV tests that need to run on multiple hardware platforms and need a way to differentiate between them.
engdoreis
left a comment
There was a problem hiding this comment.
Thanks for working on this, can you read the HW_ID in the test_framework and print it as test?
| parameter bit [31:0] SW_DV_LOG_ADDR = SW_DV_START_ADDR + 'h04; | ||
| parameter bit [31:0] SW_DV_HW_ID_ADDR = SW_DV_START_ADDR + 'h08; | ||
|
|
||
| parameter bit [31:0] SW_DV_HW_ID = 32'h0000_002A; |
There was a problem hiding this comment.
Are you planing to add this to FPGA?
marnovandermaas
left a comment
There was a problem hiding this comment.
We should also have an ID for the FPGA platform.
| `SIM_SRAM_IF.hw_id_addr = SW_DV_HW_ID_ADDR; | ||
| `SIM_SRAM_IF.hw_id = SW_DV_HW_ID; |
There was a problem hiding this comment.
Nit: maybe put this in alphabetical order?
| localparam bit [31:0] VERILATOR_SW_DV_TEST_STATUS_ADDR = VERILATOR_SW_DV_START_ADDR + 'h00; | ||
| localparam bit [31:0] VERILATOR_SW_DV_HW_ID_ADDR = VERILATOR_SW_DV_START_ADDR + 'h08; | ||
|
|
||
| localparam bit [31:0] VERILATOR_HW_ID = 32'h0000_001A; // Verilator specific ID |
There was a problem hiding this comment.
How did you choose this value?
There was a problem hiding this comment.
I followed @engdoreis instructions from this issue: #423
|
@marnovandermaas, about:
I am unsure how this can be implemented for the FPGA platform. Maybe I can add something similar as done for Verilator? |
|
I have tested, and indeed there was an issue. Now I can see this in the With this patch: diff_sw_dv_hw_id.patch |
e700905 to
cd48d60
Compare
- Related to issue lowRISC#423 - This commit adds support for a HW_ID register that can be used by SW DV tests to identify the hardware they are running on. This is useful for SW DV tests that need to run on multiple hardware platforms and need a way to differentiate between them. Signed-off-by: martin-velay <mvelay@lowrisc.org>