From 676fbd9f97fcbedf351a904b645eb200c12144a5 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 29 Jan 2016 00:00:17 -0800 Subject: Changed reg syntax to new "with" semantics in Scala FIRRTL --- src/main/antlr4/FIRRTL.g4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/antlr4') diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4 index 9d186762..2faef4e0 100644 --- a/src/main/antlr4/FIRRTL.g4 +++ b/src/main/antlr4/FIRRTL.g4 @@ -46,7 +46,7 @@ block stmt : 'wire' id ':' type - | 'reg' id ':' type exp (exp exp)? + | 'reg' id ':' type exp ('with' ':' '{' 'reset' '=>' '(' exp exp ')' '}')? | 'mem' id ':' '{' ( 'data-type' '=>' type | 'depth' '=>' IntLit | 'read-latency' '=>' IntLit @@ -97,6 +97,8 @@ id keyword : dir | 'inst' + | 'mem' + | 'reset' ; // Parentheses are added as part of name because semantics require no space between primop and open parentheses -- cgit v1.2.3