revert module imp && fix for 4gb ram
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package chipyard.fpga.vc707
|
||||
|
||||
import chisel3._
|
||||
import chisel3.experimental.{BaseModule}
|
||||
|
||||
import freechips.rocketchip.util.{HeterogeneousBag}
|
||||
import freechips.rocketchip.tilelink.{TLBundle}
|
||||
@@ -14,26 +15,32 @@ import chipyard.harness.{OverrideHarnessBinder}
|
||||
|
||||
/*** UART ***/
|
||||
class WithVC707UARTHarnessBinder extends OverrideHarnessBinder({
|
||||
(system: HasPeripheryUARTModuleImp, th: VC707FPGATestHarness, ports: Seq[UARTPortIO]) => {
|
||||
th.io_uart_bb.bundle <> ports.head
|
||||
(system: HasPeripheryUARTModuleImp, th: BaseModule, ports: Seq[UARTPortIO]) => {
|
||||
th match { case vc707th: VC707FPGATestHarnessImp => {
|
||||
vc707th.vc707Outer.io_uart_bb.bundle <> ports.head
|
||||
}}
|
||||
}
|
||||
})
|
||||
|
||||
/*** SPI ***/
|
||||
class WithVC707SPISDCardHarnessBinder extends OverrideHarnessBinder({
|
||||
(system: HasPeripherySPI, th: VC707FPGATestHarness, ports: Seq[SPIPortIO]) => {
|
||||
th.io_spi_bb.bundle <> ports.head
|
||||
(system: HasPeripherySPI, th: BaseModule, ports: Seq[SPIPortIO]) => {
|
||||
th match { case vc707th: VC707FPGATestHarnessImp => {
|
||||
vc707th.vc707Outer.io_spi_bb.bundle <> ports.head
|
||||
}}
|
||||
}
|
||||
})
|
||||
|
||||
/*** Experimental DDR ***/
|
||||
class WithVC707DDRMemHarnessBinder extends OverrideHarnessBinder({
|
||||
(system: CanHaveMasterTLMemPort, th: VC707FPGATestHarness, ports: Seq[HeterogeneousBag[TLBundle]]) => {
|
||||
require(ports.size == 1)
|
||||
(system: CanHaveMasterTLMemPort, th: BaseModule, ports: Seq[HeterogeneousBag[TLBundle]]) => {
|
||||
th match { case vc707th: VC707FPGATestHarnessImp => {
|
||||
require(ports.size == 1)
|
||||
|
||||
val bundles = th.ddrClient.out.map(_._1)
|
||||
val ddrClientBundle = Wire(new HeterogeneousBag(bundles.map(_.cloneType)))
|
||||
bundles.zip(ddrClientBundle).foreach { case (bundle, io) => bundle <> io }
|
||||
ddrClientBundle <> ports.head
|
||||
val bundles = vc707th.vc707Outer.ddrClient.out.map(_._1)
|
||||
val ddrClientBundle = Wire(new HeterogeneousBag(bundles.map(_.cloneType)))
|
||||
bundles.zip(ddrClientBundle).foreach { case (bundle, io) => bundle <> io }
|
||||
ddrClientBundle <> ports.head
|
||||
}}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user