aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-connect-indexed/bundle-vecs.fir
blob: 35b45b6c9e2900910121ad9a04fab2c60c795feb (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 abcdefghi -p c | tee %s.out | FileCheck %s

; CHECK: Expand Indexed Connects
circuit top :
   module q :
      wire i : UInt
      wire j : UInt

      wire a : { x : UInt<32>, flip y : UInt<32> }[2]
      ; CHECK: wire a$0$x : UInt<32>
      ; CHECK: wire a$0$y : UInt<32>
      ; CHECK: wire a$1$x : UInt<32>
      ; CHECK: wire a$1$y : UInt<32>

      accessor b = a[i]
      ; CHECK: wire b$x : UInt<32>
      ; CHECK: wire b$y : UInt<32>
      ; CHECK: b$x := a$0$x
      ; CHECK: when eq-uu(i, UInt(1)) :
      ; CHECK:    b$x := a$1$x
      ; CHECK: a$0$y := b$y
      ; CHECK: when eq-uu(i, UInt(1)) :
      ; CHECK:    a$1$y := b$y
      j := b
      
; CHECK: Finished Expand Indexed Connects