diff options
| author | jackbackrack | 2015-05-04 15:23:05 -0700 |
|---|---|---|
| committer | jackbackrack | 2015-05-04 15:23:05 -0700 |
| commit | 9321e870f9c18bd1522f83e173cbf2d42eed0b66 (patch) | |
| tree | da2df60ac39b6d30679b740f3f263d777f235de3 /src | |
| parent | 4c56d7c451a0c87ced5aa60f85f3fd8545349862 (diff) | |
| parent | 84ae662031b941d3a9318d8e4a1dbf152415e718 (diff) | |
merge
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/stanza.zip | bin | 3695332 -> 3716930 bytes | |||
| -rw-r--r-- | src/main/stanza/errors.stanza | 1 | ||||
| -rw-r--r-- | src/main/stanza/passes.stanza | 9 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/stanza.zip b/src/lib/stanza.zip Binary files differindex 5fd5ff6d..aed19c22 100644 --- a/src/lib/stanza.zip +++ b/src/lib/stanza.zip 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<HighFormException>() diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index e3e22f56..b5c3b22c 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)) |
