diff options
Diffstat (limited to 'test/passes/expand-whens/bundle-init.fir')
| -rw-r--r-- | test/passes/expand-whens/bundle-init.fir | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/passes/expand-whens/bundle-init.fir b/test/passes/expand-whens/bundle-init.fir new file mode 100644 index 00000000..48336c93 --- /dev/null +++ b/test/passes/expand-whens/bundle-init.fir @@ -0,0 +1,25 @@ +; RUN: firrtl -i %s -o %s.flo -x abcdefghijk -p cd | tee %s.out | FileCheck %s +; CHECK: Expand Whens +circuit top : + module A : + reg r : { x : UInt, flip y : UInt} + wire a : UInt + wire b : UInt + wire w : { x : UInt, flip y : UInt} + a := UInt(1) + b := UInt(2) + + w.x := b + w.y := a + r.x := a + r.y := b + on-reset r := w + +; CHECK: r$x := Register(mux-uu(reset, w$x, a), UInt(1)) +; CHECK: r$y := Register(b, UInt(1)) +; CHECK: a := UInt(1) +; CHECK: b := UInt(2) +; CHECK: w$x := b +; CHECK: w$y := mux-uu(reset, r$y, a) + +; CHECK: Finished Expand Whens |
