Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIRRTL][CheckCombLoops] Missing RWProbeOp support, crashes #6820

Open
dtzSiFive opened this issue Mar 13, 2024 · 1 comment · May be fixed by #6824
Open

[FIRRTL][CheckCombLoops] Missing RWProbeOp support, crashes #6820

dtzSiFive opened this issue Mar 13, 2024 · 1 comment · May be fixed by #6824
Assignees
Labels
bug Something isn't working FIRRTL Involving the `firrtl` dialect

Comments

@dtzSiFive
Copy link
Contributor

Example FIRRTL:

FIRRTL version 3.3.0
circuit Bar :
  module Foo :
    input clock : Clock
    output clockProbe_bore : RWProbe<Clock>

    define clockProbe_bore = rwprobe(clock)

  module Bar :
    input clock : Clock
    output clockProbe : RWProbe<Clock>

    inst foo of Foo
    connect foo.clock, clock
    define clockProbe = foo.clockProbe_bore

    force(clock, UInt<1>(1), clockProbe, asClock(UInt<1>(0)))

--parse-only:

firrtl.circuit "Bar" {
  firrtl.module private @Foo(in %clock: !firrtl.clock sym @sym, out %clockProbe_bore: !firrtl.rwprobe<clock>) {
    %0 = firrtl.ref.rwprobe <@Foo::@sym> : !firrtl.rwprobe<clock>
    firrtl.ref.define %clockProbe_bore, %0 : !firrtl.rwprobe<clock>
  }
  firrtl.module @Bar(in %clock: !firrtl.clock, out %clockProbe: !firrtl.rwprobe<clock>) attributes {convention = #firrtl<convention scalarized>} {
    %foo_clock, %foo_clockProbe_bore = firrtl.instance foo @Foo(in clock: !firrtl.clock, out clockProbe_bore: !firrtl.rwprobe<clock>)
    firrtl.strictconnect %foo_clock, %clock : !firrtl.clock
    firrtl.ref.define %clockProbe, %foo_clockProbe_bore : !firrtl.rwprobe<clock>
    %c1_ui1 = firrtl.constant 1 : !firrtl.uint<1>
    %c0_ui1 = firrtl.constant 0 : !firrtl.uint<1>
    %0 = firrtl.asClock %c0_ui1 : (!firrtl.uint<1>) -> !firrtl.clock
    firrtl.ref.force %clock, %c1_ui1, %clockProbe, %0 : !firrtl.clock, !firrtl.uint<1>, !firrtl.clock
  }
}

Crashes (or assert failure) when trying to resolve the force.

Flagged in review: #5647 (comment) .

@dtzSiFive dtzSiFive added bug Something isn't working FIRRTL Involving the `firrtl` dialect labels Mar 13, 2024
@dtzSiFive
Copy link
Contributor Author

I'll PR a workaround to unbreak RWProbe, assigned to you @prithayan since you're familiar and I believe already working on it. LMK if have any questions or can help 👍.

(RWProbeOp resolution may be lacking re:ergonomics for this usage presently)

dtzSiFive added a commit to dtzSiFive/circt that referenced this issue Mar 13, 2024
Unbreak this, at cost of missing loops through force, while
the better fix is being worked out.

cc llvm#6820.
dtzSiFive added a commit that referenced this issue Mar 13, 2024
…6821)

Unbreak this, at cost of missing loops through force, while
the better fix is being worked out.

cc #6820.
@prithayan prithayan linked a pull request Mar 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants