From 8a8c4790abca448165b570ebf7bb6c2296d9f452 Mon Sep 17 00:00:00 2001 From: azidar Date: Mon, 4 May 2015 13:11:22 -0700 Subject: Updated stuff --- src/main/stanza/errors.stanza | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index 3e1d2cb4..b0dbca68 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -149,6 +149,7 @@ defn is-prefix? (s1:Symbol,s2:Symbol) -> True|False : ; * A module has the same name as main of circuit ; * mems cannot be a bundle with flips ; o instance module must be a reference with same name as defined module +; o reset must be UInt<1> public defn check-high-form (c:Circuit) -> Circuit : val errors = Vector() -- cgit v1.2.3 From 489e390d72ea6e265a9e95bfa1cc94a289bb7ba9 Mon Sep 17 00:00:00 2001 From: azidar Date: Mon, 4 May 2015 15:18:40 -0700 Subject: Fixed bug where instance types were not lowered --- src/main/stanza/passes.stanza | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index 910b7f3d..c8a4e15c 100644 --- a/src/main/stanza/passes.stanza +++ b/src/main/stanza/passes.stanza @@ -772,7 +772,14 @@ defn lower (body:Stmt) -> Stmt : (s:DefRegister) : Begin{_} $ for x in generate-entry(name(s),type(s)) map : DefRegister(name(x),type(x)) - (s:DefInstance) : s + (s:DefInstance) : + val fields = + for f in fields(type(module(s)) as BundleType) map-append : + val etfs = generate-entry(name(f),type(f)) + for etf in etfs map : + Field(name(etf),flip(etf) * flip(f),type(etf)) + val m = module(s) as WRef + DefInstance(name(s),WRef(name(m),BundleType(fields),kind(m),gender(m))) (s:DefNode) : Begin $ for x in expand-expr(value(s)) map : DefNode(name(s),exp(x)) -- cgit v1.2.3 From 84ae662031b941d3a9318d8e4a1dbf152415e718 Mon Sep 17 00:00:00 2001 From: azidar Date: Mon, 4 May 2015 15:22:16 -0700 Subject: Added new stanza --- src/lib/stanza.zip | Bin 3695332 -> 3716930 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src') diff --git a/src/lib/stanza.zip b/src/lib/stanza.zip index 5fd5ff6d..aed19c22 100644 Binary files a/src/lib/stanza.zip and b/src/lib/stanza.zip differ -- cgit v1.2.3