Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 onNothing
InputEvery directory in the project’s cores_root, such as hw
Commandfusesoc --cores-root hw run --setup --target=<target> [--tool=<tool>] [--mapping=<core>] --work-root filelist/work <core>
Outputfilelist/work/: a copy of every source file under src/, and the tool’s files
Key toolsfusesoc, by the version fusesoc --version prints, and the hash of the FuseSoC plugin that plans the command
Passes whenfusesoc 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

FlowCoreTarget--tool--mapping
TestRIGdut.core, the testbenchdefaultNot passed: the target’s own default_toolNone
Lintcore of the design’s own filetarget of the config, lintThe linter’s: see belowEach of mappings

What FuseSoC writes

Besides the sources, what is in filelist/work/ depends on the tool. The flatten step reads it.

ToolFilesWritten by
The target’s own (TestRIG)One flat .scr filelistEdalize’s backend for that tool, such as vcs
verilator (lint with Verilator)A .vc argument file, and config.mkEdalize’s Verilator backend
veriblelint, slang (lint with either)Only <core>.eda.yml, the EDAM fileFuseSoC, for every tool
ascentlint (lint with AscentLint)sources.f, run-ascentlint.tcl and a Makefile, and the EDAM fileEdalize’s AscentLint backend
  • TestRIG’s target must use a tool whose backend writes one flat .scr filelist, such as vcs. 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:flop and not lowrisc: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.