llvm / llvm/circt

[FIRRTL] Add create vector/bundle ops

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

Description

As [discussed](https://github.com/llvm/circt/pull/1304#discussion_r659352639) in #1304, constructing a vector or bundle currently requires a temporary `firrtl.wire`, with subfield/subindex ops and connects. This makes it generally difficult to find out if a vector/bundle is a constant, among other things.

It might make sense to introduce `create_vector` and `create_bundle` ops, similar to HW's `create_array` and `create_struct`, to generaten aggregate value from fields. It might also make sense to have a `create_vector_uniform` (after LLHD's `array_uniform`) which constructs a vector where all elements are the same.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the discussion in pull request #1304 and compare HW's create_array/create_struct with LLHD's array_uniform. Clarify the semantics and scope of create_vector, create_bundle, and any uniform variant; the work is done when the agreed aggregate construction operations are implemented and their behavior is verified.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.