intel / intel/rohd

Collapse equivalent in-line assignments in the SystemVerilog synthesizer

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Dart
Stars
489
Forks
88
Avg merge
3d 23h
Merged PRs (30d)
10

Description

## Motivation
Verbosity of generated SystemVerilog could be reduced by collapsing in-line assignments where the driver is equal.
For example, merge these two:
```SystemVerilog
assign out = {b,a}; // swizzle_0
assign out_0 = {b,a}; // swizzle
```

## Desired solution
Add a function called something like `_collapseEquivalentInlineModules` to the SystemVerilog synthesizer, run similarly to `_collapseChainableModules`.

## Alternatives considered
Abandon this idea and rely on other SystemVerilog generators like CIRCT for fancier optimization like this.

## Additional details
Do not collapse non-renameable outputs directly, create a buffer signal... maybe do this before collapsing assignments, always add a buffer, then let assignment collapsing handle it?
This can be easily done using existing merge capabilities for synthlogic?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.