1
0

BaseTop: record top module; more general than GraphML

This commit is contained in:
Wesley W. Terpstra 2016-10-02 02:31:30 -07:00 committed by Yunsup Lee
parent 5ff3d3d61c
commit 0a4ef66894
2 changed files with 6 additions and 4 deletions

View File

@ -54,6 +54,8 @@ abstract class BaseTop(q: Parameters) extends LazyModule {
TLAtomicAutomata(arithmetic = p(PeripheryBusKey).arithAMO)(
TLHintHandler()(
legacy.node))))
TopModule.contents = Some(this)
}
abstract class BaseTopBundle(val p: Parameters) extends Bundle {
@ -93,7 +95,6 @@ abstract class BaseTopModule[+L <: BaseTop, +B <: BaseTopBundle](
println("\nGenerated Configuration String")
println(p(ConfigString))
ConfigStringOutput.contents = Some(p(ConfigString))
GraphMLOutput.contents = Some(outer.graphML)
io.success := coreplexIO.success
}

View File

@ -5,6 +5,7 @@ package util
import Chisel._
import cde._
import java.io.{File, FileWriter}
import uncore.tilelink2.LazyModule
/** Representation of the information this Generator needs to collect from external sources. */
case class ParsedInputNames(
@ -120,7 +121,7 @@ trait GeneratorApp extends App with HasGeneratorUtilities {
/** Output a global LazyModule topology for documentation purposes. */
def generateGraphML {
GraphMLOutput.contents.foreach(c => writeOutputFile(td, s"${names.configs}.graphml", c))
TopModule.contents.foreach(lm => writeOutputFile(td, s"${names.configs}.graphml", lm.graphML))
}
}
@ -128,6 +129,6 @@ object ConfigStringOutput {
var contents: Option[String] = None
}
object GraphMLOutput {
var contents: Option[String] = None
object TopModule {
var contents: Option[LazyModule] = None
}