aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/two-when.fir
blob: d3adf5f298bb2cbdf17e119a85af6a43dc5d5279 (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
28
29
30
31
32
33
34
35
; RUN: firrtl -i %s -o %s.flo -x abcdefghijk -p c | tee %s.out | FileCheck %s

; CHECK: Expand Whens
circuit top :
   module top :
      mem m :{ x : UInt<1>, y : UInt<1> }[2] 
      wire i : UInt<1>
      wire p : UInt<1>
      wire q : { x : UInt<1>, y : UInt<1> }
      when p :
        wire p2 : UInt<1>
        reg r5 : UInt<1>
        when p2 :
          accessor a = m[i] 
          q := a
          accessor b = m[i]
          b := q
        else :
          accessor c = m[i] 
          q := c
          accessor d = m[i]
          d := q
      else :
        wire p3 : UInt<1>
        when p3 :
          accessor w = m[i] 
          q := w
          accessor x = m[i]
          x := q
        else :
          accessor y = m[i] 
          q := y
          accessor z = m[i]
          z := q
; CHECK: Finished Expand Whens