Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Unit: Bytes LineWidthL1Cache = 64 LineWidthL2Cache = 512 LineWidthL3Cache = 4096 // Unit: Bits OffsetBitsL1Cache = 6 OffsetBitsL2Cache = 9 OffsetBitsL3Cache = 12 )
View Source
const ( // Unit: Bytes DataSize = 8 // Unit: Bytes KB = 1024 MB = 1024 * KB GB = 1024 * MB TB = 1024 * GB // Unit: Bytes SizeMemory = 1 * MB //1 * GB SizeL3Cache = 1 * MB SizeL2Cache = 32 * KB SizeL1Cache = 1 * KB )
View Source
const ( DeviceControlBlockAddress = 512 DeviceControlBlockSize = 24 )
View Source
const ( DeviceOffsetCommand uint32 = iota // 8bit controller, 8bit operation, 48bit parameter DeviceOffsetDeviceAddress DeviceOffsetMemoryAddress )
View Source
const ( RegisterCount = 32 RCoreIdentifier = R2 RContextIdentifier = R3 RInterruptVectorTable = R4 RProcessIdentifier = R5 RProgramCounter = R6 RProgramStart = R7 RProgramLimit = R8 RStackPointer = R9 RStackStart = R10 RStackLimit = R11 RDataStart = R12 RDataLimit = R13 )
View Source
const (
// Unit: Bytes
BusSize = 8
)
View Source
const ContextCount = 8
View Source
const CoreCount = 8
View Source
const InstructionSize = 4
View Source
const InterruptCount = 9
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheOperation ¶
type CacheOperation uint8
const ( CacheNone CacheOperation = iota CacheRead CacheWrite CacheClear CacheFlush )
func (CacheOperation) String ¶
func (o CacheOperation) String() string
type Context ¶
type Context interface { Id() int Core() Core InstructionCache() Cache DataCache() Cache IsValid() bool IsAsleep() bool Sleep() Error(InterruptValue) IsInterrupted() bool SetInterrupted(bool) Signal() IsSignalled() bool RequiresLock() bool SetRequiresLock(bool) AcquiredLock() bool SetAcquiredLock(bool) FetchInstruction() LoadInstruction() DecodeInstruction() LoadData() (uint64, uint64, uint64, uint64) ExecuteOperation(uint64, uint64, uint64, uint64) (uint64, uint64) FormatData(uint64, uint64) (uint64, uint64) StoreData(uint64, uint64) RetireInstruction() ReadRegister(Register) uint64 WriteRegister(Register, uint64) IncrementProgramCounter() SetProgramCounter(uint64) }
type DeviceOperation ¶
type DeviceOperation uint32
const ( DeviceNone DeviceOperation = iota DeviceStatus DeviceEnable DeviceDisable DeviceRead DeviceWrite )
func (DeviceOperation) String ¶
func (o DeviceOperation) String() string
type Instruction ¶
type InterruptValue ¶
type InterruptValue int16
const ( InterruptSignal InterruptValue = iota InterruptBreakpoint InterruptUnsupportedOperationError InterruptArithmeticError InterruptRegisterAccessError InterruptMemoryAccessError InterruptProgramAccessError InterruptStackOverflowError InterruptStackUnderflowError )
func (InterruptValue) String ¶
func (i InterruptValue) String() string
type MemoryOperation ¶
type MemoryOperation uint8
const ( MemoryNone MemoryOperation = iota MemoryRead MemoryWrite )
func (MemoryOperation) String ¶
func (o MemoryOperation) String() string
type Register ¶
type Register uint8
const ( R0 Register = iota // RO, Always 0 R1 // RO, Always 1 R2 // RO, Core Identifier (0-7) R3 // RO, Context Identifier (0-7) R4 // PR, Interrupt Vector Table R5 // PR, Process Identifier R6 // PR, Program Counter (offset from Program Start) R7 // PR, Program Start R8 // PR, Program Limit R9 // PR, Stack Pointer R10 // PR, Stack Start R11 // PR, Stack Limit R12 // PR, Data Start R13 // PR, Data Limit R14 // PR, Reserved R15 // PR, Reserved R16 // GP R17 // GP R18 // GP R19 // GP R20 // GP R21 // GP R22 // GP R23 // GP R24 // GP R25 // GP R26 // GP R27 // GP R28 // GP R29 // GP R30 // GP R31 // GP )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.