aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/bundle-init.fir
blob: 48336c93a63ab74e6fec107230542eba1a36b5c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; RUN: firrtl -i %s -o %s.flo -x abcdefghijk -p cd | tee %s.out | FileCheck %s
; CHECK: Expand Whens
circuit top :
   module A :
      reg r : { x : UInt, flip y : UInt}
      wire a : UInt
      wire b : UInt
      wire w : { x : UInt, flip y : UInt}
      a := UInt(1)
      b := UInt(2)

      w.x := b
      w.y := a
      r.x := a
      r.y := b
      on-reset r := w

; CHECK: r$x := Register(mux-uu(reset, w$x, a), UInt(1))
; CHECK: r$y := Register(b, UInt(1))
; CHECK: a := UInt(1)
; CHECK: b := UInt(2)
; CHECK: w$x := b
; CHECK: w$y := mux-uu(reset, r$y, a)   
      
; CHECK: Finished Expand Whens