llvm / llvm/circt

[FIRRTL] Program Slicer for debugging

Open
#2,477 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We sometimes want to extract specific module(s) to debug the module. It is sometime tedious to make the module valid by hand if the module has many sub-instances. So it would be useful to have kind of program slicing tool which externalizes instances or memories at fir level.

Something like
```bash
./firrtl-slicer foo.fir -module-name="Bar" -subinstances={externalize, flatten-depth=n, flatten-all} -convert-abstract-reset-to={i1, async}
```
It might be fine just adding this feature to circt-reduce though. Also it might be possible to reuse ExtractTestCode logic.

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 circt-reduce and the mentioned ExtractTestCode logic to determine where a slicer could fit. Clarify the scope and interface for selecting a module, externalizing or flattening subinstances, and converting abstract resets. Done should be demonstrated by coverage for the agreed slicing behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.