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

      w.x <= b
      w.y <= a
      r.x <= a
      r.y <= b

; CHECK: w.x <= b
; CHECK: w.y <= a
; CHECK: r.x <= a
; CHECK: r.y <= b
; CHECK: a <= UInt("h1")
; CHECK: b <= UInt("h2")
      
; CHECK: Finished Expand Whens