llvm / llvm/circt

[FIRRTL] Generate filelist for each public module

Open
#6,752 3 comments 0 reactions 0 assignees View on GitHub
bug FIRRTL
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

According to the FIRRTL ABI spec:

> Each public module in a circuit shall produce a filelist that contains the filename of the file containing the public module and any necessary files that define all public or private module files instantiated under it.

Source here: https://github.com/chipsalliance/firrtl-spec/blob/fcd97a59319eab2553afc301d13ccc9af965a2b8/abi.md?plain=1#L48

However, if you have this FIRRTL:

```firrtl
FIRRTL version 4.0.0
circuit Foo :
public module Bar :

public module Foo :
inst bar of Bar
```

And run this command:

```
$ firtool --split-verilog Foo.fir -o out
```

Then in the `out` directory, you'll get `Foo.sv`, `Bar.sv`, and `filelist.f`. The filelist is for module `Foo`, and it contains:

```
$ cat out/filelist.f
Bar.sv
Foo.sv
```

According to the ABI spec, we should get `out/filelist_Foo.f` and `out/filelist_Bar.f`, right?

Possibly related to https://github.com/llvm/circt/issues/6716.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the documented firtool command with the provided FIRRTL circuit and inspect the generated files in the output directory. Compare the result with the FIRRTL ABI specification and issue 6716; done means each public module has its own filelist containing its file and required instantiated module files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
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.