Documentation ¶
Index ¶
- Constants
- type Bus
- func (b *Bus) Data() []byte
- func (b *Bus) IsDirty(offset int) bool
- func (b *Bus) IsValid(offset int) bool
- func (b *Bus) Read(offset int) byte
- func (b *Bus) ReadFrom(bus flamego.Bus)
- func (b *Bus) SetDirty(offset int, dirty bool)
- func (b *Bus) SetValid(offset int, valid bool)
- func (b *Bus) Size() int
- func (b *Bus) Write(offset int, value byte)
- func (b *Bus) WriteTo(bus flamego.Bus, offset int)
- type Cache
- func (c *Cache) Address() uint64
- func (c *Cache) Bus() flamego.Bus
- func (c *Cache) Clear(address uint64)
- func (c *Cache) Clock(cycle int)
- func (c *Cache) CreateAddress(tag, index, offset uint64) uint64
- func (c *Cache) Flush(address uint64)
- func (c *Cache) Free()
- func (c *Cache) IndexBits() int
- func (c *Cache) IsBusy() bool
- func (c *Cache) IsFree() bool
- func (c *Cache) IsSuccessful() bool
- func (c *Cache) LineWidth() int
- func (c *Cache) Lines() []*CacheLine
- func (c *Cache) LowerAddress() uint64
- func (c *Cache) LowerOperation() flamego.CacheOperation
- func (c *Cache) OffsetBits() int
- func (c *Cache) Operation() flamego.CacheOperation
- func (c *Cache) ParseAddress(a uint64) (uint64, uint64, uint64)
- func (c *Cache) Read(address uint64)
- func (c *Cache) Size() int
- func (c *Cache) TagBits() int
- func (c *Cache) Write(address uint64)
- type CacheLine
- type Context
- func (x *Context) AcquiredLock() bool
- func (x *Context) Core() flamego.Core
- func (x *Context) DataCache() flamego.Cache
- func (x *Context) DecodeInstruction()
- func (x *Context) Error(value flamego.InterruptValue)
- func (x *Context) ExecuteOperation(a, b, c, d uint64) (uint64, uint64)
- func (x *Context) FetchInstruction()
- func (x *Context) FormatData(e, f uint64) (uint64, uint64)
- func (x *Context) Id() int
- func (x *Context) IncrementProgramCounter()
- func (x *Context) Instruction() flamego.Instruction
- func (x *Context) InstructionCache() flamego.Cache
- func (x *Context) InstructionString() string
- func (x *Context) IsAligned() bool
- func (x *Context) IsAsleep() bool
- func (x *Context) IsInterrupted() bool
- func (x *Context) IsRetrying() bool
- func (x *Context) IsSignalled() bool
- func (x *Context) IsValid() bool
- func (x *Context) LoadData() (uint64, uint64, uint64, uint64)
- func (x *Context) LoadInstruction()
- func (x *Context) NextInterrupt() flamego.InterruptValue
- func (x *Context) Opcode() uint32
- func (x *Context) ReadRegister(register flamego.Register) uint64
- func (x *Context) RequiresLock() bool
- func (x *Context) RetireInstruction()
- func (x *Context) SetAcquiredLock(acquired bool)
- func (x *Context) SetInterrupted(i bool)
- func (x *Context) SetProgramCounter(pc uint64)
- func (x *Context) SetRequiresLock(required bool)
- func (x *Context) Signal()
- func (x *Context) Sleep()
- func (x *Context) SleepCycles() int
- func (x *Context) Status() string
- func (x *Context) StoreData(g, h uint64)
- func (x *Context) WriteRegister(register flamego.Register, value uint64)
- type Core
- func (c *Core) AcquiredLock() bool
- func (c *Core) AddContext(x flamego.Context)
- func (c *Core) Cache() flamego.Cache
- func (c *Core) Clock(cycle int)
- func (c *Core) Context(index int) flamego.Context
- func (c *Core) ExecuteRegister0() uint64
- func (c *Core) ExecuteRegister1() uint64
- func (c *Core) FormatRegister0() uint64
- func (c *Core) FormatRegister1() uint64
- func (c *Core) Id() int
- func (c *Core) LoadRegister0() uint64
- func (c *Core) LoadRegister1() uint64
- func (c *Core) LoadRegister2() uint64
- func (c *Core) LoadRegister3() uint64
- func (c *Core) LockHolder() int
- func (c *Core) NextContext() int
- func (c *Core) Processor() flamego.Processor
- func (c *Core) RequiresLock() bool
- func (c *Core) SetAcquiredLock(acquired bool)
- type Device
- func (d *Device) AddOperation(o flamego.DeviceOperation, f func() error)
- func (d *Device) Clock(cycle int)
- func (d *Device) Command() uint64
- func (d *Device) Controller() int
- func (d *Device) CopyCommand()
- func (d *Device) CopyData() uint64
- func (d *Device) CopyDeviceAddress()
- func (d *Device) CopyMemoryAddress()
- func (d *Device) DeviceAddress() uint64
- func (d *Device) IsBusy() bool
- func (d *Device) MemoryAddress() uint64
- func (d *Device) MemoryOffset() uint64
- func (d *Device) MemoryOperation() flamego.MemoryOperation
- func (d *Device) Operation() flamego.DeviceOperation
- func (d *Device) Parameter() uint64
- func (d *Device) ReadCommand()
- func (d *Device) ReadDeviceAddress()
- func (d *Device) ReadMemoryAddress()
- func (d *Device) SetOnSignal(s func(int))
- func (d *Device) Signal()
- func (d *Device) SignalController()
- type Display
- type FileStorage
- func (s *FileStorage) Close() error
- func (s *FileStorage) Disable() error
- func (s *FileStorage) Enable() error
- func (s *FileStorage) File() *os.File
- func (s *FileStorage) Open(path string) error
- func (s *FileStorage) Read() error
- func (s *FileStorage) Status() error
- func (s *FileStorage) Write() error
- type Machine
- type Memory
- func (m *Memory) Address() uint64
- func (m *Memory) Bus() flamego.Bus
- func (m *Memory) Clock(cycle int)
- func (m *Memory) Data() []byte
- func (m *Memory) Free()
- func (m *Memory) IsBusy() bool
- func (m *Memory) IsFree() bool
- func (m *Memory) IsSuccessful() bool
- func (m *Memory) Load(r io.Reader) (int, error)
- func (m *Memory) Operation() flamego.MemoryOperation
- func (m *Memory) Read(address uint64)
- func (m *Memory) Set(address uint64, data []byte)
- func (m *Memory) Size() int
- func (m *Memory) Write(address uint64)
- type Processor
- func (p *Processor) AddCore(c flamego.Core)
- func (p *Processor) AddDevice(d flamego.Device)
- func (p *Processor) Cache() flamego.Cache
- func (p *Processor) Clock(cycle int)
- func (p *Processor) Core(index int) flamego.Core
- func (p *Processor) Device(index int) flamego.Device
- func (p *Processor) Halt()
- func (p *Processor) HasHalted() bool
- func (p *Processor) LockHolder() int
- func (p *Processor) Signal(device int)
Constants ¶
View Source
const ( ReadCommand = flamego.MemoryOperation(3) ReadDeviceAddress = flamego.MemoryOperation(4) ReadMemoryAddress = flamego.MemoryOperation(5) )
View Source
const PixelBytes = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) CreateAddress ¶
func (*Cache) IsSuccessful ¶
func (*Cache) LowerAddress ¶
func (*Cache) LowerOperation ¶
func (c *Cache) LowerOperation() flamego.CacheOperation
func (*Cache) OffsetBits ¶
func (*Cache) Operation ¶
func (c *Cache) Operation() flamego.CacheOperation
type CacheLine ¶
type CacheLine struct { Bus // contains filtered or unexported fields }
func NewCacheLine ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) AcquiredLock ¶
func (*Context) DecodeInstruction ¶
func (x *Context) DecodeInstruction()
func (*Context) Error ¶
func (x *Context) Error(value flamego.InterruptValue)
func (*Context) ExecuteOperation ¶
func (*Context) FetchInstruction ¶
func (x *Context) FetchInstruction()
func (*Context) IncrementProgramCounter ¶
func (x *Context) IncrementProgramCounter()
func (*Context) Instruction ¶
func (x *Context) Instruction() flamego.Instruction
func (*Context) InstructionCache ¶
func (*Context) InstructionString ¶
func (*Context) IsInterrupted ¶
func (*Context) IsRetrying ¶
func (*Context) IsSignalled ¶
func (*Context) LoadInstruction ¶
func (x *Context) LoadInstruction()
func (*Context) NextInterrupt ¶
func (x *Context) NextInterrupt() flamego.InterruptValue
func (*Context) RequiresLock ¶
func (*Context) RetireInstruction ¶
func (x *Context) RetireInstruction()
func (*Context) SetAcquiredLock ¶
func (*Context) SetInterrupted ¶
func (*Context) SetProgramCounter ¶
func (*Context) SetRequiresLock ¶
func (*Context) SleepCycles ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) AcquiredLock ¶
func (*Core) AddContext ¶
func (*Core) ExecuteRegister0 ¶
func (*Core) ExecuteRegister1 ¶
func (*Core) FormatRegister0 ¶
func (*Core) FormatRegister1 ¶
func (*Core) LoadRegister0 ¶
func (*Core) LoadRegister1 ¶
func (*Core) LoadRegister2 ¶
func (*Core) LoadRegister3 ¶
func (*Core) LockHolder ¶
func (*Core) NextContext ¶
Index of the next context to fetch an instruction
func (*Core) RequiresLock ¶
func (*Core) SetAcquiredLock ¶
type Device ¶
type Device struct { OnMemoryRead func() error OnMemoryWrite func() error OnSignal func(int) // contains filtered or unexported fields }
func (*Device) AddOperation ¶
func (d *Device) AddOperation(o flamego.DeviceOperation, f func() error)
func (*Device) Controller ¶
func (*Device) CopyCommand ¶
func (d *Device) CopyCommand()
func (*Device) CopyDeviceAddress ¶
func (d *Device) CopyDeviceAddress()
func (*Device) CopyMemoryAddress ¶
func (d *Device) CopyMemoryAddress()
func (*Device) DeviceAddress ¶
func (*Device) MemoryAddress ¶
func (*Device) MemoryOffset ¶
func (*Device) MemoryOperation ¶
func (d *Device) MemoryOperation() flamego.MemoryOperation
func (*Device) Operation ¶
func (d *Device) Operation() flamego.DeviceOperation
func (*Device) ReadCommand ¶
func (d *Device) ReadCommand()
func (*Device) ReadDeviceAddress ¶
func (d *Device) ReadDeviceAddress()
func (*Device) ReadMemoryAddress ¶
func (d *Device) ReadMemoryAddress()
func (*Device) SetOnSignal ¶
func (*Device) SignalController ¶
func (d *Device) SignalController()
type Display ¶
type Display struct { Device // contains filtered or unexported fields }
func (*Display) FetchFrame ¶
type FileStorage ¶
type FileStorage struct { Device // contains filtered or unexported fields }
func NewFileStorage ¶
func NewFileStorage(m flamego.Memory, o uint64) *FileStorage
func (*FileStorage) Close ¶
func (s *FileStorage) Close() error
func (*FileStorage) Disable ¶
func (s *FileStorage) Disable() error
func (*FileStorage) Enable ¶
func (s *FileStorage) Enable() error
func (*FileStorage) File ¶
func (s *FileStorage) File() *os.File
func (*FileStorage) Open ¶
func (s *FileStorage) Open(path string) error
func (*FileStorage) Read ¶
func (s *FileStorage) Read() error
func (*FileStorage) Status ¶
func (s *FileStorage) Status() error
func (*FileStorage) Write ¶
func (s *FileStorage) Write() error
type Machine ¶
func NewMachine ¶
func NewMachine() *Machine
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) IsSuccessful ¶
func (*Memory) Operation ¶
func (m *Memory) Operation() flamego.MemoryOperation
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (*Processor) LockHolder ¶
Click to show internal directories.
Click to hide internal directories.