chipsalliance / chipsalliance/chisel
BlackBox IOs have wrong directions sometimes
- Dominant language
- Scala
- Stars
- 4.8k
- Forks
- 658
- Avg merge
- 18h 59m
- Merged PRs (30d)
- 14
Description
**Type of issue**: bug report
**Development Phase**: request
**Other information**
Found by Jacob Bass at NGC:
```
class blackboxTest extends BlackBox {
val io = IO(new Bundle {
val i1 = Input(Vec(3, UInt(4.W)))
val i2 = Vec(3, Input(UInt(4.W)))
})
}
class wrapper extends Module {
val blackbox = Module(new blackboxTest)
val io = IO(blackbox.io.cloneType)
io <> blackbox.io
}
```
This example does the wrong thing- I believe `i2` is an output instead of an input, and thus the bulk connect will not work correctly. The wrapper gets the right IOs with the right directions, so I'm pretty sure this is just a blackbox problem.
Contributor guide
Research direction
Start by reproducing the BlackBox example using the `BlackBox`, `Module`, `cloneType`, and bulk-connect entry points shown in the issue. Trace how directions are preserved for `i1` and `i2`; done means both vectors remain inputs and the wrapper's bulk connection works correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100