diff options
| author | azidar | 2015-03-05 17:16:46 -0800 |
|---|---|---|
| committer | azidar | 2015-03-05 17:16:46 -0800 |
| commit | 0f3a31df12584207204054215867d84890a98a62 (patch) | |
| tree | 7ee995f901cc95520ec6dd37474264c915bbc99c /src/main/stanza/ir-parser.stanza | |
| parent | b06eba574c7a67df062d50ea03ca7d7a9524c2a3 (diff) | |
Finished part of infer gender, tests not committed
Diffstat (limited to 'src/main/stanza/ir-parser.stanza')
| -rw-r--r-- | src/main/stanza/ir-parser.stanza | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/stanza/ir-parser.stanza b/src/main/stanza/ir-parser.stanza index f52abf13..0334bca2 100644 --- a/src/main/stanza/ir-parser.stanza +++ b/src/main/stanza/ir-parser.stanza @@ -87,6 +87,12 @@ rd.defsyntax firrtl : (module ?name:#symbol : (?ports:#port ... ?body:#comm ...)) : Module(ut(name), ports, Begin(body)) + defrule field : + (male ?name:#symbol : ?type:#type) : + Field(ut(name), MALE, type) + (female ?name:#symbol : ?type:#type) : + Field(ut(name), FEMALE, type) + defrule port : (input ?name:#symbol : ?type:#type) : Port(ut(name), INPUT, type) @@ -104,8 +110,8 @@ rd.defsyntax firrtl : SIntType(IntWidth(ut(width))) (SInt) : SIntType(UnknownWidth()) - ({?ports:#port ...}) : - BundleType(ports) + ({?fields:#field ...}) : + BundleType(fields) defrule comm : (wire ?name:#symbol : ?type:#type) : |
