10000 CloneType Should Preserve Probe-ness · Issue #3647 · chipsalliance/chisel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CloneType Should Preserve Probe-ness #3647
Open
@seldridge

Description

@seldridge

The following seems like incorrect behavior. If I cloneType a Probe, I get back the original, un-probed type. It should return the Probe type.

Consider:

//> using scala "2.13.11"
//> using repository sonatype-s01:snapshots
//> using lib "org.chipsalliance::chisel::6.0.0-M3+117-2372b1c4-SNAPSHOT"
//> using plugin "org.chipsalliance:::chisel-plugin::6.0.0-M3+117-2372b1c4-SNAPSHOT"
//> using options "-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations"

import chisel3._
import chisel3.probe.Probe
import circt.stage.ChiselStage

class Foo extends RawModule {
  val a = IO(Probe(Bool()))
  val b = IO(a.cloneType)
}

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

This produces (scala-cli Foo.scala):

FIRRTL version 3.3.0
circuit Foo :
  module Foo : 
    output a : Probe<UInt<1>> 
    output b : UInt<1> 

    skip

I'd expect to get:

FIRRTL version 3.3.0
circuit Foo :
  module Foo : 
    output a : Probe<UInt<1>> 
    output b : Probe<UInt<1>>

    skip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0