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

Commit

Permalink
CXXRTLPlatform: require clockHz specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 10, 2024
1 parent 6f7a363 commit 0b508c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 10 additions & 0 deletions src/main/scala/ee/hrzn/chryse/platform/ElaboratablePlatform.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ee.hrzn.chryse.platform

import chisel3._
import ee.hrzn.chryse.HasIO

trait ElaboratablePlatform extends Platform {
def apply[Top <: HasIO[_ <: Data]](top: => Top)(implicit
platform: Platform,
): RawModule
}
6 changes: 0 additions & 6 deletions src/main/scala/ee/hrzn/chryse/platform/Platform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ trait Platform {
val id: String
val clockHz: Int
}

trait ElaboratablePlatform extends Platform {
def apply[Top <: HasIO[_ <: Data]](top: => Top)(implicit
platform: Platform,
): RawModule
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import ee.hrzn.chryse.platform.ElaboratablePlatform
import ee.hrzn.chryse.platform.GenericTop
import ee.hrzn.chryse.platform.Platform

case object CXXRTLPlatform extends ElaboratablePlatform {
case class CXXRTLPlatform(clockHz: Int) extends ElaboratablePlatform {
val id = "cxxrtl"
val clockHz = 3_000_000

override def apply[Top <: HasIO[_ <: Data]](top: => Top)(implicit
platform: Platform,
Expand Down

0 comments on commit 0b508c3

Please sign in to comment.