aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes/Checks.scala
diff options
context:
space:
mode:
authorJack2016-05-09 16:04:52 -0700
committerJack Koenig2016-06-10 16:31:50 -0700
commit2bf1c9e84b7affb82fd08484285250ce8f7b6f26 (patch)
tree7e2276fc5405029ec5acd75b81c985e3d61989b5 /src/main/scala/firrtl/passes/Checks.scala
parent83f53a3a0cdcfc7537e923b827ab820205025d45 (diff)
API Cleanup - Module
trait Module -> abstract class DefModule InModule -> Module (match concrete syntax) ExModule -> ExtModule (match concrete syntax) Add simple scaladoc for each one
Diffstat (limited to 'src/main/scala/firrtl/passes/Checks.scala')
-rw-r--r--src/main/scala/firrtl/passes/Checks.scala20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/scala/firrtl/passes/Checks.scala b/src/main/scala/firrtl/passes/Checks.scala
index 23613e65..fb19ca8d 100644
--- a/src/main/scala/firrtl/passes/Checks.scala
+++ b/src/main/scala/firrtl/passes/Checks.scala
@@ -169,7 +169,7 @@ object CheckHighForm extends Pass with LazyLogging {
t map (checkHighFormW)
}
- def checkHighFormM(m: Module): Module = {
+ def checkHighFormM(m: DefModule): DefModule = {
val names = HashMap[String, Boolean]()
val mnames = HashMap[String, Boolean]()
def checkHighFormE(e: Expression): Expression = {
@@ -243,8 +243,8 @@ object CheckHighForm extends Pass with LazyLogging {
}
m match {
- case m: InModule => checkHighFormS(m.body)
- case m: ExModule => // Do Nothing
+ case m: Module => checkHighFormS(m.body)
+ case m: ExtModule => // Do Nothing
}
m
}
@@ -470,8 +470,8 @@ object CheckTypes extends Pass with LazyLogging {
for (m <- c.modules ) {
mname = m.name
(m) match {
- case (m:ExModule) => false
- case (m:InModule) => check_types_s(m.body)
+ case (m:ExtModule) => false
+ case (m:Module) => check_types_s(m.body)
}
}
errors.trigger
@@ -635,8 +635,8 @@ object CheckGenders extends Pass {
genders(p.name) = dir_to_gender(p.direction)
}
(m) match {
- case (m:ExModule) => false
- case (m:InModule) => check_genders_s(genders)(m.body)
+ case (m:ExtModule) => false
+ case (m:Module) => check_genders_s(genders)(m.body)
}
}
errors.trigger
@@ -654,7 +654,7 @@ object CheckWidths extends Pass {
class NegWidthException(info:Info) extends PassException(s"${info}: [module ${mname}] Width cannot be negative or zero.")
def run (c:Circuit): Circuit = {
val errors = new Errors()
- def check_width_m (m:Module) : Unit = {
+ def check_width_m (m:DefModule) : Unit = {
def check_width_w (info:Info)(w:Width) : Width = {
(w) match {
case (w:IntWidth)=> if (w.width <= 0) errors.append(new NegWidthException(info))
@@ -698,8 +698,8 @@ object CheckWidths extends Pass {
}
(m) match {
- case (m:ExModule) => {}
- case (m:InModule) => check_width_s(m.body)
+ case (m:ExtModule) => {}
+ case (m:Module) => check_width_s(m.body)
}
}