initialize the clint in sim

This commit is contained in:
Dolu1990 2020-04-18 01:26:31 +02:00
parent befecc7ed6
commit 4a49e6d91f

View file

@ -388,6 +388,10 @@ object VexRiscvSmpClusterTestInfrastructure{
onWrite(PUTC)(data => print(data.toChar))
// onWrite(GETC)(data => System.in.read().toInt)
dut.io.softwareInterrupts #= 0
dut.io.timerInterrupts #= 0
dut.io.externalInterrupts #= 0
dut.io.externalSupervisorInterrupts #= 0
onRead(CLINT_TIME_ADDR)(simTime().toInt)
onRead(CLINT_TIME_ADDR+4)((simTime() >> 32).toInt)
for(hartId <- 0 until cpuCount){
@ -458,7 +462,7 @@ object VexRiscvSmpClusterOpenSbi extends App{
simConfig.allOptimisation
simConfig.addSimulatorFlag("--threads 1")
val cpuCount = 4
val cpuCount = 16
val withStall = false
simConfig.compile(VexRiscvSmpClusterGen.vexRiscvCluster(cpuCount)).doSimUntilVoid(seed = 42){dut =>