Utilities used when generating FIRRTL for a LazyModule.
Representation of the information this Generator needs to collect from external sources.
case class ParsedInputNames(
targetDir: String,
topModuleProject: String,
topModuleClass: String,
configProject: String,
configs: String)- targetDir
String(param) the target file directory for the generated FIRRTL code. - topModuleProject
String(param) name of the scala package that the target design (LazyModule) belongs to. - topModuleClass
String(param) name of the target design (LazyModule) to be compiled into FIRRTL. - configProject
String(param) name of the scala package that the configure parameter class belings to. - configs
String(param) names of the configure parameter classes used for the target design. - fullConfigClasses
Seq[String]a list of the configure classes. - fullTopModuleClass
Stringthe full name of the target design.
The scala trait acting as the main entry point of FIRRTL generation.
trait GeneratorApp extends App with HasGeneratorUtilities-
names
ParsedInputNames(lazy) the names of the target design, configure classes and file directoy from user input.#sbt example run TargetDir TopModuleProjectName TopModuleName ConfigProjectName ConfigNameString -
generateArtefacts
() => Unitexecute all callbacks to generate the files defined inElaborationArtefacts.
Record the files that will be generated beside the FIRRTL during the Chisel compilation process.
- files
Seq[(ext:String, func:() => String)]list of callback functions.- ext
Stringthe file extension used by this generated file. - func
() => Stringthe callback that will be executed by the code generator.
- ext
- add
(ext:String, content: => String)push(ext, ()=>content)to the callback listfiles.
Last updated: 08/08/2017
CC BY-NC-SA 4.0, © (2017) Wei Song
Apache 2.0, © (2016-2017) SiFive, Inc
BSD, © (2012-2014, 2016) The Regents of the University of California (Regents)