1
0

rocketchip: generate GraphML output

This commit is contained in:
Wesley W. Terpstra 2016-09-26 01:42:46 -07:00 committed by Yunsup Lee
parent 1773eb4405
commit dd9558f45d
3 changed files with 11 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import junctions._
import uncore.tilelink._ import uncore.tilelink._
import uncore.tilelink2._ import uncore.tilelink2._
import uncore.devices._ import uncore.devices._
import util.{ParameterizedBundle, ConfigStringOutput} import util.{ParameterizedBundle, ConfigStringOutput, GraphMLOutput}
import rocket._ import rocket._
import rocket.Util._ import rocket.Util._
import coreplex._ import coreplex._
@ -91,6 +91,7 @@ abstract class BaseTopModule[+L <: BaseTop, +B <: BaseTopBundle](
println("Generated Configuration String") println("Generated Configuration String")
println(p(ConfigString)) println(p(ConfigString))
ConfigStringOutput.contents = Some(p(ConfigString)) ConfigStringOutput.contents = Some(p(ConfigString))
GraphMLOutput.contents = Some(outer.graphML)
io.success := coreplexIO.success io.success := coreplexIO.success
} }

View File

@ -79,5 +79,6 @@ object Generator extends util.GeneratorApp {
generateTestSuiteMakefrags generateTestSuiteMakefrags
generateDSEConstraints generateDSEConstraints
generateConfigString generateConfigString
generateGraphML
generateParameterDump generateParameterDump
} }

View File

@ -117,9 +117,17 @@ trait GeneratorApp extends App with HasGeneratorUtilities {
def generateConfigString { def generateConfigString {
ConfigStringOutput.contents.foreach(c => writeOutputFile(td, s"${names.configs}.cfg", c)) ConfigStringOutput.contents.foreach(c => writeOutputFile(td, s"${names.configs}.cfg", c))
} }
/** Output a global LazyModule topology for documentation purposes. */
def generateGraphML {
GraphMLOutput.contents.foreach(c => writeOutputFile(td, s"${names.configs}.graphml", c))
}
} }
object ConfigStringOutput { object ConfigStringOutput {
var contents: Option[String] = None var contents: Option[String] = None
} }
object GraphMLOutput {
var contents: Option[String] = None
}