One stumbling block was the use of parameters and lazy modules. Rocket uses the content dependent environment package for configuring its components. The project template repo offers some explanation on the use of the cake pattern (design pattern) for allowing configuration to complete before hardware elaboration begins (paraphrasing, here). Here is another thread that discusses the strategy.
On to some code (module elaboration only) ...
// Define your very own configuration object ... case object BlankField extends Field[Boolean] class BlankConfig extends Config((site, here, up) => { case BlankField => false }) // Pay close attention to use of LazyModule and LazyModuleImp ... object ChiselTopDriver extends App { implicit val p: Parameters = new BlankConfig chisel3.Driver.execute(args, () => LazyModule(new ChiselTop).module) } class ChiselTop()(implicit p: Parameters) extends LazyModule { val master = LazyModule(new AHBMaster) val slave = LazyModule(new AHBSlave) slave.node := master.node // does not work.. yet.. lazy val module = new LazyModuleImp(this) { val io = new Bundle { val ddrClock = Input(Clock()) val ddrReset = Input(UInt(1.W)) } } } class AHBMaster()(implicit p: Parameters) extends LazyModule { val node = AHBOutputNode() // does not work.. yet.. lazy val module = new LazyModuleImp(this) { val io = new Bundle { val out = node.bundleOut } } } class AHBSlave()(implicit p: Parameters) extends LazyModule { val node = AHBInputNode() // does not work.. yet.. lazy val module = new LazyModuleImp(this) { val io = new Bundle { val in = node.bundleIn } } }
Thank you so much for all the wonderful information about Technology! I love your work.
ReplyDeletejavascript training in chennai
javascript training institute in chennai
Hibernate Training in Chennai
core java training in chennai
Spring Training in Chennai
QTP Training in Chennai
Manual Testing Training in Chennai
JMeter Training in Chennai
The article is so informative. This is more helpful for our
ReplyDeletemagento training course in chennai
magento training institute in chennai
magento 2 training in chennai
magento development training
magento 2 course
magento developer training
Thanks for sharing.