Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Subfield domain association to wires should be rejected

Open
#5,507 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
scala
Domain
compilers

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chipsalliance/chisel

All issues in chipsalliance/chisel

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.