diff --git a/src/main/scala/ee/hrzn/chryse/platform/GenericTop.scala b/src/main/scala/ee/hrzn/chryse/platform/GenericTop.scala index f4251b5..cd7f94d 100644 --- a/src/main/scala/ee/hrzn/chryse/platform/GenericTop.scala +++ b/src/main/scala/ee/hrzn/chryse/platform/GenericTop.scala @@ -1,14 +1,17 @@ package ee.hrzn.chryse.platform import chisel3._ -import ee.hrzn.chryse.platform.Platform import ee.hrzn.chryse.ChryseModule +import ee.hrzn.chryse.platform.Platform class GenericTop[Top <: Module](platform: Platform, genTop: => Top) extends ChryseModule { override def desiredName = "top" - private val top = Module(genTop) + val clock = IO(Input(Clock())) + val reset = IO(Input(Bool())) + + private val top = withClockAndReset(clock, reset)(Module(genTop)) } object GenericTop {