Subfield domain association to wires should be rejected
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 67/100
Research direction
Start by running the Scala reproduction in the issue and inspect how associate handles bundle subfields compared with port subfields. Look for existing tests covering domain associations and add a case for associating wire.clock or wire.reset. Done means elaboration rejects the unsupported subfield association instead of silently dropping it.
Written by the indexing model from the issue text.
Description
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
//> using scala 2.13.18
//> using dep org.chipsalliance::chisel:7.15.0+11-6a43b9a1-SNAPSHOT
//> using plugin org.chipsalliance:::chisel-plugin:7.15.0+11-6a43b9a1-SNAPSHOT
//> using repository https://central.sonatype.com/repository/maven-snapshots
import chisel3._
import chisel3.domains.ClockDomain
import circt.stage.ChiselStage
object ReproChiselWireFieldDomain {
class ClockReset extends Bundle {
val clock = Clock()
val reset = Reset()
}
class Repro extends RawModule {
val A = IO(Input(ClockDomain.Type()))
val source = IO(Input(new ClockReset))
val wire = Wire(new ClockReset)
wire := source
// Error when port subfield was associated.
// associate(source.clock, A)
associate(wire.clock, A)
associate(wire.reset, A)
}
def main(args: Array[String]): Unit = {
val chirrtl = ChiselStage.emitCHIRRTL(new Repro)
println(chirrtl)
}
}
$ scala-cli foo.scala
...
wire wire : { clock : Clock, reset : Reset}
...
What is the current behavior?
FIRRTL is emitted successfully.
associate(wire.clock, A)
associate(wire.reset, A)
is silently dropped. For ports it's rejected properly.
What is the expected behavior?
It should be chisel elaboration error since subfield domain association is not supported.
Please tell us about your environment:
Other Information
What is the use case for changing the behavior?
- Dominant language
- Scala
- Stars
- 4.8k
- Forks
- 662
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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.
More from chipsalliance/chisel
-
LFSR.tapsMaxPeriod: 17 second tap sets (widths 725 to 755) are a single number larger than the widthOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
chipsalliance/chisel#5512 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chipsalliance/chisel#5504 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
chipsalliance/chisel#5499 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 54/100
chipsalliance/chisel#5430 · 2 comments ·
Maintainers usually reply within 1 day
-
MultiClockSpec chiselTest fails with recent Verilator versionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
chipsalliance/chisel#5418 · 3 comments ·
Maintainers usually reply within 1 day
All issues in chipsalliance/chisel
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug 🐞 Untriaged user issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
valkey-io/valkey-glide#7443 ·
Maintainers usually reply within 1 day
-
OpenAPI: PowSolutions requires pk, w and d, but a V2 solution needs only nPossibly taken A pull request linked to this issue is open or already merged. OpenA-api C-bug S-ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ergoplatform/ergo#2851 ·
Maintainers usually reply within 2 days
-
? - Needs Triage audit_4.2.0 feature request test
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
NVIDIA/cudf-spark#16614 ·
Maintainers usually reply within 1 day
-
bug unit testing velox backend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days