aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/scoped-reg.fir
blob: b052df5def71bc21d555e8bc6dbf10dab1c7f822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: firrtl -i %s -o %s.flo -X flo -p c 2>&1 | tee %s.out | FileCheck %s
; XFAIL: *
circuit top :
   module top :
      input clk : Clock
      input reset : UInt<1>
      wire p : UInt
      p := UInt(1)
      when p :
         reg r : UInt, clk, reset
         onreset r := UInt(1)
         r := UInt(2)

; CHECK: Expand Whens

; CHECK: circuit top :
; CHECK:   module top :
; CHECK:   wire p : UInt
; CHECK:   reg r : UInt, clk, reset
; CHECK-NOT:  when p : r := mux(reset, UInt("h00000001"), UInt("h00000002"))

; CHECK: Finished Expand Whens