From b1917e79154bc97c03489c91b01f61181ae39b01 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Fri, 19 May 2017 18:13:53 -0700 Subject: [PATCH] coreplex: add an ISPPort trait to add cross-connect points --- src/main/scala/coreplex/ISPPort.scala | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main/scala/coreplex/ISPPort.scala diff --git a/src/main/scala/coreplex/ISPPort.scala b/src/main/scala/coreplex/ISPPort.scala new file mode 100644 index 00000000..4296cd20 --- /dev/null +++ b/src/main/scala/coreplex/ISPPort.scala @@ -0,0 +1,44 @@ +// See LICENSE.SiFive for license details. + +package coreplex + +import Chisel._ +import config._ +import diplomacy._ +import rocket._ +import tile._ +import uncore.tilelink2._ +import util._ + +trait HasISPPort extends CoreplexNetwork { + val module: HasISPPortModule + + // TODO: use ChipLink instead of AsyncTileLink + val isp_in = TLAsyncInputNode() + val isp_out = TLAsyncOutputNode() + + private val out_xbar = LazyModule(new TLXbar) + private val out_nums = LazyModule(new TLNodeNumberer) + private val out_async = LazyModule(new TLAsyncCrossingSource) + out_xbar.node :=* tile_splitter.node + out_nums.node :*= out_xbar.node + out_async.node :*= out_nums.node + isp_out :*= out_async.node + + private val in_async = LazyModule(new TLAsyncCrossingSink) + in_async.node :=* isp_in + l1tol2.node :=* in_async.node +} + +trait HasISPPortBundle extends CoreplexNetworkBundle { + val outer: HasISPPort + + // TODO: move to IO(...) in Module? + val isp_in = outer.isp_in.bundleIn + val isp_out = outer.isp_out.bundleOut +} + +trait HasISPPortModule extends CoreplexNetworkModule { + val outer: HasISPPort + val io: HasISPPortBundle +}