aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/two-when.fir
blob: b2f052dc87fdc1db7f468ff0e8c0b262d105215a (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
; RUN: firrtl %s abcdefghijk c | tee %s.out | FileCheck %s 

; CHECK: Expand Whens
circuit top :
   module top :
      mem m : UInt(1)[2]
      wire i : UInt(1)
      wire p : UInt(1)
      when p :
        wire p2 : UInt(1)
        when p2 :
          accessor a = m[i] 
          i := a
          accessor b = m[i]
          b := i
        else :
          accessor c = m[i] 
          i := c
          accessor d = m[i]
          d := i
      else :
        wire p3 : UInt(1)
        when p3 :
          accessor w = m[i] 
          i := w
          accessor x = m[i]
          x := i
        else :
          accessor y = m[i] 
          i := y
          accessor z = m[i]
          z := i
; CHECK: Finished Expand Whens