Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
GenericTop: supply clock and sync reset IOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 21, 2024
1 parent c573661 commit bdc99f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/scala/ee/hrzn/chryse/platform/GenericTop.scala
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit bdc99f6

Please sign in to comment.