filelist
Asks FuseSoC for a core’s sources, as one EDA tool sees them. Used by TestRIG for the testbench and by Lint for the design, once per linter.
| Depends on | Nothing |
| Input | Every directory in the project’s cores_root, such as hw |
| Command | fusesoc --cores-root hw run --setup --target=<target> [--tool=<tool>] [--mapping=<core>] --work-root filelist/work <core> |
| Output | filelist/work/: a copy of every source file under src/, and the tool’s files |
| Key tools | fusesoc, by the version fusesoc --version prints, and the hash of the FuseSoC plugin that plans the command |
| Passes when | fusesoc exits 0 and filelist/work/ exists |
--setup resolves the core and its dependencies, copies their files into the work root and writes the EDA tool’s files. Nothing is compiled and no tool is run.
What each flow asks for
| Flow | Core | Target | --tool | --mapping |
|---|---|---|---|---|
| TestRIG | dut.core, the testbench | default | Not passed: the target’s own default_tool | None |
| Lint | core of the design’s own file | target of the config, lint | The linter’s: see below | Each of mappings |
What FuseSoC writes
Besides the sources, what is in filelist/work/ depends on the tool. The flatten step reads it.
| Tool | Files | Written by |
|---|---|---|
| The target’s own (TestRIG) | One flat .scr filelist | Edalize’s backend for that tool, such as vcs |
verilator (lint with Verilator) | A .vc argument file, and config.mk | Edalize’s Verilator backend |
veriblelint, slang (lint with either) | Only <core>.eda.yml, the EDAM file | FuseSoC, for every tool |
ascentlint (lint with AscentLint) | sources.f, run-ascentlint.tcl and a Makefile, and the EDAM file | Edalize’s AscentLint backend |
- TestRIG’s target must use a tool whose backend writes one flat
.scrfilelist, such asvcs. The simulator that compiles it need not be that tool. - The EDAM file lists each file with its type, the target’s parameters, its top module and its options for each tool. Edalize’s Verible and slang backends write nothing at setup. They make the command line from the EDAM when they run the tool, and the flatten step does the same. AscentLint’s backend writes its filelist and run script at setup. The flatten step rebases the filelist, and makes the script again from the EDAM.
- Filesets can depend on the tool. A core keeps a fileset for one tool with a
tool_<name> ?condition, such as a linter’s waiver files. So the sources of two jobs with different tools can differ.
The cache key
The key covers everything under the cores roots, because any file there could be a core file or a source. That is coarse, but the step is quick. Later steps are keyed on filelist/work/ itself, so an edit to a file the core doesn’t use reruns this step and nothing after it.
To check by hand
filelist/stderr.log lists each core FuseSoC prepared, ending with the core that was asked for. The log is not an output of the step, so it is only there after a run with --debug, or if the step did not pass (see What is left in a step’s directory).
- Check the versions it picked are the ones you expect.
- Where the design leaves cores virtual, check the providers are the ones you mean, such as
lowrisc:prim_generic:flopand notlowrisc:prim_xilinx:flop.
The files later steps read are the copies in filelist/work/src/, not the files in the repo, so paths in tool messages point there.