central-arch/pkg/simstate/state.go

45 lines
689 B
Go
Raw Normal View History

2024-11-01 10:54:59 +00:00
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
}