llvm / llvm/circt

firtool 1.131.0 generates references to non-existant layer files

Open
#9,020 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

When generating a single verilog file, the layer files are included, even if they are not generated, leading to errors.

1. untar [no-include.tar.gz](https://github.com/user-attachments/files/22542462/no-include.tar.gz)
2. Run `firtool '--format=mlir' --disable-all-randomization -strip-debug-info '-disable-layers=Verification' '-disable-layers=Verification.Assert' '-disable-layers=Verification.Assume' '-disable-layers=Verification.Cover' counter_fir.fir -o counter.sv`

Now we see that references to non-existant files are generated:

```
$ grep include counter.sv
`include "layers-TestCounter-Verification.sv"
`include "layers-TestCounter-Verification.sv"
`include "layers-TestCounter-Verification.sv"
$ find . | grep layers
$
```

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

Extract no-include.tar.gz and run the firtool command from the issue to reproduce the generated counter.sv output. Trace the layer-include generation path for the disabled Verification layers and determine why references remain when no layer files are emitted. Done means counter.sv contains no references to those nonexistent layer files, with an appropriate regression check if the existing test structure is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.