From 6a8b66231ca484cd40269a8aa8170c0ef318b5fe Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Fri, 12 Dec 2014 12:07:04 -0800 Subject: [PATCH] Add uncached->cached tilelink converter --- uncore/src/main/scala/tilelink.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/uncore/src/main/scala/tilelink.scala b/uncore/src/main/scala/tilelink.scala index 45c6fa59..4e5ac961 100644 --- a/uncore/src/main/scala/tilelink.scala +++ b/uncore/src/main/scala/tilelink.scala @@ -226,6 +226,25 @@ class TileLinkIO extends UncachedTileLinkIO { val release = new DecoupledIO(new LogicalNetworkIO(new Release)) } +class TileLinkIOWrapper extends TLModule { + val io = new Bundle { + val in = new UncachedTileLinkIO().flip + val out = new TileLinkIO + } + io.out.acquire <> io.in.acquire + io.out.grant <> io.in.grant + io.out.finish <> io.in.finish + io.out.probe.ready := Bool(false) + io.out.release.valid := Bool(false) +} +object TileLinkIOWrapper { + def apply[T <: Data](uncached: UncachedTileLinkIO) = { + val conv = Module(new TileLinkIOWrapper) + conv.io.in <> uncached + conv.io.out + } +} + abstract class TileLinkArbiterLike(val arbN: Int) extends TLModule { type MasterSourcedWithId = MasterSourcedMessage with HasClientTransactionId type ClientSourcedWithId = ClientSourcedMessage with HasClientTransactionId