Skip to content

Commit

Permalink
[FIRRTL] async-reset.fir: Check handling of fullasync on non-port.
Browse files Browse the repository at this point in the history
Fails for now.
  • Loading branch information
dtzSiFive committed May 3, 2024
1 parent 727b9f8 commit ccf5778
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion test/firtool/async-reset.fir
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: firtool %s | FileCheck %s
; RUN: firtool --split-input-file %s | FileCheck %s

FIRRTL version 3.3.0
; CHECK-LABEL: module test(
circuit test :%[[{
"class":"sifive.enterprise.firrtl.FullAsyncResetAnnotation",
"target":"~test|test>reset"
Expand All @@ -25,3 +26,33 @@ circuit test :%[[{
connect reg1, in
connect reg2, reg1
connect out, reg2

;// -----
; CHECK-LABEL: module test_wire(
FIRRTL version 3.3.0
circuit test_wire :%[[{
"class":"sifive.enterprise.firrtl.FullAsyncResetAnnotation",
"target":"~test_wire|test_wire>reset"
}]]
module test_wire :
input clock : Clock
input r : AsyncReset
input in : { foo : UInt<8>, bar : UInt<8>}
output out : { foo : UInt<8>, bar : UInt<8>}

node reset = r

wire reg1_w : { foo : UInt<8>, bar : UInt<8>}
invalidate reg1_w.bar
invalidate reg1_w.foo
; CHECK: reg1_foo <= 8'hC;
; CHECK: reg1_bar <= 8'h0;
connect reg1_w.foo, UInt<8>(0hc)
invalidate reg1_w.bar
; CHECK: reg1_foo = 8'hC;
; CHECK: reg1_bar = 8'h0;
regreset reg1 : { foo : UInt<8>, bar : UInt<8>}, clock, reset, reg1_w
wire reg2 : { foo : UInt<8>, bar : UInt<8>}
connect reg1, in
connect reg2, reg1
connect out, reg2

0 comments on commit ccf5778

Please sign in to comment.