From 2cf26ba655e59937f5a52aa50db2d97538d1fdde Mon Sep 17 00:00:00 2001 From: azidar Date: Wed, 13 May 2015 10:42:36 -0700 Subject: Updated Spec. Added scoped-reg which exposes on-reset bug. Fixed lowering bug --- test/passes/expand-whens/scoped-reg.fir | 12 ++++++++++++ test/passes/lower-to-ground/test.fir | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/passes/expand-whens/scoped-reg.fir create mode 100644 test/passes/lower-to-ground/test.fir (limited to 'test/passes') diff --git a/test/passes/expand-whens/scoped-reg.fir b/test/passes/expand-whens/scoped-reg.fir new file mode 100644 index 00000000..20c91386 --- /dev/null +++ b/test/passes/expand-whens/scoped-reg.fir @@ -0,0 +1,12 @@ +; RUN: firrtl -i %s -o %s.flo -x abcdefghijk -p c | tee %s.out | FileCheck %s +; CHECK: Expand Whens +circuit top : + module A : + wire p : UInt + when p : + reg r : UInt + on-reset r := UInt(10) + r := UInt(20) +; CHECK: r := Register(mux-uu(reset, UInt(10), UInt(20)), mux-uu(reset, UInt(1), p)) +; CHECK: Finished Expand Whens + diff --git a/test/passes/lower-to-ground/test.fir b/test/passes/lower-to-ground/test.fir new file mode 100644 index 00000000..fb951bff --- /dev/null +++ b/test/passes/lower-to-ground/test.fir @@ -0,0 +1,13 @@ +; RUN: firrtl -i %s -o %s.flo -x X -p cd | tee %s.out | FileCheck %s +; CHECK: Done! + +circuit Top : + module Queue : + output out : {valid : UInt<1>, flip ready : UInt<1>} + module Top : + output this : {out : {valid : UInt<1>, flip ready : UInt<1>}} + inst queue of Queue + this.out := queue.out + wire w : { x : UInt, flip y : UInt} + wire a : UInt + w.y := a -- cgit v1.2.3