Commit 080ffa67 authored by Jens Korinth's avatar Jens Korinth

Closes #58 - Platform: Remove slotCount

* not removed, but made optional w/default 128
* may be yet useful in certain cases
parent 94e60bf1
......@@ -4,7 +4,6 @@
"TclLibrary" : "pynq.tcl",
"Part" : "xc7z020clg400-1",
"TargetUtilization" : 99,
"SlotCount" : 128,
"ValueArgTemplate" : "../zynq/valueargs.directives.template",
"ReferenceArgTemplate" : "../zynq/referenceargs.directives.template"
}
......@@ -6,6 +6,5 @@
"BoardPart" : "xilinx.com:vc709:part0:1.5",
"BoardPreset" : "VC709",
"TargetUtilization" : 90,
"SlotCount" : 128,
"Benchmark" : "vc709.benchmark"
}
......@@ -6,6 +6,5 @@
"BoardPart" : "xilinx.com:zc706:part0:1.1",
"BoardPreset" : "ZC706",
"TargetUtilization" : 97,
"SlotCount" : 128,
"Benchmark" : "zc706.benchmark"
}
......@@ -9,7 +9,6 @@
"API" : "../zynq/include/platform-api.svh",
"TestbenchTemplate" : "../zynq/sv/platform-dpi.sv",
"TargetUtilization" : 97,
"SlotCount" : 128,
"ValueArgTemplate" : "../zynq/valueargs.directives.template",
"ReferenceArgTemplate" : "../zynq/referenceargs.directives.template",
"Benchmark" : "zedboard.benchmark"
......
......@@ -36,7 +36,7 @@ case class Platform (
boardPreset: Option[String],
targetUtilization: Int,
supportedFrequencies: Seq[Int],
slotCount: Int,
private val _slotCount: Option[Int],
description: Option[String],
private val _harness: Option[Path],
private val _api: Option[Path],
......@@ -48,10 +48,13 @@ case class Platform (
val api: Option[Path] = _api map (resolve _)
val testbenchTemplate: Option[Path] = _testbenchTemplate map (resolve _)
val benchmark: Option[Benchmark] = _benchmark flatMap (p => Benchmark.from(resolve(p)).toOption)
val slotCount: Int = _slotCount getOrElse Platform.DEFAULT_SLOTCOUNT
require (mustExist(tclLibrary), "Tcl library %s does not exist".format(tclLibrary.toString))
harness foreach { p => require(mustExist(p), "harness file %s does not exist".format(p.toString)) }
api foreach { p => require(mustExist(p), "api file %s does not exist".format(p.toString)) }
testbenchTemplate foreach { p => require(mustExist(p), "testbench template %s does not exist".format(p.toString)) }
}
object Platform extends Builds[Platform]
object Platform extends Builds[Platform] {
private final val DEFAULT_SLOTCOUNT: Int = 128
}
......@@ -281,7 +281,7 @@ package object json {
(JsPath \ "BoardPreset").readNullable[String] (minLength[String](4)) ~
(JsPath \ "TargetUtilization").read[Int] (min(5) keepAnd max(100)) ~
(JsPath \ "SupportedFrequencies").readNullable[Seq[Int]] (minLength[Seq[Int]](1)) .map (_ getOrElse (50 to 450 by 5)) ~
(JsPath \ "SlotCount").read[Int] (min(1) keepAnd max(255)) ~
(JsPath \ "SlotCount").readNullable[Int] (min(1) keepAnd max(255)) ~
(JsPath \ "Description").readNullable[String] (minLength[String](1)) ~
(JsPath \ "Harness").readNullable[Path] ~
(JsPath \ "API").readNullable[Path] ~
......@@ -298,7 +298,7 @@ package object json {
(JsPath \ "BoardPreset").writeNullable[String] ~
(JsPath \ "TargetUtilization").write[Int] ~
(JsPath \ "SupportedFrequencies").write[Seq[Int]] ~
(JsPath \ "SlotCount").write[Int] ~
(JsPath \ "SlotCount").writeNullable[Int] ~
(JsPath \ "Description").writeNullable[String] ~
(JsPath \ "Harness").writeNullable[Path] ~
(JsPath \ "API").writeNullable[Path] ~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment