llvm / llvm/circt

[ExportVerilog] Improve assignments inlining logic

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

Description

Currently assignments inlining logic is relying on heuristic about IR structure (specifically assigned vale must be located at the previous point). This restriction causes weird output like this:
```
wire _GEN_3 = a | b;
wire foo;
assign foo = _GEN_3;
wire bar;
assign bar = _GEN_3;
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing ExportVerilog's assignment-inlining logic and inspect how it relies on IR ordering, using the example output as a reproduction. The work is done when assignments whose values are not at the previous point can be inlined without producing the unnecessary shared wire shown in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.