Add example rocket-chip-blocks timer integration
This commit is contained in:
@@ -22,6 +22,7 @@ class DigitalTop(implicit p: Parameters) extends ChipyardSystem
|
|||||||
with testchipip.serdes.CanHavePeripheryTLSerial // Enables optionally adding the backing memory and serial adapter
|
with testchipip.serdes.CanHavePeripheryTLSerial // Enables optionally adding the backing memory and serial adapter
|
||||||
with testchipip.soc.CanHavePeripheryChipIdPin // Enables optional pin to set chip id for multi-chip configs
|
with testchipip.soc.CanHavePeripheryChipIdPin // Enables optional pin to set chip id for multi-chip configs
|
||||||
with sifive.blocks.devices.i2c.HasPeripheryI2C // Enables optionally adding the sifive I2C
|
with sifive.blocks.devices.i2c.HasPeripheryI2C // Enables optionally adding the sifive I2C
|
||||||
|
with sifive.blocks.devices.timer.HasPeripheryTimer // Enables optionally adding the timer device
|
||||||
with sifive.blocks.devices.pwm.HasPeripheryPWM // Enables optionally adding the sifive PWM
|
with sifive.blocks.devices.pwm.HasPeripheryPWM // Enables optionally adding the sifive PWM
|
||||||
with sifive.blocks.devices.uart.HasPeripheryUART // Enables optionally adding the sifive UART
|
with sifive.blocks.devices.uart.HasPeripheryUART // Enables optionally adding the sifive UART
|
||||||
with sifive.blocks.devices.gpio.HasPeripheryGPIO // Enables optionally adding the sifive GPIOs
|
with sifive.blocks.devices.gpio.HasPeripheryGPIO // Enables optionally adding the sifive GPIOs
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ class ManyPeripheralsRocketConfig extends Config(
|
|||||||
new testchipip.serdes.WithSerialTLMem(isMainMemory=true) ++ // set lbwif memory base to DRAM_BASE, use as main memory
|
new testchipip.serdes.WithSerialTLMem(isMainMemory=true) ++ // set lbwif memory base to DRAM_BASE, use as main memory
|
||||||
new chipyard.harness.WithSimSPIFlashModel(true) ++ // add the SPI flash model in the harness (read-only)
|
new chipyard.harness.WithSimSPIFlashModel(true) ++ // add the SPI flash model in the harness (read-only)
|
||||||
new chipyard.harness.WithSimBlockDevice ++ // drive block-device IOs with SimBlockDevice
|
new chipyard.harness.WithSimBlockDevice ++ // drive block-device IOs with SimBlockDevice
|
||||||
|
new chipyard.config.WithPeripheryTimer ++ // add the pwm timer device
|
||||||
new chipyard.config.WithSPIFlash ++ // add the SPI flash controller
|
new chipyard.config.WithSPIFlash ++ // add the SPI flash controller
|
||||||
new freechips.rocketchip.subsystem.WithDefaultMMIOPort ++ // add default external master port
|
new freechips.rocketchip.subsystem.WithDefaultMMIOPort ++ // add default external master port
|
||||||
new freechips.rocketchip.subsystem.WithDefaultSlavePort ++ // add default external slave port
|
new freechips.rocketchip.subsystem.WithDefaultSlavePort ++ // add default external slave port
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import sifive.blocks.devices.gpio._
|
|||||||
import sifive.blocks.devices.uart._
|
import sifive.blocks.devices.uart._
|
||||||
import sifive.blocks.devices.spi._
|
import sifive.blocks.devices.spi._
|
||||||
import sifive.blocks.devices.i2c._
|
import sifive.blocks.devices.i2c._
|
||||||
|
import sifive.blocks.devices.timer._
|
||||||
|
|
||||||
import testchipip._
|
import testchipip._
|
||||||
|
|
||||||
@@ -168,3 +169,7 @@ class WithNoBusErrorDevices extends Config((site, here, up) => {
|
|||||||
case MemoryBusKey => up(MemoryBusKey).copy(errorDevice = None)
|
case MemoryBusKey => up(MemoryBusKey).copy(errorDevice = None)
|
||||||
case FrontBusKey => up(FrontBusKey).copy(errorDevice = None)
|
case FrontBusKey => up(FrontBusKey).copy(errorDevice = None)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
class WithPeripheryTimer(timerParams: TimerParams = TimerParams(0x4000)) extends Config((site, here, up) => {
|
||||||
|
case PeripheryTimerKey => Seq(timerParams)
|
||||||
|
})
|
||||||
|
|||||||
Submodule generators/rocket-chip-blocks updated: 3dddfe9f5b...340b78158c
Reference in New Issue
Block a user