From 34e96c03b149a6a572d2de3fb0265075faba60d5 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 5 Oct 2017 23:49:35 -0700 Subject: [PATCH] Move HCF to BaseTile --- src/main/scala/groundtest/Tile.scala | 1 + src/main/scala/tile/BaseTile.scala | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/groundtest/Tile.scala b/src/main/scala/groundtest/Tile.scala index 5484466b..573e71c6 100644 --- a/src/main/scala/groundtest/Tile.scala +++ b/src/main/scala/groundtest/Tile.scala @@ -37,6 +37,7 @@ abstract class GroundTestTile(params: GroundTestTileParams)(implicit p: Paramete class GroundTestTileBundle[+L <: GroundTestTile](_outer: L) extends BaseTileBundle(_outer) { val status = new GroundTestStatus + val halt_and_catch_fire = None } class GroundTestTileModule[+L <: GroundTestTile, +B <: GroundTestTileBundle[L]](_outer: L, _io: () => B) extends BaseTileModule(_outer, _io) { diff --git a/src/main/scala/tile/BaseTile.scala b/src/main/scala/tile/BaseTile.scala index 03e24429..ff2f8d95 100644 --- a/src/main/scala/tile/BaseTile.scala +++ b/src/main/scala/tile/BaseTile.scala @@ -100,12 +100,13 @@ trait CanHaveInstructionTracePort extends Bundle with HasTileParameters { /** Base class for all Tiles that use TileLink */ abstract class BaseTile(tileParams: TileParams)(implicit p: Parameters) extends BareTile with HasTileParameters { - override lazy val module = new BaseTileModule(this, () => new BaseTileBundle(this)) + def module: BaseTileModule[BaseTile, BaseTileBundle[BaseTile]] } -class BaseTileBundle[+L <: BaseTile](_outer: L) extends BareTileBundle(_outer) +abstract class BaseTileBundle[+L <: BaseTile](_outer: L) extends BareTileBundle(_outer) with HasExternallyDrivenTileConstants with CanHaveInstructionTracePort + with CanHaltAndCatchFire class BaseTileModule[+L <: BaseTile, +B <: BaseTileBundle[L]](_outer: L, _io: () => B) extends BareTileModule(_outer, _io) with HasTileParameters {