generator: create annotation file
This commit is contained in:
parent
75345b6048
commit
5d62c321f4
@ -7,6 +7,7 @@ import freechips.rocketchip.util.GeneratorApp
|
|||||||
object Generator extends GeneratorApp {
|
object Generator extends GeneratorApp {
|
||||||
val longName = names.topModuleProject + "." + names.configs
|
val longName = names.topModuleProject + "." + names.configs
|
||||||
generateFirrtl
|
generateFirrtl
|
||||||
|
generateAnno
|
||||||
generateTestSuiteMakefrags // TODO: Needed only for legacy make targets
|
generateTestSuiteMakefrags // TODO: Needed only for legacy make targets
|
||||||
generateArtefacts
|
generateArtefacts
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,7 @@ object Generator extends GeneratorApp {
|
|||||||
|
|
||||||
val longName = names.topModuleProject + "." + names.configs
|
val longName = names.topModuleProject + "." + names.configs
|
||||||
generateFirrtl
|
generateFirrtl
|
||||||
|
generateAnno
|
||||||
generateTestSuiteMakefrags
|
generateTestSuiteMakefrags
|
||||||
generateROMs
|
generateROMs
|
||||||
generateArtefacts
|
generateArtefacts
|
||||||
|
@ -5,6 +5,7 @@ package freechips.rocketchip.unittest
|
|||||||
object Generator extends freechips.rocketchip.util.GeneratorApp {
|
object Generator extends freechips.rocketchip.util.GeneratorApp {
|
||||||
val longName = names.topModuleProject + "." + names.configs
|
val longName = names.topModuleProject + "." + names.configs
|
||||||
generateFirrtl
|
generateFirrtl
|
||||||
|
generateAnno
|
||||||
generateTestSuiteMakefrags // TODO: Needed only for legacy make targets
|
generateTestSuiteMakefrags // TODO: Needed only for legacy make targets
|
||||||
generateArtefacts
|
generateArtefacts
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@ import freechips.rocketchip.system.{TestGeneration, DefaultTestSuites}
|
|||||||
import freechips.rocketchip.config._
|
import freechips.rocketchip.config._
|
||||||
import freechips.rocketchip.diplomacy.LazyModule
|
import freechips.rocketchip.diplomacy.LazyModule
|
||||||
import java.io.{File, FileWriter}
|
import java.io.{File, FileWriter}
|
||||||
|
import net.jcazevedo.moultingyaml._
|
||||||
|
import firrtl.annotations.AnnotationYamlProtocol._
|
||||||
|
|
||||||
/** Representation of the information this Generator needs to collect from external sources. */
|
/** Representation of the information this Generator needs to collect from external sources. */
|
||||||
case class ParsedInputNames(
|
case class ParsedInputNames(
|
||||||
@ -106,6 +108,13 @@ trait GeneratorApp extends App with HasGeneratorUtilities {
|
|||||||
Driver.dumpFirrtl(circuit, Some(new File(td, s"$longName.fir"))) // FIRRTL
|
Driver.dumpFirrtl(circuit, Some(new File(td, s"$longName.fir"))) // FIRRTL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def generateAnno {
|
||||||
|
val annotationFile = new File(td, s"$longName.anno")
|
||||||
|
val af = new FileWriter(annotationFile)
|
||||||
|
af.write(circuit.annotations.toArray.toYaml.prettyPrint)
|
||||||
|
af.close()
|
||||||
|
}
|
||||||
|
|
||||||
/** Output software test Makefrags, which provide targets for integration testing. */
|
/** Output software test Makefrags, which provide targets for integration testing. */
|
||||||
def generateTestSuiteMakefrags {
|
def generateTestSuiteMakefrags {
|
||||||
addTestSuites
|
addTestSuites
|
||||||
|
Loading…
Reference in New Issue
Block a user