Skip to content

Commit

Permalink
allow direciton reassign
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky64 committed May 26, 2017
1 parent 4d5b464 commit 8bb40f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chiselFrontend/src/main/scala/chisel3/core/Data.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,22 @@ private[core] object cloneSupertype {
*/
object Input {
def apply[T<:Data](source: T): T = {
val out = source.chiselCloneType
val out = source.cloneType
out.userDirection = UserDirection.Input
out
}
}
object Output {
def apply[T<:Data](source: T): T = {
val out = source.chiselCloneType
val out = source.cloneType
out.userDirection = UserDirection.Output
out
}
}
object Flipped {
def apply[T<:Data](source: T): T = {
val out = source.chiselCloneType
out.userDirection = UserDirection.Flip
val out = source.cloneType
out.userDirection = UserDirection.flip(source.userDirection)
out
}
}
Expand Down

0 comments on commit 8bb40f3

Please sign in to comment.