-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dvsim] Various questions #22243
Comments
Hi @lmg260a, thanks for reporting this issue.
We will update the documentation in PR #22251.
This command starts dvsim, which isn't a simulator by itself but interfaces different EDA tools that elaborate the RTL and run the simulation. The default simulator for Earlgrey top-level test is VCS. Do you have VCS installed and is it available on your
The errors about "test X added to regression Y not found" aren't relevant for your problem (though they can be puzzling). The real problem is indicated by the last line I quoted: the build failed. Can you paste the |
This addresses an issue raised in lowRISC#22243. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
This addresses an issue raised in lowRISC#22243. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
This addresses an issue raised in #22243. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
I don't have VCS - I do have Questasim, but it runs on CentOS, not Ubuntu. When I try to run build-only, I do get the qrun command, but when I try to run it, it errors out with this. ** Error: (qrun-7) Failed to open -f file "/opentitan/Ubuntu1/opentitan/scratch/master/uart-sim-questa/default/sim-vcs/lowrisc_dv_uart_sim_0.1.scr" in read mode. I saw two problems:
So what I did was try to do dry-run with VCS, so I could at least look at the VCS .scr file. But I don't get one generated from it either. So I suspect that there's some command that I need to do, or change, so I get a .scr file for Questa or VCS or Verilator. BTW - I do have all of this running in a Docker container running Ubuntu, and I've got it scripted to do all the installs in a Dockerfile and Makefile, in case that would be useful to you. Then other users will get up and running faster. |
While there is a Questa configuration for dvsim, we don't currently actively use it in the project and we thus don't officially support it. When you run a top-level test (i.e., when running |
Thanks - this was my build command; it didn't report pass or fail. cd opentitan/hw/top_earlgrey; ../..//util/topgen.py -t data/top_earlgrey.hjson -o . -v The last few lines were: I saw no errors, and only two warnings: When I attemped to run the sim, I got: ERROR: [Modes] Test "chip_plic_all_irqs" added to regression "xcelium_ci_0" not found! So I can't tell what happened with the chip-level build. My guess is that it abruptly died. |
when I attempt to run with Verilator on just the UART: I get But since it doesn't say what values are the problem, I don't know how to fix it. |
That command only needs to be run to generate the
As mentioned before, those errors aren't relevant for your problem. Do you have a |
I found opentitan/scratch/master/chip_earlgrey_asic-sim-vcs/default/build.log |
Your
Please follow our Getting Started guide to prepare a development environment in which you can work with OpenTitan. |
I walked through the Getting Started guide and implemented each step - but I missed adding export PATH=~/.local/bin:$PATH" to the standard project environment; I just did it in a single shell. So I've fixed that - thanks! |
I reran and get I don't see any new files in /scratch so this is all I have for debug. |
We only use and support dvsim with VCS and Xcelium for simulation at this time. Verilator can be used to run some tests that aren't based on UVM environments; see Verilator setup for more information. |
I have Verilator working for the smoketest, how do I tell which tests will run in Verilator and which ones won't. ERROR: [CfgFactory] '/opentitan/Ubuntu1/opentitan/hw/dv/tools/dvsim/verilator.hjson': Value for key 'run_dir' is '{scratch_path}/{run_dir_name}/out', but we already had a conflicting value of '{scratch_path}/{run_dir_name}/latest'. |
Good!
I think this rather tells us that dvsim currently doesn't work well with Verilator (independent of the test). We don't actively use and support simulations with Verilator through dvsim at this point. |
I'm trying to get Questa to run, what do you recommend is the best approach to do that? |
Description
https://opentitan.org/book/hw/top_earlgrey/index.html says to execute this command, and it executes successfully.
NOTE: the HTML does not say which directory to run in, it would be useful if the user did not have to figure it out.
cd $(REPO_TOP)/hw/top_earlgrey; ../..//util/topgen.py -t data/top_earlgrey.hjson -o . -v
https://opentitan.org/book/hw/top_earlgrey/dv/index.html says to execute this command to simulate the UART.
cd $(REPO_TOP);./util/dvsim/dvsim.py hw/top_earlgrey/dv/chip_sim_cfg.hjson -i chip_sw_uart_tx_rx
However, the following errors occur:
INFO: [dvsim] [proj_root]: /opentitan/Ubuntu1/opentitan
INFO: [SimCfg] [scratch_path]: [chip] [/opentitan/Ubuntu1/opentitan/scratch/master/chip_earlgrey_asic-sim-vcs]
ERROR: [Modes] Test "chip_plic_all_irqs" added to regression "xcelium_ci_0" not found!
ERROR: [Modes] Test "chip_sw_aes_force_prng_reseed" added to regression "V2" not found!
ERROR: [Modes] Test "chip_plic_all_irqs" added to regression "V2" not found!
ERROR: [Modes] Test "chip_sw_aes_prng_reseed" added to regression "V2" not found!
INFO: [StatusPrinter] [ legend ]: [Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total]
INFO: [StatusPrinter] 00:00:00 [ build ]: [Q: 0, D: 1, P: 0, F: 0, K: 0, T: 1] 0% chip:default
WARNING: [Deploy] chip:default: Job runtime not found in the log. Using dvsim-maintained job_runtime instead.
ERROR: [Scheduler] [00:00:01]: [build]: [status] [chip:default: F]
INFO: [StatusPrinter] 00:00:01 [ build ]: [Q: 0, D: 0, P: 0, F: 1, K: 0, T: 1] 100%
INFO: [StatusPrinter] 00:00:01 [ run ]: [Q: 0, D: 0, P: 0, F: 0, K: 5, T: 5] 100%
INFO: [FlowCfg] [results]: [chip]:
I am guessing that there are some intermediate steps required for generating the rest of the RTL, but it is not obvious to me what command(s) are required.
The text was updated successfully, but these errors were encountered: