diff options
| author | Jack | 2016-05-09 16:50:58 -0700 |
|---|---|---|
| committer | Jack Koenig | 2016-06-10 16:32:00 -0700 |
| commit | 8aea3b3e5db6794523a64a724e12599df0ab2ab7 (patch) | |
| tree | 64cd350bae32b78b0d364901b2a2cd4ef96ddb68 /src/main/scala/firrtl/Utils.scala | |
| parent | 2bf1c9e84b7affb82fd08484285250ce8f7b6f26 (diff) | |
API Cleanup - Port & Direction
Add simple documentation
Change Direction case objects to upper camel case
Diffstat (limited to 'src/main/scala/firrtl/Utils.scala')
| -rw-r--r-- | src/main/scala/firrtl/Utils.scala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/scala/firrtl/Utils.scala b/src/main/scala/firrtl/Utils.scala index 658b0d9a..9c0a59cb 100644 --- a/src/main/scala/firrtl/Utils.scala +++ b/src/main/scala/firrtl/Utils.scala @@ -360,8 +360,8 @@ object Utils extends LazyLogging { } def swap (d:Direction) : Direction = { d match { - case OUTPUT => INPUT - case INPUT => OUTPUT + case Output => Input + case Input => Output } } def swap (f:Flip) : Flip = { @@ -372,14 +372,14 @@ object Utils extends LazyLogging { } def to_dir (g:Gender) : Direction = { g match { - case MALE => INPUT - case FEMALE => OUTPUT + case MALE => Input + case FEMALE => Output } } def to_gender (d:Direction) : Gender = { d match { - case INPUT => MALE - case OUTPUT => FEMALE + case Input => MALE + case Output => FEMALE } } def toGender(f: Flip): Gender = f match { @@ -495,7 +495,7 @@ object Utils extends LazyLogging { case s:IsInvalid => UNKNOWNGENDER } def get_gender (p:Port) : Gender = - if (p.direction == INPUT) MALE else FEMALE + if (p.direction == Input) MALE else FEMALE def kind (e:Expression) : Kind = e match { case e:WRef => e.kind @@ -756,8 +756,8 @@ object Utils extends LazyLogging { def toDirection(): Direction = { f match { - case DEFAULT => OUTPUT - case REVERSE => INPUT + case DEFAULT => Output + case REVERSE => Input } } } @@ -794,8 +794,8 @@ object Utils extends LazyLogging { implicit class DirectionUtils(d: Direction) { def toFlip(): Flip = { d match { - case INPUT => REVERSE - case OUTPUT => DEFAULT + case Input => REVERSE + case Output => DEFAULT } } } |
