1
0

IntXing: support configurable sync depth

This commit is contained in:
Wesley W. Terpstra 2017-03-02 13:33:05 -08:00
parent 637bc6c3a7
commit 93ca555c20

View File

@ -127,7 +127,7 @@ class IntXbar()(implicit p: Parameters) extends LazyModule
} }
} }
class IntXing()(implicit p: Parameters) extends LazyModule class IntXing(sync: Int = 3)(implicit p: Parameters) extends LazyModule
{ {
val intnode = IntIdentityNode() val intnode = IntIdentityNode()
@ -138,7 +138,7 @@ class IntXing()(implicit p: Parameters) extends LazyModule
} }
(io.in zip io.out) foreach { case (in, out) => (io.in zip io.out) foreach { case (in, out) =>
out := RegNext(RegNext(RegNext(in))) out := (0 to sync).foldLeft(in) { case (a, _) => RegNext(a) }
} }
} }
} }