aboutsummaryrefslogtreecommitdiff
path: root/src/main/antlr4
diff options
context:
space:
mode:
authorjackkoenig2016-01-28 17:43:24 -0800
committerjackkoenig2016-01-28 17:43:24 -0800
commit86872a2888698656487e1201406a0786553d8480 (patch)
treeccc2a660d9beb49faa7577045977ad73bad1e559 /src/main/antlr4
parentb6c6f0909feebdcdd5cb13651596fc4920691218 (diff)
WIP: Added support for FIRRTL 0.2.0 Memories to Scala FIRRTL
Diffstat (limited to 'src/main/antlr4')
-rw-r--r--src/main/antlr4/FIRRTL.g417
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4
index 2765533d..9d186762 100644
--- a/src/main/antlr4/FIRRTL.g4
+++ b/src/main/antlr4/FIRRTL.g4
@@ -47,14 +47,15 @@ block
stmt
: 'wire' id ':' type
| 'reg' id ':' type exp (exp exp)?
- | 'mem' id ':' '{' 'data-type' '=>' type
- 'depth' '=>' IntLit
- 'read-latency' '=>' IntLit
- 'write-latency' '=>' IntLit
- 'read-under-write' '=>' ruw
- ('reader' '=>' id)*
- ('writer' '=>' id)*
- ('readwriter' '=>' id)*
+ | 'mem' id ':' '{' ( 'data-type' '=>' type
+ | 'depth' '=>' IntLit
+ | 'read-latency' '=>' IntLit
+ | 'write-latency' '=>' IntLit
+ | 'read-under-write' '=>' ruw
+ | 'reader' '=>' id
+ | 'writer' '=>' id
+ | 'readwriter' '=>' id
+ )*
'}'
| 'inst' id 'of' id
| 'node' id '=' exp