Commit c8a58f11 authored by Jens Korinth's avatar Jens Korinth

Closes #12 - Rename Descriptions to extension ".json"

parent 328f9c33
......@@ -85,7 +85,7 @@ object CoreStatistics {
}
private def dumpAvgClockCycles(r: SynthesisReport): String =
Core.from(r.file.getParent.resolveSibling("core.description")) map { cd =>
Core.from(r.file.getParent.resolveSibling("core.json")) map { cd =>
Seq(cd.averageClockCycles.getOrElse(""),
(for (t <- r.timing; c <- cd.averageClockCycles)
yield "%2.2f" format (1.0 / ((t.clockPeriod * c) / 1000000000.0f))).getOrElse("")
......
......@@ -57,7 +57,7 @@ object Import {
logger.trace("found VLNV in zip " + zip + ": " + vlnv)
// extract version and name from VLNV, create Core
val c = Core(
descPath = zip.resolveSibling("core.description"),
descPath = zip.resolveSibling("core.json"),
_zipPath = zip.getFileName,
name = vlnv.name,
id = id,
......@@ -66,8 +66,8 @@ object Import {
Some("imported from %s on %s".format(zip.toAbsolutePath.toString, java.time.LocalDateTime.now().toString)),
acc)
// write core.description to output directory (as per config)
val p = cfg.outputDir(c, t).resolve("ipcore").resolve("core.description")
// write core.json to output directory (as per config)
val p = cfg.outputDir(c, t).resolve("ipcore").resolve("core.json")
importCore(c, t, p)
}
......@@ -105,7 +105,7 @@ object Import {
// finally, evaluate the ip core and store the report with the link
val res = evaluateCore(c, t)
// write core.description
// write core.json
logger.debug("writing core description: {}", p.toString)
Core.to(c, p)
res
......
......@@ -76,11 +76,11 @@ class EntityManager(val bpm: BasePathManager) extends Publisher {
/* @{ Internals */
/** Internal map of description regexes. **/
private val _filters: Map[Entity, Regex] = Map(
Entities.Architectures -> """architecture.description$""".r.unanchored,
Entities.Compositions -> """.bd$""".r.unanchored,
Entities.Cores -> """core.description$""".r.unanchored,
Entities.Kernels -> """kernel.description$""".r.unanchored,
Entities.Platforms -> """platform.description$""".r.unanchored
Entities.Architectures -> """architecture.json$""".r.unanchored,
Entities.Compositions -> """composition.json$""".r.unanchored,
Entities.Cores -> """core.json$""".r.unanchored,
Entities.Kernels -> """kernel.json$""".r.unanchored,
Entities.Platforms -> """platform.json$""".r.unanchored
)
/** Issue warning for failed builds (at least once). */
......
......@@ -36,54 +36,53 @@ class DirectoryDetailPanel extends BorderPanel with Listener[DirectoriesPanel.Ev
private object DirectoryDetailPanel {
val detailTexts: Map[Entity, String] = Map(
Architectures -> """
Architecture directory - This is the directory in which TPC will
look for files called architecture.description containing the
JSON description of a TPC architecture (i.e., the organisation
of the processing elements of the ThreadPool).
Changing this directory will affect the available architectures
in the 'Architectures' tab.
Architecture directory - This is the directory in which TaPaSCo will
look for files called architecture.json containing the JSON
description of a TaPaSCo architecture (i.e., the organisation of the
processing elements). Changing this directory will affect the
available architectures in the 'Architectures' tab.
""".trim.split("""\s+""").mkString(" "),
Compositions -> """
Composition directory - This is the output directory for the
TPC hardware designs. It is organized in a three-level directory
TaPaSCo hardware designs. It is organized in a three-level directory
hierarchy: First level contains the composition + target
user clock frequency pairs, second level the architecture and
the third level the platform for all Compositions that were
built with TPC. When a build is started, TPC will overwrite
built with TaPaSCo. When a build is started, TPC will overwrite
existing runs in this directory.
""".trim.split("""\s+""").mkString(" "),
Cores -> """
Core Directory - This is the output directory for the processing
elements (PEs) that were built by, or can be used by, TPC (i.e.,
elements (PEs) that were built by, or can be used by, TaPaSCo (i.e.,
it contains the IP-XACT base.of the cores and the
synthesis results. TPC will look here for synthesis results
synthesis results. TaPaSCo will look here for synthesis results
(e.g., area requirements, max. frequency, etc.) during design
space exploration (DSE).
It is organized in a three-level directory hierarchy: First
level contains a directory for each distinct available core,
second level contains one directory for each TPC architecture
and the last level one directory for each TPC platform.
Each core is described by a core.description file containing
second level contains one directory for each TaPaSCo architecture
and the last level one directory for each TaPaSCo platform.
Each core is described by a core.json file containing
a JSON description of the core with the basic information that
TPC requires to use the core as a PE in a ThreadPool.
TPC will generate the base.automatically during
TaPaSCo requires to use the core as a PE in a ThreadPool.
TaPaSCo will generate the base.automatically during
high-level synthesis (HLS), but you can also provide it manually
and place your custom core in this directory. All available
cores will be shown in the 'Cores' tab.
""".trim.split("""\s+""").mkString(" "),
Kernels -> """
Kernel directory - This is the directory in which TPC will look
for kernel.description files containing the JSON description of
Kernel directory - This is the directory in which TaPaSCo will look
for kernel.json files containing the JSON description of
a processing element (PE) that can be generated by a High-Level
Synthesis (HLS) tool, such as Xilinx Vivado HLS. When selecting
such a Kernel for the Composition, TPC will search the 'Core'
such a Kernel for the Composition, TaPaSCo will search the 'Core'
directory for previous HLS results. If none are found, the core
is built automatically prior to building the Composition.
""".trim.split("""\s+""").mkString(" "),
Platforms -> """
Platform directory - This is the directory in which TPC will
look for files called platform.description containing the
JSON description of a TPC platform (i.e., the device-specific
Platform directory - This is the directory in which TaPaSCo will
look for files called platform.json containing the
JSON description of a TaPaSCo platform (i.e., the device-specific
and infrastructure components).
Changing this directory will affect the available platforms
in the 'Platforms' tab.
......
......@@ -58,14 +58,14 @@ class FileAssetManagerSpec extends FlatSpec with Matchers {
assert(FileAssetManager.entities.kernels.size == oldnum)
}
"Creating new core.descriptions during runtime" should "be reflected in the caches" in {
"Creating new core.jsons during runtime" should "be reflected in the caches" in {
val p = Files.createTempDirectory("tapasco-fileassetmanager-")
val d = p.resolve("Test").resolve("baseline").resolve("vc709").resolve("ipcore")
Files.createDirectories(d)
FileAssetManager.basepath(Entities.Cores).set(p)
assert(FileAssetManager.entities.cores.size == 0)
val zip = d.resolve("test_baseline.zip")
val cf = d.resolve("core.description")
val cf = d.resolve("core.json")
Files.createFile(zip)
val t = Target(FileAssetManager.entities.architectures.toSeq.head, FileAssetManager.entities.platforms.toSeq.head)
val core = Core(cf, zip, "Test", 42, "0.0.1", t, None, None)
......
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