riscv

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package egg/riscv implements a RISC-V 32 IM machine for the EGG emulator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RiscV

type RiscV struct {
	// contains filtered or unexported fields
}

The RiscV struct implements the machine interface needed by the EGG emulator.

func (*RiscV) ArchitetureName

func (m *RiscV) ArchitetureName() string

func (*RiscV) Assemble

func (m *RiscV) Assemble(asm string) ([]uint8, []assembler.DebuggerToken, error)

func (*RiscV) GetCurrentInstructionAddress

func (m *RiscV) GetCurrentInstructionAddress() uint64

func (*RiscV) GetMemory

func (m *RiscV) GetMemory(addr uint64) (uint8, error)

func (*RiscV) GetMemoryChunk

func (m *RiscV) GetMemoryChunk(addr uint64, size uint64) ([]uint8, error)

func (*RiscV) GetRegister

func (m *RiscV) GetRegister(reg uint64) (uint64, error)

func (*RiscV) GetRegisterNumber

func (m *RiscV) GetRegisterNumber(r string) (uint64, error)

func (*RiscV) LoadProgram

func (m *RiscV) LoadProgram(program []uint8) error

func (*RiscV) NextInstruction

func (m *RiscV) NextInstruction() (*machine.Call, error)

func (*RiscV) SetMemory

func (m *RiscV) SetMemory(addr uint64, content uint8) error

func (*RiscV) SetMemoryChunk

func (m *RiscV) SetMemoryChunk(addr uint64, content []uint8) error

func (*RiscV) SetRegister

func (m *RiscV) SetRegister(reg uint64, content uint64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL