aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes
diff options
context:
space:
mode:
authorJack2016-05-09 16:50:58 -0700
committerJack Koenig2016-06-10 16:32:00 -0700
commit8aea3b3e5db6794523a64a724e12599df0ab2ab7 (patch)
tree64cd350bae32b78b0d364901b2a2cd4ef96ddb68 /src/main/scala/firrtl/passes
parent2bf1c9e84b7affb82fd08484285250ce8f7b6f26 (diff)
API Cleanup - Port & Direction
Add simple documentation Change Direction case objects to upper camel case
Diffstat (limited to 'src/main/scala/firrtl/passes')
-rw-r--r--src/main/scala/firrtl/passes/Checks.scala4
-rw-r--r--src/main/scala/firrtl/passes/Passes.scala4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/passes/Checks.scala b/src/main/scala/firrtl/passes/Checks.scala
index fb19ca8d..f9e91f67 100644
--- a/src/main/scala/firrtl/passes/Checks.scala
+++ b/src/main/scala/firrtl/passes/Checks.scala
@@ -486,8 +486,8 @@ object CheckGenders extends Pass {
def dir_to_gender (d:Direction) : Gender = {
d match {
- case INPUT => MALE
- case OUTPUT => FEMALE //BI-GENDER
+ case Input => MALE
+ case Output => FEMALE //BI-GENDER
}
}
diff --git a/src/main/scala/firrtl/passes/Passes.scala b/src/main/scala/firrtl/passes/Passes.scala
index d1c0a647..dd2a139b 100644
--- a/src/main/scala/firrtl/passes/Passes.scala
+++ b/src/main/scala/firrtl/passes/Passes.scala
@@ -1037,8 +1037,8 @@ object CInferTypes extends Pass {
}
def to_field (p:Port) : Field = {
- if (p.direction == OUTPUT) Field(p.name,DEFAULT,p.tpe)
- else if (p.direction == INPUT) Field(p.name,REVERSE,p.tpe)
+ if (p.direction == Output) Field(p.name,DEFAULT,p.tpe)
+ else if (p.direction == Input) Field(p.name,REVERSE,p.tpe)
else error("Shouldn't be here"); Field(p.name,REVERSE,p.tpe)
}
def module_type (m:DefModule) : Type = BundleType(m.ports.map(p => to_field(p)))