[Python] 'Connect' syntax for Python bindings
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
I would like to add "late-connect" semantics to the Python bindings. That is, be able to create an arbitrary operation without having `Value`s for each operand. The user would be able to connect them later on using a `connect(a, b)` function. For instance, something like (pseudocode):
```
mod = rtl.RTLModuleOp(
name='MyWidget',
input_ports=[('in', i32)],
output_ports=[('out', i32)],
... )
inst1 = rtl.InstanceOp(mod, "instA")
reg1 = seq.CompRegOp(i32)
inst2 = rtl.InstanceOp(mod, "instB")
connect(inst2.out, inst1.in)
connect(inst1.out, reg1.q)
connect(reg1.d, inst2.in)
```
Would create a feedback loop with a register.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing Python bindings and operation-construction API first, comparing how operands are currently supplied with the proposed later connect(a, b) calls. Define the supported late-connect behavior, including the feedback-loop example, and add coverage for the illustrated sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100