diff options
| author | azidar | 2016-01-16 15:49:51 -0800 |
|---|---|---|
| committer | azidar | 2016-01-16 15:49:51 -0800 |
| commit | ea9cb9c8b34b78e3bc4d0bd474521b60acfbbc26 (patch) | |
| tree | d3e8cce922d4fc1b40e9d41e1c05b3d843107387 /test/passes/remove-accesses/bundle-vecs.fir | |
| parent | 9dcb5684957e684174d97a45f80d1cfad887a741 (diff) | |
| parent | 81e47120c8586871fd96e22e0626591d3b5a7cc5 (diff) | |
Merge branch 'new-mem' of github.com:ucb-bar/firrtl into scala-new-mem
Diffstat (limited to 'test/passes/remove-accesses/bundle-vecs.fir')
| -rw-r--r-- | test/passes/remove-accesses/bundle-vecs.fir | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/passes/remove-accesses/bundle-vecs.fir b/test/passes/remove-accesses/bundle-vecs.fir new file mode 100644 index 00000000..13f9d8d6 --- /dev/null +++ b/test/passes/remove-accesses/bundle-vecs.fir @@ -0,0 +1,44 @@ +; RUN: firrtl -i %s -o %s.v -X verilog -p c 2>&1 | tee %s.out | FileCheck %s + +; CHECK: Remove Accesses +circuit top : + module top : + wire i : UInt + i <= UInt(1) + wire j : UInt + j <= UInt(1) + + wire a : { x : UInt<32>, flip y : UInt<32> }[2] + a[0].x <= UInt(1) + a[0].y <= UInt(1) + a[1].x <= UInt(1) + a[1].y <= UInt(1) + + wire b : { x : UInt<32>, flip y : UInt<32> } + b <= a[i] + j <= b.x + b.y <= UInt(1) + +; CHECK: wire i : UInt<1> +; CHECK: i <= UInt("h1") +; CHECK: wire j : UInt<32> +; CHECK: j <= UInt("h1") +; CHECK: wire a : { x : UInt<32>, flip y : UInt<32>}[2] +; CHECK: a[0].x <= UInt("h1") +; CHECK: a[0].y <= UInt("h1") +; CHECK: a[1].x <= UInt("h1") +; CHECK: a[1].y <= UInt("h1") +; CHECK: wire b : { x : UInt<32>, flip y : UInt<32>} +; CHECK: wire GEN : UInt<32> +; CHECK: GEN <= a[0].x +; CHECK: when eqv(UInt("h1"), i) : GEN <= a[1].x +; CHECK: b.x <= GEN +; CHECK: wire GEN_1 : UInt<32> +; CHECK: when eqv(UInt("h0"), i) : a[0].y <= GEN_1 +; CHECK: when eqv(UInt("h1"), i) : a[1].y <= GEN_1 +; CHECK: GEN_1 <= b.y +; CHECK: j <= b.x +; CHECK: b.y <= UInt("h1") +; CHECK: Finished Remove Access +; CHECK: Done! + |
