Hi,
I think you are trying to do something like this? (Note: There is probably a bit cleaner way to connect up the Diplomatic nodes… but I think this is sufficient?
class Dev(...) extends LazyModule {
val node = // Some Diplomatic Node
// This is DevImp(lementation) (instead of inlining the mod. implementation you could separate it into its own class)
lazy val module = new LazyModuleImp {
val io = IO(...) // some non-diplomatic IOs (of Type DevIO)
// connecting node up to HW stuff + connecting the io up to stuff
}
}
class AggDevice(...) extends LazyModule {
val xbarNode = // Some Diplomatic Node
val mods = Seq.fill(nMods){ LazyModule(new Dev(...)) }
// can either connect the diplomatic IOs to something like a xbar
mods.foreach { xbarNode := _.node }
// or you can connect them up in the level above by doing something like the following the LazyModule above
// aggDeviceInstance.mods.foreach { someSinkNode := _.node }
// This is AggDeviceImp
lazy val module = new LazyModuleImp {
val io = IO(Vec(nMods, new DevIO)) // some non-diplomatic IOs
io.zip(mods).map (case (sub_io, mod_io) => sub_io := mod_io)
}
}
You can definitely bundle up IOs from different levels… it just depends on what you want to do… I think my preference is to probably get rid of the AggDevice and just connect up the N devices in the level above. You shouldn't really need to learn about BundleBridges to do something like this.
Hope that helps.
--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/7300df1b-8140-45bd-b002-e24801502461n%40googlegroups.com.
Hi Todd,
Assuming you are talking about connecting them together non-diplomatically (i.e. kinda the DevIO thing in the other example), then you can just connect them up in the LazyModuleImp area. I adjusted the prior example to not pass out the non-diplomatic IOs of the Dev devices but instead connect them together.
class AggDevice(...) extends LazyModule {
val xbarNode = // Some Diplomatic Node
val mods = Seq.fill(nMods){ LazyModule(new Dev(...)) }
// can either connect the diplomatic IOs to something like a xbar
mods.foreach { xbarNode := _.node }
// or you can connect them up in the level above by doing something like the following the LazyModule above
// aggDeviceInstance.mods.foreach { someSinkNode := _.node }
// This is AggDeviceImp
lazy val module = new LazyModuleImp {
// connect mod(i).io to mod(j).io s
// you would have to set i/j here
mod(i).io <> mod(j).io
}
}
In this case, your DevIO would have to change (probably split in 2 parts: an input and output). But you could connect the Dev modules together.
If you are doing everything diplomatically (i.e. there is no DevIO), you could just have different diplomatic nodes in "Dev" for each purpose (i.e. one node to connect up to the SBUS eventually and one node to source/sink requests between other Dev modules). In the end, both are very possible… just depends on what you want to do… (I assume you are probably trying to do the DevIO case but I can expand on this one if need be).
Hope that helps.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/56854a48-6bb8-4cc3-b188-29101cc95122n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/2be22825-8b70-49f8-b265-52483e424a2dn%40googlegroups.com.