aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/ir
diff options
context:
space:
mode:
authorKamyar Mohajerani2016-07-21 23:40:34 +0430
committerJack Koenig2016-07-21 12:10:34 -0700
commitab340febdc7a5418da945f9b79624d36e66e26db (patch)
tree04e4aef30081fdd419281d69be4b141fd49b4b1f /src/main/scala/firrtl/ir
parentb7de40e23161a7346fea90576f07b5c200c2675b (diff)
Indentation support for the ANTLR parser (as discussed in #192) (#194)
Indentation support for the ANTLR parser - some clean-up of the parser code (TODO: file input could be improved, more clean-up) - get rid of Translator and specify all syntactic rules in antlr4 grammer - support for else-when shorthand in the grammar - rename Begin to Block which makes more sense
Diffstat (limited to 'src/main/scala/firrtl/ir')
-rw-r--r--src/main/scala/firrtl/ir/IR.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/ir/IR.scala b/src/main/scala/firrtl/ir/IR.scala
index f25ab144..fc5e26b8 100644
--- a/src/main/scala/firrtl/ir/IR.scala
+++ b/src/main/scala/firrtl/ir/IR.scala
@@ -97,14 +97,16 @@ case class DefMemory(
readLatency: Int,
readers: Seq[String],
writers: Seq[String],
- readwriters: Seq[String]) extends Statement with IsDeclaration
+ readwriters: Seq[String],
+ // TODO: handle read-under-write
+ readUnderWrite: Option[String] = None) extends Statement with IsDeclaration
case class DefNode(info: Info, name: String, value: Expression) extends Statement with IsDeclaration
case class Conditionally(
info: Info,
pred: Expression,
conseq: Statement,
alt: Statement) extends Statement with HasInfo
-case class Begin(stmts: Seq[Statement]) extends Statement
+case class Block(stmts: Seq[Statement]) extends Statement
case class PartialConnect(info: Info, loc: Expression, expr: Expression) extends Statement with HasInfo
case class Connect(info: Info, loc: Expression, expr: Expression) extends Statement with HasInfo
case class IsInvalid(info: Info, expr: Expression) extends Statement with HasInfo