summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/compatibility.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/chisel3/compatibility.scala')
-rw-r--r--src/main/scala/chisel3/compatibility.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index d0d2ddb4..d13fcb06 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -158,6 +158,25 @@ package object Chisel { // scalastyle:ignore package.object.name
type DecoupledIO[+T <: Data] = chisel3.util.DecoupledIO[T]
val DecoupledIO = chisel3.util.Decoupled
val Decoupled = chisel3.util.Decoupled
+ class EnqIO[+T <: Data](gen: T) extends DecoupledIO(gen) {
+ def init(): Unit = {
+ this.noenq()
+ }
+ override def cloneType: this.type = EnqIO(gen).asInstanceOf[this.type]
+ }
+ class DeqIO[+T <: Data](gen: T) extends DecoupledIO(gen) {
+ chisel3.core.Binding.bind(this, chisel3.core.FlippedBinder, "Error: Cannot flip ")
+ def init(): Unit = {
+ this.nodeq()
+ }
+ override def cloneType: this.type = DeqIO(gen).asInstanceOf[this.type]
+ }
+ object EnqIO {
+ def apply[T<:Data](gen: T): DecoupledIO[T] = DecoupledIO(gen)
+ }
+ object DeqIO {
+ def apply[T<:Data](gen: T): DecoupledIO[T] = Flipped(DecoupledIO(gen))
+ }
type QueueIO[T <: Data] = chisel3.util.QueueIO[T]
type Queue[T <: Data] = chisel3.util.Queue[T]
val Queue = chisel3.util.Queue