lowRISC / lowRISC/opentitan

[dv] Confusing default tool when Xcelium is required

Open
#26,401 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:DV Tool:dvsim
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

_Originally posted by @Razer6 in https://github.com/lowRISC/opentitan/pull/26267#discussion_r1958513926_

The files `_sim.core` contain a field to specify a default tool `default_tool`. But when set to `xcelium` it causes issue:
`/bin/bash: line 0: cd: /home/dev/src/opentitan/scratch/acrc_init/ac_range_check-sim-xcelium/default/sim-vcs: No such file or directory`

I've tried to edit the file [fusesoc.hjson](https://github.com/lowRISC/opentitan/blob/d2aec59eacd1788fe077f8385330e94f58bd4ad1/hw/dv/tools/dvsim/fusesoc.hjson#L14) into:
`sv_flist_gen_dir: "{build_dir}/sim-{tool}"`

And change the default tool in `_sim.core` file into Xcelium: `default_tool: xcelium`

But now I have another issue where it says that a file is not found:
`xrun: *F,BDARGF: command line argument file '/home/dev/src/opentitan/scratch/acrc_init/ac_range_check-sim-xcelium/default/sim-xcelium/lowrisc_opentitan_top_darjeeling_ac_range_check_sim_0.1.scr' could not be opened for reading.`

All the IPs requiring Xcelium as default tool are keeping this `default_tool` variable set to `vcs`. This issue is not blocking but it is confusing.

FYI: I have opened an issue to track this @rswarbrick, @andreaskurth and @Razer6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with hw/dv/tools/dvsim/fusesoc.hjson and the affected _sim.core files, then trace how default_tool and {build_dir}/sim-{tool} are used to generate the simulator script path. Reproduce the Xcelium invocation and compare it with the VCS path. Done means IPs requiring Xcelium resolve the correct build directory and xrun can open the generated .scr file.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, testing, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.