Path of FixedIO's io generated invalid target

Open
#4,714 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
scala
Domain
compilers

Research direction

Run the provided Scala reproduction using FixedIORawModule, Property(Path(io)), and ChiselStage.emitCHIRRTL, then inspect the path generated in the emitted FIRRTL. Trace how the FixedIO target becomes OMReferenceTarget and determine whether the result should be made valid or rejected explicitly; done means no invalid path is emitted.

Written by the indexing model from the issue text.

Description

Type of issue: Bug Report

Please provide the steps to reproduce the problem:

Run this:

//> using repository "sonatype-s01:snapshots"
//> using scala "2.13.14"
//> using dep "org.chipsalliance::chisel:7.0.0-M2+364-7b029eed-SNAPSHOT"
//> using plugin "org.chipsalliance:::chisel-plugin:7.0.0-M2+364-7b029eed-SNAPSHOT"

import chisel3._
import chisel3.properties.{Path, Property}
import circt.stage.ChiselStage

class TargetIO(width: Int) extends Bundle {
  val in = Flipped(UInt(width.W))
  val out = UInt(width.W)
}

class VerifTarget extends FixedIORawModule[TargetIO](new TargetIO(8)) {
  io.out := io.in

  val p = Wire(Output(Property[Path]()))
  p := Property(Path(io))
}

object Main extends App {
  println(ChiselStage.emitCHIRRTL(new VerifTarget))
}

What is the current behavior?

Produces:

FIRRTL version 4.2.0
circuit VerifTarget :
  ; (removed layer decls)
  public module VerifTarget :
    input in : UInt<8>
    output out : UInt<8>

    connect out, in
    wire p : Path
    propassign p, path("OMReferenceTarget:~_$$View$$_|_$$AbsoluteView$$_>view")

The path("OMReferenceTarget:~_$$View$$_|_$$AbsoluteView$$_>view") is the issue.

What is the expected behavior?

Valid path, or error if unsupported/invalid.

Please tell us about your environment:

Other Information

What is the use case for changing the behavior?

Dominant language
Scala
Stars
4.8k
Forks
669
Avg merge
1d 12h
Merged PRs (30d)
25

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.