aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/tutorial
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/tutorial')
-rw-r--r--src/main/scala/tutorial/lesson1-circuit-traversal/AnalyzeCircuit.scala4
-rw-r--r--src/main/scala/tutorial/lesson2-working-ir/AnalyzeCircuit.scala4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/tutorial/lesson1-circuit-traversal/AnalyzeCircuit.scala b/src/main/scala/tutorial/lesson1-circuit-traversal/AnalyzeCircuit.scala
index 3f1dfa46..ccd6d9c0 100644
--- a/src/main/scala/tutorial/lesson1-circuit-traversal/AnalyzeCircuit.scala
+++ b/src/main/scala/tutorial/lesson1-circuit-traversal/AnalyzeCircuit.scala
@@ -4,7 +4,7 @@ package tutorial
package lesson1
// Compiler Infrastructure
-import firrtl.{Transform, LowForm, CircuitState}
+import firrtl.{Transform, LowForm, CircuitState, Utils}
// Firrtl IR classes
import firrtl.ir.{Circuit, DefModule, Statement, Expression, Mux}
// Map functions
@@ -31,7 +31,7 @@ class Ledger {
case Some(name) => moduleMuxMap(name) = moduleMuxMap.getOrElse(name, 0) + 1
}
def getModuleName: String = moduleName match {
- case None => error("Module name not defined in Ledger!")
+ case None => Utils.error("Module name not defined in Ledger!")
case Some(name) => name
}
def setModuleName(myName: String): Unit = {
diff --git a/src/main/scala/tutorial/lesson2-working-ir/AnalyzeCircuit.scala b/src/main/scala/tutorial/lesson2-working-ir/AnalyzeCircuit.scala
index bdf6f665..6236703f 100644
--- a/src/main/scala/tutorial/lesson2-working-ir/AnalyzeCircuit.scala
+++ b/src/main/scala/tutorial/lesson2-working-ir/AnalyzeCircuit.scala
@@ -4,7 +4,7 @@ package tutorial
package lesson2
// Compiler Infrastructure
-import firrtl.{Transform, LowForm, CircuitState}
+import firrtl.{Transform, LowForm, CircuitState, Utils}
// Firrtl IR classes
import firrtl.ir.{Circuit, DefModule, Statement, DefInstance, Expression, Mux}
// Firrtl compiler's working IR classes (WIR)
@@ -133,7 +133,7 @@ class AnalyzeCircuit extends Transform {
// IR node [[DefInstance]] is previously replaced by WDefInstance, a
// "working" IR node
case DefInstance(info, name, module) =>
- error("All DefInstances should have been replaced by WDefInstances")
+ Utils.error("All DefInstances should have been replaced by WDefInstances")
// Working IR Node [[WDefInstance]] is what the compiler uses
// See src/main/scala/firrtl/WIR.scala for all working IR nodes
case WDefInstance(info, name, module, tpe) =>