diff --git a/src/main/scala/ee/hrzn/chryse/ChryseApp.scala b/src/main/scala/ee/hrzn/chryse/ChryseApp.scala index 7d93d81..696dd27 100644 --- a/src/main/scala/ee/hrzn/chryse/ChryseApp.scala +++ b/src/main/scala/ee/hrzn/chryse/ChryseApp.scala @@ -67,9 +67,7 @@ abstract class ChryseApp { object cxxsim extends Subcommand("cxxsim") { banner("Run the C++ simulator tests.") - val platformChoices: Seq[_ <: CXXRTLPlatform] = cxxrtlOptions - .map(_.platforms.map(_.getConstructor().newInstance())) - .getOrElse(Seq()) + val platformChoices = cxxrtlOptions.map(_.platforms).getOrElse(Seq()) val platform = if (platformChoices.length > 1) diff --git a/src/main/scala/ee/hrzn/chryse/ExampleApp.scala b/src/main/scala/ee/hrzn/chryse/ExampleApp.scala index 155a171..40770e3 100644 --- a/src/main/scala/ee/hrzn/chryse/ExampleApp.scala +++ b/src/main/scala/ee/hrzn/chryse/ExampleApp.scala @@ -13,9 +13,8 @@ object ExampleApp extends ChryseApp { override def genTop()(implicit platform: Platform) = new Top override val targetPlatforms = Seq(IceBreakerPlatform()) override val cxxrtlOptions = Some( - CXXRTLOptions(platforms = Seq(classOf[ExampleCXXRTLPlatform])), + CXXRTLOptions(platforms = + Seq(new CXXRTLPlatform(id = "ex", clockHz = 3_000_000) {}), + ), ) } - -class ExampleCXXRTLPlatform - extends CXXRTLPlatform(id = "ex", clockHz = 3_000_000) diff --git a/src/main/scala/ee/hrzn/chryse/platform/cxxrtl/CXXRTLOptions.scala b/src/main/scala/ee/hrzn/chryse/platform/cxxrtl/CXXRTLOptions.scala index b2a85ff..685c3e6 100644 --- a/src/main/scala/ee/hrzn/chryse/platform/cxxrtl/CXXRTLOptions.scala +++ b/src/main/scala/ee/hrzn/chryse/platform/cxxrtl/CXXRTLOptions.scala @@ -5,7 +5,7 @@ import chisel3.BlackBox import scala.sys.process._ final case class CXXRTLOptions( - platforms: Seq[Class[_ <: CXXRTLPlatform]], + platforms: Seq[CXXRTLPlatform], blackboxes: Seq[Class[_ <: BlackBox]] = Seq(), cxxFlags: Seq[String] = Seq(), ldFlags: Seq[String] = Seq(),