aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/bundle-init.fir
blob: 21bbbc52d9bd0ed26858cf43e0be8cb193fd05f5 (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
26
27
; RUN: firrtl -i %s -o %s.flo -X flo -p cd 2>&1 | tee %s.out | FileCheck %s
; CHECK: Expand Whens
circuit top :
   module top :
      input clk : Clock
      input reset : UInt<1>
      reg r : { x : UInt, y : UInt},clk,reset
      wire a : UInt
      wire b : UInt
      wire w : { x : UInt, y : UInt}
      a := UInt(1)
      b := UInt(2)

      w.x := b
      w.y := a
      r.x := a
      r.y := b
      onreset r := w

; CHECK: r$x := mux(reset, w$x, a)
; CHECK: r$y := mux(reset, w$y, b)
; CHECK: a := UInt("h1")
; CHECK: b := UInt("h2")
; CHECK: w$x := b
; CHECK: w$y := a
      
; CHECK: Finished Expand Whens