Continue to copy AXI4M traits due to type-system challenges

This commit is contained in:
David Biancolin 2019-05-16 19:36:51 +00:00
parent db94bdc244
commit a283512ff7
2 changed files with 15 additions and 25 deletions

View File

@ -38,9 +38,11 @@ trait HasDefaultBusConfiguration {
}
/** Adds a port to the system intended to master an AXI4 DRAM controller. */
trait CanHaveMisalignedMasterAXI4MemPort { this: BaseSubsystem =>
val module: CanHaveMisalignedMasterAXI4MemPortModuleImp
/** Copied from RC and modified to change the IO type of the Imp to include the Diplomatic edges
* associated with each port. This drives FASED functional model sizing
*/
trait CanHaveFASEDOptimizedMasterAXI4MemPort { this: BaseSubsystem =>
val module: CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp
val memAXI4Node = p(ExtMem).map { case MemoryPortParams(memPortParams, nMemoryChannels) =>
val portName = "axi4"
@ -71,8 +73,8 @@ trait CanHaveMisalignedMasterAXI4MemPort { this: BaseSubsystem =>
}
/** Actually generates the corresponding IO in the concrete Module */
trait CanHaveMisalignedMasterAXI4MemPortModuleImp extends LazyModuleImp {
val outer: CanHaveMisalignedMasterAXI4MemPort
trait CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp extends LazyModuleImp {
val outer: CanHaveFASEDOptimizedMasterAXI4MemPort
val mem_axi4 = outer.memAXI4Node.map(x => IO(HeterogeneousBag(AXI4BundleWithEdge.fromNode(x.in))))
(mem_axi4 zip outer.memAXI4Node) foreach { case (io, node) =>
@ -89,18 +91,6 @@ trait CanHaveMisalignedMasterAXI4MemPortModuleImp extends LazyModuleImp {
}
}
///* Deploy once we bump to RC's misaligned support */
//trait CanHaveFASEDCompatibleAXI4MemPortModuleImp extends CanHaveMasterAXI4MemPortModuleImp {
// val outer: CanHaveMasterAXI4MemPort
//
// // :nohacks: JANK :nohacks:---------- --------------V
// override val mem_axi4 = outer.memAXI4Node.map(x => Wire(HeterogeneousBag.fromNode(x.in)))
//
// val mem_axi4_with_edge = outer.memAXI4Node.map(n => IO(HeterogeneousBag(AXI4BundleWithEdge.fromNode(n.in))))
// mem_axi4_with_edge.get <> mem_axi4.get
//
//}
/* Wires out tile trace ports to the top; and wraps them in a Bundle that the
* TracerV endpoint can match on.
*/

View File

@ -32,7 +32,7 @@ import java.io.File
class FireSim(implicit p: Parameters) extends RocketSubsystem
with HasDefaultBusConfiguration
with CanHaveMisalignedMasterAXI4MemPort
with CanHaveFASEDOptimizedMasterAXI4MemPort
with HasPeripheryBootROM
with HasNoDebug
with HasPeripherySerial
@ -46,7 +46,7 @@ class FireSim(implicit p: Parameters) extends RocketSubsystem
class FireSimModuleImp[+L <: FireSim](l: L) extends RocketSubsystemModuleImp(l)
with HasRTCModuleImp
with CanHaveMisalignedMasterAXI4MemPortModuleImp
with CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp
with HasPeripheryBootROMModuleImp
with HasNoDebugModuleImp
with HasPeripherySerialModuleImp
@ -58,7 +58,7 @@ class FireSimModuleImp[+L <: FireSim](l: L) extends RocketSubsystemModuleImp(l)
class FireSimNoNIC(implicit p: Parameters) extends RocketSubsystem
with HasDefaultBusConfiguration
with CanHaveMisalignedMasterAXI4MemPort
with CanHaveFASEDOptimizedMasterAXI4MemPort
with HasPeripheryBootROM
with HasNoDebug
with HasPeripherySerial
@ -71,7 +71,7 @@ class FireSimNoNIC(implicit p: Parameters) extends RocketSubsystem
class FireSimNoNICModuleImp[+L <: FireSimNoNIC](l: L) extends RocketSubsystemModuleImp(l)
with HasRTCModuleImp
with CanHaveMisalignedMasterAXI4MemPortModuleImp
with CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp
with HasPeripheryBootROMModuleImp
with HasNoDebugModuleImp
with HasPeripherySerialModuleImp
@ -82,7 +82,7 @@ class FireSimNoNICModuleImp[+L <: FireSimNoNIC](l: L) extends RocketSubsystemMod
class FireBoom(implicit p: Parameters) extends BoomSubsystem
with HasDefaultBusConfiguration
with CanHaveMisalignedMasterAXI4MemPort
with CanHaveFASEDOptimizedMasterAXI4MemPort
with HasPeripheryBootROM
with HasNoDebug
with HasPeripherySerial
@ -96,7 +96,7 @@ class FireBoom(implicit p: Parameters) extends BoomSubsystem
class FireBoomModuleImp[+L <: FireBoom](l: L) extends BoomSubsystemModuleImp(l)
with HasRTCModuleImp
with CanHaveMisalignedMasterAXI4MemPortModuleImp
with CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp
with HasPeripheryBootROMModuleImp
with HasNoDebugModuleImp
with HasPeripherySerialModuleImp
@ -107,7 +107,7 @@ class FireBoomModuleImp[+L <: FireBoom](l: L) extends BoomSubsystemModuleImp(l)
class FireBoomNoNIC(implicit p: Parameters) extends BoomSubsystem
with HasDefaultBusConfiguration
with CanHaveMisalignedMasterAXI4MemPort
with CanHaveFASEDOptimizedMasterAXI4MemPort
with HasPeripheryBootROM
with HasNoDebug
with HasPeripherySerial
@ -120,7 +120,7 @@ class FireBoomNoNIC(implicit p: Parameters) extends BoomSubsystem
class FireBoomNoNICModuleImp[+L <: FireBoomNoNIC](l: L) extends BoomSubsystemModuleImp(l)
with HasRTCModuleImp
with CanHaveMisalignedMasterAXI4MemPortModuleImp
with CanHaveFASEDOptimizedMasterAXI4MemPortModuleImp
with HasPeripheryBootROMModuleImp
with HasNoDebugModuleImp
with HasPeripherySerialModuleImp