oxidecomputer / oxidecomputer/vw

Need a way to designate sim-only files from the local project

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6
Forks
1
Avg merge
32m
Merged PRs (30d)
5

Description

For testing, we want to have simulation-only entities in the same project that we swap for real IP in synthesis/FPGA build. One example of this is for testing/simulating the Versal NoC. We want to be able to swap between our own NMU/NSU entities (units for sending and receiving on the NoC) for simulation and the XPM IP cores for FPGA builds, because the XPM IP cores provided by Vivado require use of their simulator.

The only avenue to designate files sim-only at the moment is via bringing them in as an external library in vw.toml as we do here and then binding them via component with a synthesis directive as done here. This solution works if the IP has no dependence on any libraries other than the standard ones, but it is not the most clear that the entity itself is sim-only entity.

We briefly discussed and @rcgoodfellow suggested the following options:
• having some kind of marker at the top of a file like -- #vw(sim-only)
• having something in vw.toml
• having sim-only sources live in some particular subfolder by convention

Contributor guide

No contributing guide indexed for this repository

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 by reading the external-library configuration in vw.toml and the synthesis directive in hdl/nmu_inst_wrap.vhd, then compare how local project sources are discovered. Review the three proposed approaches in the issue before choosing a design. Done means a project can clearly mark simulation-only sources and select them for simulation without making synthesis/FPGA builds use them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.