aboutsummaryrefslogtreecommitdiff
path: root/test/parser/bundle.fir
diff options
context:
space:
mode:
authorJack2015-10-12 16:45:21 -0700
committerJack2015-10-12 16:45:21 -0700
commit0c288c48382f1b31fbfb1c202867fb444e46136c (patch)
tree6b3498b1ebae1cbd3f7298165cae631a7f6c6bd1 /test/parser/bundle.fir
parentd1295b29d89e07645c3a4e08f2f923455a868482 (diff)
Added support for no width to mean unknown, and print nothing instead of <?> for unknown width. Also added test to check this
Diffstat (limited to 'test/parser/bundle.fir')
-rw-r--r--test/parser/bundle.fir43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/parser/bundle.fir b/test/parser/bundle.fir
new file mode 100644
index 00000000..15fa26d0
--- /dev/null
+++ b/test/parser/bundle.fir
@@ -0,0 +1,43 @@
+; RUN: firrtl -i %s -o %s.out -X HighFIRRTL && cat %s.out | FileCheck %s
+circuit top :
+ module top :
+ wire z : { x : UInt, flip y: SInt}
+ z.x := UInt(1)
+ z.y := SInt(1)
+ node x = z.x
+ node y = z.y
+ wire a : UInt<3>[10]
+ a[0] := UInt(1)
+ a[1] := UInt(1)
+ a[2] := UInt(1)
+ a[3] := UInt(1)
+ a[4] := UInt(1)
+ a[5] := UInt(1)
+ a[6] := UInt(1)
+ a[7] := UInt(1)
+ a[8] := UInt(1)
+ a[9] := UInt(1)
+ node b = a[2]
+ read accessor c = a[UInt(3)]
+
+; CHECK: circuit top :
+; CHECK: module top :
+; CHECK: wire z : { x : UInt, flip y : SInt }
+; CHECK: z.x := UInt("h01")
+; CHECK: z.y := SInt("h01")
+; CHECK: node x = z.x
+; CHECK: node y = z.y
+; CHECK: wire a : UInt<3>[10]
+; CHECK: a[0] := UInt("h01")
+; CHECK: a[1] := UInt("h01")
+; CHECK: a[2] := UInt("h01")
+; CHECK: a[3] := UInt("h01")
+; CHECK: a[4] := UInt("h01")
+; CHECK: a[5] := UInt("h01")
+; CHECK: a[6] := UInt("h01")
+; CHECK: a[7] := UInt("h01")
+; CHECK: a[8] := UInt("h01")
+; CHECK: a[9] := UInt("h01")
+; CHECK: node b = a[2]
+; CHECK: read accessor c = a[UInt("h03")]
+