[top,dv] Init TB top#213
Conversation
635b0bc to
707f37b
Compare
502ee48 to
6993e75
Compare
1a82036 to
db192ef
Compare
db192ef to
100762b
Compare
|
@ziuziakowska, I've just pushed all what I had related to the SW-DV topic mentioned in this issue. |
100762b to
7706116
Compare
bfb593e to
10e2f8e
Compare
marnovandermaas
left a comment
There was a problem hiding this comment.
This is some great work! Thanks for learning from Sunburst chip. I've done a code review and left some initial comments.
708aab1 to
12c93fa
Compare
|
@marnovandermaas, thanks a lot for your good review. I have now taken into account all the comment which required changes. There is only one remaining item: #213 (comment) Please let me know what you think I should do. If needed we can have a call next week |
12c93fa to
bea6709
Compare
- This solves a cache illegal state caused by an out of range array index in the decode logic in the id_stage.sv file. Signed-off-by: martin-velay <mvelay@lowrisc.org>
- Remove useless dependencies: crypto_dpi_prince, digestpp_dpi and kmac_pkg Signed-off-by: martin-velay <mvelay@lowrisc.org>
- The module instr_tracer is only used for non-Verilator simulations. It is a behavioral module that traces instructions executed by the core and logs them to a file. This is useful for debugging and performance analysis. Signed-off-by: martin-velay <mvelay@lowrisc.org>
- Required to get .log.txt and rodata.txt files needed by sw_logger_if. Signed-off-by: martin-velay <mvelay@lowrisc.org>
- This follows the pattern established in OpenTitan to create a dedicated simulation SRAM region that can be used by software running on the CPU to communicate directly with the DV environment. This is useful for logging and test status reporting from SW to DV. - See: https://opentitan.org/book/hw/dv/sv/sim_sram/index.html - This commit will close #249 Signed-off-by: martin-velay <mvelay@lowrisc.org>
- Include top_chip_sim_cfg.hjson into mocha_sim_cfg.hjson so that the top level regression is run when running the global regression. This is needed for the nightly/weekly CI regressions. Signed-off-by: martin-velay <mvelay@lowrisc.org>
- For the moment, only the signals are added to match the DUT, but they are not connected to any SPI agent. This will be done in a future PR. Signed-off-by: martin-velay <mvelay@lowrisc.org>
Signed-off-by: martin-velay <mvelay@lowrisc.org>
- Declare Verilator separatly from top_chip_system core into its own core file. This is needed to avoid circular dependencies after introducing the sim_sram_axi_sink for Verilator simulations. Signed-off-by: martin-velay <mvelay@lowrisc.org>
ac1e817 to
6f167f1
Compare
Signed-off-by: Alice Ziuziakowska <a.ziuziakowska@lowrisc.org>
Signed-off-by: martin-velay <mvelay@lowrisc.org>
6f167f1 to
691dd13
Compare
|
@engdoreis, I have applied the suggested patch. It fixes the UART issue, thanks! Now, it remains one issue, the CI will fail I believe while running Verilator tests. To fix this I need to change the address below into something else: My suspicion is that this below will trigger a simulation termination: mocha/hw/top_chip/dv/verilator/top_chip_verilator.sv Lines 109 to 116 in 691dd13 Anybody knows how to debug this with Verilator? @ziuziakowska or @engdoreis ? |
|
Locally, I use a script like this called #!/bin/sh
nix develop --command bash -c "build/lowrisc_mocha_top_chip_system_0/sim-verilator/Vtop_chip_verilator -t -E $1"So for example, You may be able to apply #289 on top of your branch temporarily and try running it with that, as that PR adds printing a register dump on an unhandled exception, so you'll get a view of the registers when the exception occurred printed to the UART (captured in |
- This change is required as the SW now performs special writes for the DV to know when the simulation should be terminated. In Verilator this was handled by a "magic word" write on the UART. Signed-off-by: martin-velay <mvelay@lowrisc.org>
engdoreis
left a comment
There was a problem hiding this comment.
I'm happy with the results produced by this PR.
ziuziakowska
left a comment
There was a problem hiding this comment.
LGTM on the SW side 👍.
|
The fpga runner error in CI is likely related to my experiments in the runner. |
marnovandermaas
left a comment
There was a problem hiding this comment.
Thanks for this PR and making CI pass. I've tested the command and it passes.
dvsim hw/top_chip/dv/top_chip_sim_cfg.hjson -i uart_smoke -t xceliumLet's get this PR merged and we can then build upon it with refinements.
|
fpga-test is failing, but the bitstream is building and it's failing on the flashing. This flashing is ok to fail for now as we are still building this CI step. |
|
Excellent! I am really happy, thanks all for your support and feedback. |
Linked to issue #31, but doesn't cover it all.
Instructions to get the C code running on the top level TB in UVM style:
dvsim hw/top_chip/dv/top_chip_sim_cfg.hjson -i uart_smoke -t xceliumResult:
Instructions to get the C code running on the top level TB in Verilator style:
fusesoc --cores-root=. run --target=sim --tool=verilator --setup --build lowrisc:mocha:top_chip_verilatorctest --test-dir build/sw -R sim_verilatorWhich should give: