2022-12-27 23:05:26 +00:00
|
|
|
package riscvemu
|
|
|
|
|
2022-12-28 00:59:35 +00:00
|
|
|
// EEI (Execution Environment Interface) is the enivronment in which RISC-V
|
|
|
|
// code is run.
|
|
|
|
type EEI interface {
|
2022-12-27 23:05:26 +00:00
|
|
|
ReadByte(addr uint32) (byte, error)
|
2022-12-28 01:27:12 +00:00
|
|
|
Read16(addr uint32) (uint16, error)
|
2022-12-27 23:05:26 +00:00
|
|
|
Read32(addr uint32) (uint32, error)
|
2022-12-28 01:27:12 +00:00
|
|
|
|
2022-12-27 23:05:26 +00:00
|
|
|
WriteByte(addr uint32, value byte) error
|
2022-12-28 01:27:12 +00:00
|
|
|
Write16(addr uint32, value uint16) error
|
2022-12-27 23:05:26 +00:00
|
|
|
Write32(addr, value uint32) error
|
|
|
|
|
|
|
|
Syscall()
|
|
|
|
|
|
|
|
Trap() (bool, error)
|
|
|
|
}
|