mips

package module
v0.0.0-...-8d1ebaf Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: ISC Imports: 10 Imported by: 0

README

mips pipeline simulator
-----------------------
Implements a subset of the instruction set to show pipelining.

license: ISC

Features:
- Implements three branch prediction policies

Example:
$ go test -short
      I#1   I#2   I#3   I#4   I#5   I#6   
      c#1   IF1   .     .     .     .     .     
      c#2   IF2   IF1   .     .     .     .     
      c#3   IF3   IF2   .     .     .     .     
      c#4   ID    IF3   IF1   .     .     .     
      c#5   EX    ID    IF2   IF1   .     .     
      c#6   MEM1  EX    IF3   IF2   .     .     
      c#7   MEM2  MEM1  ID    IF3   IF1   .     
      c#8   MEM3  MEM2  EX    ID    (fl)  .     
      c#9   WB    MEM3  MEM1  EX          IF1   
      c#10        WB    MEM2  MEM1        IF2   
      c#11              MEM3  MEM2        IF3   
      c#12              WB    MEM3        ID    
      c#13                    WB          EX    
      c#14                                MEM1  
      c#15                                MEM2  
      c#16                                MEM3  
      c#17                                WB    

      PASS
      ok	github.com/tmc/mips0.042s

Documentation

Overview

Package mips is a simple simulator of a subset of the MIPS instruction set to show pipelining

Parses input files for simple mips pipeline simulator

Index

Constants

View Source
const (
	BranchPolicyFlush = iota // no prediction, flush pipeline
	BranchPolicyPredictTaken
	BranchPolicyPredictNotTaken
)
View Source
const (
	None = -1 + iota
	R0
	R1
	R2
	R3
	R4
	R5
	R6
	R7
	R8
	R9
	R10
	R11
	R12
	R13
	R14
	R15
	R16
	R17
	R18
	R19
	R20
	R21
	R22
	R23
	R24
	R25
	R26
	R27
	R28
	R29
	R30
	R31
)
View Source
const DEBUG = 2
View Source
const ERROR = 0
View Source
const WARN = 1

Variables

View Source
var (
	CPUFinished          = errors.New("CPU Finished.")
	MaximumCyclesReached = errors.New("Maximum Cycles Reached.")
)
View Source
var (
	RAWHazard       = errors.New("RAW Hazard")
	Stall           = errors.New("Stall")
	FlushPipeline   = errors.New("Pipeline should flush")
	BranchResolving = errors.New("Branch is resolving")
)
View Source
var (
	InvalidSet        = errors.New("Invalid Register Set")
	RegisterLocked    = errors.New("Register Locked")
	RegisterNotLocked = errors.New("Register Not Locked")
)
View Source
var (
	PipelineStall = errors.New("Pipeline Stalled")
)

Functions

This section is empty.

Types

type ALUInstruction

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

func (*ALUInstruction) AcquireDestintion

func (i *ALUInstruction) AcquireDestintion()

func (*ALUInstruction) Destination

func (i *ALUInstruction) Destination() Operand

func (*ALUInstruction) EX

func (i *ALUInstruction) EX() error

func (*ALUInstruction) Flush

func (i *ALUInstruction) Flush()

func (*ALUInstruction) ID

func (i *ALUInstruction) ID() error

func (*ALUInstruction) IF1

func (i *ALUInstruction) IF1() error

func (*ALUInstruction) IF2

func (i *ALUInstruction) IF2() error

func (*ALUInstruction) IF3

func (i *ALUInstruction) IF3() error

func (*ALUInstruction) Label

func (i *ALUInstruction) Label() Label

func (*ALUInstruction) MEM1

func (i *ALUInstruction) MEM1() error

func (*ALUInstruction) MEM2

func (i *ALUInstruction) MEM2() error

func (*ALUInstruction) MEM3

func (i *ALUInstruction) MEM3() error

func (ALUInstruction) OpCode

func (i ALUInstruction) OpCode() string

func (*ALUInstruction) OperandA

func (i *ALUInstruction) OperandA() Operand

func (*ALUInstruction) OperandB

func (i *ALUInstruction) OperandB() Operand

func (*ALUInstruction) ReleaseDestintion

func (i *ALUInstruction) ReleaseDestintion()

func (*ALUInstruction) SetCPU

func (i *ALUInstruction) SetCPU(cpu *CPU)

func (*ALUInstruction) SetDestination

func (i *ALUInstruction) SetDestination(d Operand)

func (*ALUInstruction) SetLabel

func (i *ALUInstruction) SetLabel(label Label)

func (*ALUInstruction) SetOpCode

func (i *ALUInstruction) SetOpCode(opcode string)

func (*ALUInstruction) SetOperandA

func (i *ALUInstruction) SetOperandA(o Operand)

func (*ALUInstruction) SetOperandB

func (i *ALUInstruction) SetOperandB(o Operand)

func (*ALUInstruction) SetText

func (i *ALUInstruction) SetText(text string)

func (ALUInstruction) String

func (i ALUInstruction) String() string

func (*ALUInstruction) WB

func (i *ALUInstruction) WB() error

type BNEZ

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

func (*BNEZ) AcquireDestintion

func (i *BNEZ) AcquireDestintion()

func (*BNEZ) Destination

func (i *BNEZ) Destination() Operand

func (*BNEZ) EX

func (i *BNEZ) EX() error

func (*BNEZ) Flush

func (i *BNEZ) Flush()

func (*BNEZ) ID

func (i *BNEZ) ID() (err error)

func (*BNEZ) IF1

func (i *BNEZ) IF1() (err error)

func (*BNEZ) IF2

func (i *BNEZ) IF2() (err error)

func (*BNEZ) IF3

func (i *BNEZ) IF3() (err error)

func (*BNEZ) Label

func (i *BNEZ) Label() Label

func (*BNEZ) MEM1

func (i *BNEZ) MEM1() error

func (*BNEZ) MEM2

func (i *BNEZ) MEM2() error

func (*BNEZ) MEM3

func (i *BNEZ) MEM3() error

func (BNEZ) OpCode

func (i BNEZ) OpCode() string

func (*BNEZ) OperandA

func (i *BNEZ) OperandA() Operand

func (*BNEZ) OperandB

func (i *BNEZ) OperandB() Operand

func (*BNEZ) ReleaseDestintion

func (i *BNEZ) ReleaseDestintion()

func (*BNEZ) SetCPU

func (i *BNEZ) SetCPU(cpu *CPU)

func (*BNEZ) SetDestination

func (i *BNEZ) SetDestination(d Operand)

func (*BNEZ) SetLabel

func (i *BNEZ) SetLabel(label Label)

func (*BNEZ) SetOpCode

func (i *BNEZ) SetOpCode(opcode string)

func (*BNEZ) SetOperandA

func (i *BNEZ) SetOperandA(o Operand)

func (*BNEZ) SetOperandB

func (i *BNEZ) SetOperandB(o Operand)

func (*BNEZ) SetText

func (i *BNEZ) SetText(text string)

func (BNEZ) String

func (i BNEZ) String() string

func (*BNEZ) WB

func (i *BNEZ) WB() error

type BranchPolicy

type BranchPolicy int

Branch prediction modes

type CPU

type CPU struct {
	Registers          *Registers
	BranchMode         BranchPolicy
	ForwardingEnabled  bool
	Cycle              int
	Ram                Memory
	InstructionCache   InstructionCache
	InstructionPointer int
	Instructions       []*ExecutedInstruction
	Labels             map[Label]int // label to Code index mapping
	Pipeline           Pipeline
}

func NewCPU

func NewCPU() *CPU

func ParseCPU

func ParseCPU(input io.Reader) (*CPU, error)

func ParseCPUString

func ParseCPUString(input string) (*CPU, error)

func (*CPU) InstructionCacheEmpty

func (cpu *CPU) InstructionCacheEmpty() bool

func (*CPU) RenderState

func (cpu *CPU) RenderState() string

func (*CPU) RenderTiming

func (cpu *CPU) RenderTiming() string

func (*CPU) RenderTimingForCycle

func (cpu *CPU) RenderTimingForCycle(cycle int) string

func (*CPU) Run

func (cpu *CPU) Run(maximumCycles int) (err error)

func (*CPU) Step

func (cpu *CPU) Step() error

func (*CPU) String

func (cpu *CPU) String() string

type DADD

type DADD struct {
	ALUInstruction
}

func (*DADD) AcquireDestintion

func (i *DADD) AcquireDestintion()

func (*DADD) Destination

func (i *DADD) Destination() Operand

func (*DADD) EX

func (i *DADD) EX() error

func (*DADD) Flush

func (i *DADD) Flush()

func (*DADD) ID

func (i *DADD) ID() (err error)

func (*DADD) IF1

func (i *DADD) IF1() error

func (*DADD) IF2

func (i *DADD) IF2() error

func (*DADD) IF3

func (i *DADD) IF3() error

func (*DADD) Label

func (i *DADD) Label() Label

func (*DADD) MEM1

func (i *DADD) MEM1() error

func (*DADD) MEM2

func (i *DADD) MEM2() error

func (*DADD) MEM3

func (i *DADD) MEM3() error

func (DADD) OpCode

func (i DADD) OpCode() string

func (*DADD) OperandA

func (i *DADD) OperandA() Operand

func (*DADD) OperandB

func (i *DADD) OperandB() Operand

func (*DADD) ReleaseDestintion

func (i *DADD) ReleaseDestintion()

func (*DADD) SetCPU

func (i *DADD) SetCPU(cpu *CPU)

func (*DADD) SetDestination

func (i *DADD) SetDestination(d Operand)

func (*DADD) SetLabel

func (i *DADD) SetLabel(label Label)

func (*DADD) SetOpCode

func (i *DADD) SetOpCode(opcode string)

func (*DADD) SetOperandA

func (i *DADD) SetOperandA(o Operand)

func (*DADD) SetOperandB

func (i *DADD) SetOperandB(o Operand)

func (*DADD) SetText

func (i *DADD) SetText(text string)

func (DADD) String

func (i DADD) String() string

type DADDI

type DADDI struct {
	ALUInstruction
}

func (*DADDI) AcquireDestintion

func (i *DADDI) AcquireDestintion()

func (*DADDI) Destination

func (i *DADDI) Destination() Operand

func (*DADDI) EX

func (i *DADDI) EX() error

func (*DADDI) Flush

func (i *DADDI) Flush()

func (*DADDI) ID

func (i *DADDI) ID() (err error)

func (*DADDI) IF1

func (i *DADDI) IF1() error

func (*DADDI) IF2

func (i *DADDI) IF2() error

func (*DADDI) IF3

func (i *DADDI) IF3() error

func (*DADDI) Label

func (i *DADDI) Label() Label

func (*DADDI) MEM1

func (i *DADDI) MEM1() error

func (*DADDI) MEM2

func (i *DADDI) MEM2() error

func (*DADDI) MEM3

func (i *DADDI) MEM3() error

func (DADDI) OpCode

func (i DADDI) OpCode() string

func (*DADDI) OperandA

func (i *DADDI) OperandA() Operand

func (*DADDI) OperandB

func (i *DADDI) OperandB() Operand

func (*DADDI) ReleaseDestintion

func (i *DADDI) ReleaseDestintion()

func (*DADDI) SetCPU

func (i *DADDI) SetCPU(cpu *CPU)

func (*DADDI) SetDestination

func (i *DADDI) SetDestination(d Operand)

func (*DADDI) SetLabel

func (i *DADDI) SetLabel(label Label)

func (*DADDI) SetOpCode

func (i *DADDI) SetOpCode(opcode string)

func (*DADDI) SetOperandA

func (i *DADDI) SetOperandA(o Operand)

func (*DADDI) SetOperandB

func (i *DADDI) SetOperandB(o Operand)

func (*DADDI) SetText

func (i *DADDI) SetText(text string)

func (DADDI) String

func (i DADDI) String() string

type EX

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

func (*EX) Addr

func (s *EX) Addr() string

func (*EX) CPU

func (s *EX) CPU() *CPU

func (*EX) GetInstruction

func (s *EX) GetInstruction() *ExecutedInstruction

func (*EX) Initialize

func (s *EX) Initialize(cpu *CPU)

func (*EX) Next

func (s *EX) Next() PipelineStage

func (*EX) Prev

func (s *EX) Prev() PipelineStage

func (*EX) SetInstruction

func (s *EX) SetInstruction(instruction *ExecutedInstruction)

func (*EX) SetNext

func (s *EX) SetNext(p PipelineStage)

func (*EX) SetPrev

func (s *EX) SetPrev(p PipelineStage)

func (*EX) Stall

func (s *EX) Stall()

func (*EX) Stalled

func (s *EX) Stalled() bool

func (*EX) Step

func (s *EX) Step() error

func (EX) String

func (s EX) String() string

func (*EX) Unstall

func (s *EX) Unstall()

type ExecutedInstruction

type ExecutedInstruction struct {
	Instruction
	Stage       PipelineStage
	Stages      map[string]int // map of Stages to cycle at which that stage was entered
	Cycles      map[int]string // map of cycles to Stages
	CycleStart  int
	CycleFinish int
	CycleFlush  int
}

type ID

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

func (*ID) Addr

func (s *ID) Addr() string

func (*ID) CPU

func (s *ID) CPU() *CPU

func (*ID) GetInstruction

func (s *ID) GetInstruction() *ExecutedInstruction

func (*ID) Initialize

func (s *ID) Initialize(cpu *CPU)

func (*ID) Next

func (s *ID) Next() PipelineStage

func (*ID) Prev

func (s *ID) Prev() PipelineStage

func (*ID) SetInstruction

func (s *ID) SetInstruction(instruction *ExecutedInstruction)

func (*ID) SetNext

func (s *ID) SetNext(p PipelineStage)

func (*ID) SetPrev

func (s *ID) SetPrev(p PipelineStage)

func (*ID) Stall

func (s *ID) Stall()

func (*ID) Stalled

func (s *ID) Stalled() bool

func (*ID) Step

func (s *ID) Step() error

func (ID) String

func (s ID) String() string

func (*ID) Unstall

func (s *ID) Unstall()

type IF1

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

func (*IF1) Addr

func (s *IF1) Addr() string

func (*IF1) CPU

func (s *IF1) CPU() *CPU

func (*IF1) GetInstruction

func (s *IF1) GetInstruction() *ExecutedInstruction

func (*IF1) Initialize

func (s *IF1) Initialize(cpu *CPU)

func (*IF1) Next

func (s *IF1) Next() PipelineStage

func (*IF1) Prev

func (s *IF1) Prev() PipelineStage

func (*IF1) SetInstruction

func (s *IF1) SetInstruction(instruction *ExecutedInstruction)

func (*IF1) SetNext

func (s *IF1) SetNext(p PipelineStage)

func (*IF1) SetPrev

func (s *IF1) SetPrev(p PipelineStage)

func (*IF1) Stall

func (s *IF1) Stall()

func (*IF1) Stalled

func (s *IF1) Stalled() bool

func (*IF1) Step

func (s *IF1) Step() error

func (IF1) String

func (s IF1) String() string

func (*IF1) Unstall

func (s *IF1) Unstall()

type IF2

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

func (*IF2) Addr

func (s *IF2) Addr() string

func (*IF2) CPU

func (s *IF2) CPU() *CPU

func (*IF2) GetInstruction

func (s *IF2) GetInstruction() *ExecutedInstruction

func (*IF2) Initialize

func (s *IF2) Initialize(cpu *CPU)

func (*IF2) Next

func (s *IF2) Next() PipelineStage

func (*IF2) Prev

func (s *IF2) Prev() PipelineStage

func (*IF2) SetInstruction

func (s *IF2) SetInstruction(instruction *ExecutedInstruction)

func (*IF2) SetNext

func (s *IF2) SetNext(p PipelineStage)

func (*IF2) SetPrev

func (s *IF2) SetPrev(p PipelineStage)

func (*IF2) Stall

func (s *IF2) Stall()

func (*IF2) Stalled

func (s *IF2) Stalled() bool

func (*IF2) Step

func (s *IF2) Step() error

func (IF2) String

func (s IF2) String() string

func (*IF2) Unstall

func (s *IF2) Unstall()

type IF3

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

func (*IF3) Addr

func (s *IF3) Addr() string

func (*IF3) CPU

func (s *IF3) CPU() *CPU

func (*IF3) GetInstruction

func (s *IF3) GetInstruction() *ExecutedInstruction

func (*IF3) Initialize

func (s *IF3) Initialize(cpu *CPU)

func (*IF3) Next

func (s *IF3) Next() PipelineStage

func (*IF3) Prev

func (s *IF3) Prev() PipelineStage

func (*IF3) SetInstruction

func (s *IF3) SetInstruction(instruction *ExecutedInstruction)

func (*IF3) SetNext

func (s *IF3) SetNext(p PipelineStage)

func (*IF3) SetPrev

func (s *IF3) SetPrev(p PipelineStage)

func (*IF3) Stall

func (s *IF3) Stall()

func (*IF3) Stalled

func (s *IF3) Stalled() bool

func (*IF3) Step

func (s *IF3) Step() error

func (IF3) String

func (s IF3) String() string

func (*IF3) Unstall

func (s *IF3) Unstall()

type Instruction

type Instruction interface {
	SetCPU(cpu *CPU)
	OpCode() string
	SetOpCode(opcode string)
	String() string
	Label() Label
	SetLabel(label Label)
	SetText(text string)
	Destination() Operand
	SetDestination(o Operand)
	OperandA() Operand
	SetOperandA(o Operand)
	OperandB() Operand
	SetOperandB(o Operand)
	Flush()

	IF1() error
	IF2() error
	IF3() error
	ID() error
	EX() error
	MEM1() error
	MEM2() error
	MEM3() error
	WB() error
}

func NewInstruction

func NewInstruction(opcode string) (i Instruction, err error)

func ParseInstruction

func ParseInstruction(input io.Reader) (Instruction, error)

type InstructionCache

type InstructionCache []Instruction

func (InstructionCache) Equals

func (lhs InstructionCache) Equals(rhs InstructionCache) bool

type LD

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

func (*LD) ID

func (i *LD) ID() error

func (*LD) MEM3

func (i *LD) MEM3() error

func (*LD) WB

func (i *LD) WB() error

type Label

type Label string

type MEM1

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

func (*MEM1) Addr

func (s *MEM1) Addr() string

func (*MEM1) CPU

func (s *MEM1) CPU() *CPU

func (*MEM1) GetInstruction

func (s *MEM1) GetInstruction() *ExecutedInstruction

func (*MEM1) Initialize

func (s *MEM1) Initialize(cpu *CPU)

func (*MEM1) Next

func (s *MEM1) Next() PipelineStage

func (*MEM1) Prev

func (s *MEM1) Prev() PipelineStage

func (*MEM1) SetInstruction

func (s *MEM1) SetInstruction(instruction *ExecutedInstruction)

func (*MEM1) SetNext

func (s *MEM1) SetNext(p PipelineStage)

func (*MEM1) SetPrev

func (s *MEM1) SetPrev(p PipelineStage)

func (*MEM1) Stall

func (s *MEM1) Stall()

func (*MEM1) Stalled

func (s *MEM1) Stalled() bool

func (*MEM1) Step

func (s *MEM1) Step() error

func (MEM1) String

func (s MEM1) String() string

func (*MEM1) Unstall

func (s *MEM1) Unstall()

type MEM2

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

func (*MEM2) Addr

func (s *MEM2) Addr() string

func (*MEM2) CPU

func (s *MEM2) CPU() *CPU

func (*MEM2) GetInstruction

func (s *MEM2) GetInstruction() *ExecutedInstruction

func (*MEM2) Initialize

func (s *MEM2) Initialize(cpu *CPU)

func (*MEM2) Next

func (s *MEM2) Next() PipelineStage

func (*MEM2) Prev

func (s *MEM2) Prev() PipelineStage

func (*MEM2) SetInstruction

func (s *MEM2) SetInstruction(instruction *ExecutedInstruction)

func (*MEM2) SetNext

func (s *MEM2) SetNext(p PipelineStage)

func (*MEM2) SetPrev

func (s *MEM2) SetPrev(p PipelineStage)

func (*MEM2) Stall

func (s *MEM2) Stall()

func (*MEM2) Stalled

func (s *MEM2) Stalled() bool

func (*MEM2) Step

func (s *MEM2) Step() error

func (MEM2) String

func (s MEM2) String() string

func (*MEM2) Unstall

func (s *MEM2) Unstall()

type MEM3

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

func (*MEM3) Addr

func (s *MEM3) Addr() string

func (*MEM3) CPU

func (s *MEM3) CPU() *CPU

func (*MEM3) GetInstruction

func (s *MEM3) GetInstruction() *ExecutedInstruction

func (*MEM3) Initialize

func (s *MEM3) Initialize(cpu *CPU)

func (*MEM3) Next

func (s *MEM3) Next() PipelineStage

func (*MEM3) Prev

func (s *MEM3) Prev() PipelineStage

func (*MEM3) SetInstruction

func (s *MEM3) SetInstruction(instruction *ExecutedInstruction)

func (*MEM3) SetNext

func (s *MEM3) SetNext(p PipelineStage)

func (*MEM3) SetPrev

func (s *MEM3) SetPrev(p PipelineStage)

func (*MEM3) Stall

func (s *MEM3) Stall()

func (*MEM3) Stalled

func (s *MEM3) Stalled() bool

func (*MEM3) Step

func (s *MEM3) Step() error

func (MEM3) String

func (s MEM3) String() string

func (*MEM3) Unstall

func (s *MEM3) Unstall()

type Memory

type Memory [memorySize]Word

func (Memory) String

func (r Memory) String() string

type Operand

type Operand struct {
	Register Register
	Offset   int
	Type     OperandType
	// contains filtered or unexported fields
}

func ParseOperand

func ParseOperand(s string) (o Operand, err error)

func (Operand) String

func (op Operand) String() string

func (Operand) Value

func (op Operand) Value(cpu *CPU) (value Word, err error)

type OperandType

type OperandType int

type Pipeline

type Pipeline []PipelineStage

func NewPipeline

func NewPipeline(cpu *CPU, stages ...PipelineStage) (Pipeline, error)

func (Pipeline) ActiveInstructions

func (p Pipeline) ActiveInstructions() []*ExecutedInstruction

func (Pipeline) Empty

func (p Pipeline) Empty() bool

func (Pipeline) Execute

func (p Pipeline) Execute() error

Execute a cycle in the pipeline

func (Pipeline) FlushBefore

func (p Pipeline) FlushBefore(stage PipelineStage)

func (Pipeline) GetNextStage

func (p Pipeline) GetNextStage(s PipelineStage) PipelineStage

func (Pipeline) GetPreviousStage

func (p Pipeline) GetPreviousStage(s PipelineStage) PipelineStage

func (Pipeline) RecordTiming

func (p Pipeline) RecordTiming(stage PipelineStage)

func (Pipeline) Reverse

func (p Pipeline) Reverse() []PipelineStage

func (Pipeline) StageNames

func (p Pipeline) StageNames() (result []string)

func (Pipeline) StallBefore

func (p Pipeline) StallBefore(stage PipelineStage)

func (Pipeline) TransferInstruction

func (p Pipeline) TransferInstruction(fromStage PipelineStage) error

func (Pipeline) TransferInstructions

func (p Pipeline) TransferInstructions() error

type PipelineStage

type PipelineStage interface {
	Initialize(cpu *CPU)
	CPU() *CPU
	String() string
	Step() error
	Stall()
	Unstall()
	Stalled() bool
	SetInstruction(instruction *ExecutedInstruction)
	GetInstruction() *ExecutedInstruction
	Next() PipelineStage
	Prev() PipelineStage
	SetNext(PipelineStage)
	SetPrev(PipelineStage)
}

type Register

type Register int

func (Register) String

func (r Register) String() string

type Registers

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

func NewRegisters

func NewRegisters() *Registers

func (*Registers) Acquire

func (r *Registers) Acquire(register Register)

func (*Registers) Get

func (r *Registers) Get(register Register) Word

func (*Registers) Locked

func (r *Registers) Locked(register Register) bool

func (*Registers) Release

func (r *Registers) Release(register Register)

func (*Registers) Set

func (r *Registers) Set(register Register, value Word) error

func (Registers) String

func (r Registers) String() string

type SD

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

func (*SD) ID

func (i *SD) ID() error

func (*SD) WB

func (i *SD) WB() error

type WB

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

func (*WB) Addr

func (s *WB) Addr() string

func (*WB) CPU

func (s *WB) CPU() *CPU

func (*WB) GetInstruction

func (s *WB) GetInstruction() *ExecutedInstruction

func (*WB) Initialize

func (s *WB) Initialize(cpu *CPU)

func (*WB) Next

func (s *WB) Next() PipelineStage

func (*WB) Prev

func (s *WB) Prev() PipelineStage

func (*WB) SetInstruction

func (s *WB) SetInstruction(instruction *ExecutedInstruction)

func (*WB) SetNext

func (s *WB) SetNext(p PipelineStage)

func (*WB) SetPrev

func (s *WB) SetPrev(p PipelineStage)

func (*WB) Stall

func (s *WB) Stall()

func (*WB) Stalled

func (s *WB) Stalled() bool

func (*WB) Step

func (s *WB) Step() error

func (WB) String

func (s WB) String() string

func (*WB) Unstall

func (s *WB) Unstall()

type Word

type Word uint64

func (Word) String

func (w Word) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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