llvm / llvm/circt

[ExportVerilog] Add support for bit swapping idiom

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

Description

ExportVerilog emits a concat that bitswaps like this:

```
thing = {io_in1[0], io_in1[1], io_in1[2], io_in1[3], io_in1[4]...}
```

but there are better idioms for this. We could generate them directly, and we may want to introduce a comb op for bitswapping.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the ExportVerilog handling of concatenations like the shown io_in1 bit sequence. Determine which bit-swapping idiom should be emitted and whether a dedicated comb operation is needed; done means the exporter handles this pattern with the agreed idiom and covers the behavior with appropriate validation.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.