aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/bundle-init.fir
blob: f4ae9f6afacd3c96a0ad48ee99273d876171999b (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.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 with :
         reset => (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