
The CLINT is implemented both on the fe310-g002 chip and in the sifive_e QEMU machine type. Therefore, use that peripheral for consistency. The only difference is the clock speed, which runs at 10MHz in QEMU for some reason instead of 32.768kHz as on the physical HiFive1 boards.
16 строки
191 Б
Go
16 строки
191 Б
Go
// +build fe310,!qemu
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"device/riscv"
|
|
)
|
|
|
|
const tickMicros = 32768 // RTC clock runs at 32.768kHz
|
|
|
|
func abort() {
|
|
// lock up forever
|
|
for {
|
|
riscv.Asm("wfi")
|
|
}
|
|
}
|