45 lines
689 B
Go
45 lines
689 B
Go
|
package simstate
|
||
|
|
||
|
import (
|
||
|
"git.elyanpoujol.fr/elyan/central-arch/pkg/register"
|
||
|
)
|
||
|
|
||
|
type CpuRegisters struct {
|
||
|
Gprs [register.GPR_COUNT]uint32
|
||
|
Lr uint32
|
||
|
PcUser uint32
|
||
|
SpUser uint32
|
||
|
PcSvc uint32
|
||
|
SpSvc uint32
|
||
|
PcFault uint32
|
||
|
SpFault uint32
|
||
|
}
|
||
|
|
||
|
type CpuStatusRegisters struct {
|
||
|
Psr uint32
|
||
|
EsrSvc uint32
|
||
|
EsrFault uint32
|
||
|
}
|
||
|
|
||
|
type CpuState struct {
|
||
|
Registers CpuRegisters
|
||
|
StatusRegisters CpuStatusRegisters
|
||
|
}
|
||
|
|
||
|
type RamState struct {
|
||
|
Data []uint32
|
||
|
}
|
||
|
|
||
|
// TODO Implement it
|
||
|
type CacheState struct{}
|
||
|
|
||
|
// TODO Implement it
|
||
|
type MmuState struct{}
|
||
|
|
||
|
type SimState struct {
|
||
|
CpuState *CpuState
|
||
|
RamState *RamState
|
||
|
CacheState *CacheState
|
||
|
MmuState *MmuState
|
||
|
}
|