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
- Variables
- type ALUInstruction
- func (i *ALUInstruction) AcquireDestintion()
- func (i *ALUInstruction) Destination() Operand
- func (i *ALUInstruction) EX() error
- func (i *ALUInstruction) Flush()
- func (i *ALUInstruction) ID() error
- func (i *ALUInstruction) IF1() error
- func (i *ALUInstruction) IF2() error
- func (i *ALUInstruction) IF3() error
- func (i *ALUInstruction) Label() Label
- func (i *ALUInstruction) MEM1() error
- func (i *ALUInstruction) MEM2() error
- func (i *ALUInstruction) MEM3() error
- func (i ALUInstruction) OpCode() string
- func (i *ALUInstruction) OperandA() Operand
- func (i *ALUInstruction) OperandB() Operand
- func (i *ALUInstruction) ReleaseDestintion()
- func (i *ALUInstruction) SetCPU(cpu *CPU)
- func (i *ALUInstruction) SetDestination(d Operand)
- func (i *ALUInstruction) SetLabel(label Label)
- func (i *ALUInstruction) SetOpCode(opcode string)
- func (i *ALUInstruction) SetOperandA(o Operand)
- func (i *ALUInstruction) SetOperandB(o Operand)
- func (i *ALUInstruction) SetText(text string)
- func (i ALUInstruction) String() string
- func (i *ALUInstruction) WB() error
- type BNEZ
- func (i *BNEZ) AcquireDestintion()
- func (i *BNEZ) Destination() Operand
- func (i *BNEZ) EX() error
- func (i *BNEZ) Flush()
- func (i *BNEZ) ID() (err error)
- func (i *BNEZ) IF1() (err error)
- func (i *BNEZ) IF2() (err error)
- func (i *BNEZ) IF3() (err error)
- func (i *BNEZ) Label() Label
- func (i *BNEZ) MEM1() error
- func (i *BNEZ) MEM2() error
- func (i *BNEZ) MEM3() error
- func (i BNEZ) OpCode() string
- func (i *BNEZ) OperandA() Operand
- func (i *BNEZ) OperandB() Operand
- func (i *BNEZ) ReleaseDestintion()
- func (i *BNEZ) SetCPU(cpu *CPU)
- func (i *BNEZ) SetDestination(d Operand)
- func (i *BNEZ) SetLabel(label Label)
- func (i *BNEZ) SetOpCode(opcode string)
- func (i *BNEZ) SetOperandA(o Operand)
- func (i *BNEZ) SetOperandB(o Operand)
- func (i *BNEZ) SetText(text string)
- func (i BNEZ) String() string
- func (i *BNEZ) WB() error
- type BranchPolicy
- type CPU
- type DADD
- func (i *DADD) AcquireDestintion()
- func (i *DADD) Destination() Operand
- func (i *DADD) EX() error
- func (i *DADD) Flush()
- func (i *DADD) ID() (err error)
- func (i *DADD) IF1() error
- func (i *DADD) IF2() error
- func (i *DADD) IF3() error
- func (i *DADD) Label() Label
- func (i *DADD) MEM1() error
- func (i *DADD) MEM2() error
- func (i *DADD) MEM3() error
- func (i DADD) OpCode() string
- func (i *DADD) OperandA() Operand
- func (i *DADD) OperandB() Operand
- func (i *DADD) ReleaseDestintion()
- func (i *DADD) SetCPU(cpu *CPU)
- func (i *DADD) SetDestination(d Operand)
- func (i *DADD) SetLabel(label Label)
- func (i *DADD) SetOpCode(opcode string)
- func (i *DADD) SetOperandA(o Operand)
- func (i *DADD) SetOperandB(o Operand)
- func (i *DADD) SetText(text string)
- func (i DADD) String() string
- type DADDI
- func (i *DADDI) AcquireDestintion()
- func (i *DADDI) Destination() Operand
- func (i *DADDI) EX() error
- func (i *DADDI) Flush()
- func (i *DADDI) ID() (err error)
- func (i *DADDI) IF1() error
- func (i *DADDI) IF2() error
- func (i *DADDI) IF3() error
- func (i *DADDI) Label() Label
- func (i *DADDI) MEM1() error
- func (i *DADDI) MEM2() error
- func (i *DADDI) MEM3() error
- func (i DADDI) OpCode() string
- func (i *DADDI) OperandA() Operand
- func (i *DADDI) OperandB() Operand
- func (i *DADDI) ReleaseDestintion()
- func (i *DADDI) SetCPU(cpu *CPU)
- func (i *DADDI) SetDestination(d Operand)
- func (i *DADDI) SetLabel(label Label)
- func (i *DADDI) SetOpCode(opcode string)
- func (i *DADDI) SetOperandA(o Operand)
- func (i *DADDI) SetOperandB(o Operand)
- func (i *DADDI) SetText(text string)
- func (i DADDI) String() string
- type EX
- func (s *EX) Addr() string
- func (s *EX) CPU() *CPU
- func (s *EX) GetInstruction() *ExecutedInstruction
- func (s *EX) Initialize(cpu *CPU)
- func (s *EX) Next() PipelineStage
- func (s *EX) Prev() PipelineStage
- func (s *EX) SetInstruction(instruction *ExecutedInstruction)
- func (s *EX) SetNext(p PipelineStage)
- func (s *EX) SetPrev(p PipelineStage)
- func (s *EX) Stall()
- func (s *EX) Stalled() bool
- func (s *EX) Step() error
- func (s EX) String() string
- func (s *EX) Unstall()
- type ExecutedInstruction
- type ID
- func (s *ID) Addr() string
- func (s *ID) CPU() *CPU
- func (s *ID) GetInstruction() *ExecutedInstruction
- func (s *ID) Initialize(cpu *CPU)
- func (s *ID) Next() PipelineStage
- func (s *ID) Prev() PipelineStage
- func (s *ID) SetInstruction(instruction *ExecutedInstruction)
- func (s *ID) SetNext(p PipelineStage)
- func (s *ID) SetPrev(p PipelineStage)
- func (s *ID) Stall()
- func (s *ID) Stalled() bool
- func (s *ID) Step() error
- func (s ID) String() string
- func (s *ID) Unstall()
- type IF1
- func (s *IF1) Addr() string
- func (s *IF1) CPU() *CPU
- func (s *IF1) GetInstruction() *ExecutedInstruction
- func (s *IF1) Initialize(cpu *CPU)
- func (s *IF1) Next() PipelineStage
- func (s *IF1) Prev() PipelineStage
- func (s *IF1) SetInstruction(instruction *ExecutedInstruction)
- func (s *IF1) SetNext(p PipelineStage)
- func (s *IF1) SetPrev(p PipelineStage)
- func (s *IF1) Stall()
- func (s *IF1) Stalled() bool
- func (s *IF1) Step() error
- func (s IF1) String() string
- func (s *IF1) Unstall()
- type IF2
- func (s *IF2) Addr() string
- func (s *IF2) CPU() *CPU
- func (s *IF2) GetInstruction() *ExecutedInstruction
- func (s *IF2) Initialize(cpu *CPU)
- func (s *IF2) Next() PipelineStage
- func (s *IF2) Prev() PipelineStage
- func (s *IF2) SetInstruction(instruction *ExecutedInstruction)
- func (s *IF2) SetNext(p PipelineStage)
- func (s *IF2) SetPrev(p PipelineStage)
- func (s *IF2) Stall()
- func (s *IF2) Stalled() bool
- func (s *IF2) Step() error
- func (s IF2) String() string
- func (s *IF2) Unstall()
- type IF3
- func (s *IF3) Addr() string
- func (s *IF3) CPU() *CPU
- func (s *IF3) GetInstruction() *ExecutedInstruction
- func (s *IF3) Initialize(cpu *CPU)
- func (s *IF3) Next() PipelineStage
- func (s *IF3) Prev() PipelineStage
- func (s *IF3) SetInstruction(instruction *ExecutedInstruction)
- func (s *IF3) SetNext(p PipelineStage)
- func (s *IF3) SetPrev(p PipelineStage)
- func (s *IF3) Stall()
- func (s *IF3) Stalled() bool
- func (s *IF3) Step() error
- func (s IF3) String() string
- func (s *IF3) Unstall()
- type Instruction
- type InstructionCache
- type LD
- type Label
- type MEM1
- func (s *MEM1) Addr() string
- func (s *MEM1) CPU() *CPU
- func (s *MEM1) GetInstruction() *ExecutedInstruction
- func (s *MEM1) Initialize(cpu *CPU)
- func (s *MEM1) Next() PipelineStage
- func (s *MEM1) Prev() PipelineStage
- func (s *MEM1) SetInstruction(instruction *ExecutedInstruction)
- func (s *MEM1) SetNext(p PipelineStage)
- func (s *MEM1) SetPrev(p PipelineStage)
- func (s *MEM1) Stall()
- func (s *MEM1) Stalled() bool
- func (s *MEM1) Step() error
- func (s MEM1) String() string
- func (s *MEM1) Unstall()
- type MEM2
- func (s *MEM2) Addr() string
- func (s *MEM2) CPU() *CPU
- func (s *MEM2) GetInstruction() *ExecutedInstruction
- func (s *MEM2) Initialize(cpu *CPU)
- func (s *MEM2) Next() PipelineStage
- func (s *MEM2) Prev() PipelineStage
- func (s *MEM2) SetInstruction(instruction *ExecutedInstruction)
- func (s *MEM2) SetNext(p PipelineStage)
- func (s *MEM2) SetPrev(p PipelineStage)
- func (s *MEM2) Stall()
- func (s *MEM2) Stalled() bool
- func (s *MEM2) Step() error
- func (s MEM2) String() string
- func (s *MEM2) Unstall()
- type MEM3
- func (s *MEM3) Addr() string
- func (s *MEM3) CPU() *CPU
- func (s *MEM3) GetInstruction() *ExecutedInstruction
- func (s *MEM3) Initialize(cpu *CPU)
- func (s *MEM3) Next() PipelineStage
- func (s *MEM3) Prev() PipelineStage
- func (s *MEM3) SetInstruction(instruction *ExecutedInstruction)
- func (s *MEM3) SetNext(p PipelineStage)
- func (s *MEM3) SetPrev(p PipelineStage)
- func (s *MEM3) Stall()
- func (s *MEM3) Stalled() bool
- func (s *MEM3) Step() error
- func (s MEM3) String() string
- func (s *MEM3) Unstall()
- type Memory
- type Operand
- type OperandType
- type Pipeline
- func (p Pipeline) ActiveInstructions() []*ExecutedInstruction
- func (p Pipeline) Empty() bool
- func (p Pipeline) Execute() error
- func (p Pipeline) FlushBefore(stage PipelineStage)
- func (p Pipeline) GetNextStage(s PipelineStage) PipelineStage
- func (p Pipeline) GetPreviousStage(s PipelineStage) PipelineStage
- func (p Pipeline) RecordTiming(stage PipelineStage)
- func (p Pipeline) Reverse() []PipelineStage
- func (p Pipeline) StageNames() (result []string)
- func (p Pipeline) StallBefore(stage PipelineStage)
- func (p Pipeline) TransferInstruction(fromStage PipelineStage) error
- func (p Pipeline) TransferInstructions() error
- type PipelineStage
- type Register
- type Registers
- type SD
- type WB
- func (s *WB) Addr() string
- func (s *WB) CPU() *CPU
- func (s *WB) GetInstruction() *ExecutedInstruction
- func (s *WB) Initialize(cpu *CPU)
- func (s *WB) Next() PipelineStage
- func (s *WB) Prev() PipelineStage
- func (s *WB) SetInstruction(instruction *ExecutedInstruction)
- func (s *WB) SetNext(p PipelineStage)
- func (s *WB) SetPrev(p PipelineStage)
- func (s *WB) Stall()
- func (s *WB) Stalled() bool
- func (s *WB) Step() error
- func (s WB) String() string
- func (s *WB) Unstall()
- type Word
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) ReleaseDestintion ¶
func (i *ALUInstruction) ReleaseDestintion()
func (*ALUInstruction) SetDestination ¶
func (i *ALUInstruction) SetDestination(d Operand)
func (*ALUInstruction) SetOperandA ¶
func (i *ALUInstruction) SetOperandA(o Operand)
func (*ALUInstruction) SetOperandB ¶
func (i *ALUInstruction) SetOperandB(o Operand)
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) ReleaseDestintion ¶
func (i *BNEZ) ReleaseDestintion()
func (*BNEZ) SetDestination ¶
func (i *BNEZ) SetDestination(d Operand)
func (*BNEZ) SetOperandA ¶
func (i *BNEZ) SetOperandA(o Operand)
func (*BNEZ) SetOperandB ¶
func (i *BNEZ) SetOperandB(o Operand)
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 ParseCPUString ¶
func (*CPU) InstructionCacheEmpty ¶
func (*CPU) RenderState ¶
func (*CPU) RenderTiming ¶
func (*CPU) RenderTimingForCycle ¶
type DADD ¶
type DADD struct {
ALUInstruction
}
func (*DADD) AcquireDestintion ¶
func (i *DADD) AcquireDestintion()
func (*DADD) Destination ¶
func (i *DADD) Destination() Operand
func (*DADD) ReleaseDestintion ¶
func (i *DADD) ReleaseDestintion()
func (*DADD) SetDestination ¶
func (i *DADD) SetDestination(d Operand)
func (*DADD) SetOperandA ¶
func (i *DADD) SetOperandA(o Operand)
func (*DADD) SetOperandB ¶
func (i *DADD) SetOperandB(o Operand)
type DADDI ¶
type DADDI struct {
ALUInstruction
}
func (*DADDI) AcquireDestintion ¶
func (i *DADDI) AcquireDestintion()
func (*DADDI) Destination ¶
func (i *DADDI) Destination() Operand
func (*DADDI) ReleaseDestintion ¶
func (i *DADDI) ReleaseDestintion()
func (*DADDI) SetDestination ¶
func (i *DADDI) SetDestination(d Operand)
func (*DADDI) SetOperandA ¶
func (i *DADDI) SetOperandA(o Operand)
func (*DADDI) SetOperandB ¶
func (i *DADDI) SetOperandB(o Operand)
type EX ¶
type EX struct {
// contains filtered or unexported fields
}
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)
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) 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)
type IF1 ¶
type IF1 struct {
// contains filtered or unexported fields
}
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)
type IF2 ¶
type IF2 struct {
// contains filtered or unexported fields
}
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)
type IF3 ¶
type IF3 struct {
// contains filtered or unexported fields
}
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)
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 MEM1 ¶
type MEM1 struct {
// contains filtered or unexported fields
}
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)
type MEM2 ¶
type MEM2 struct {
// contains filtered or unexported fields
}
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)
type MEM3 ¶
type MEM3 struct {
// contains filtered or unexported fields
}
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)
type Operand ¶
type Operand struct {
Register Register
Offset int
Type OperandType
// contains filtered or unexported fields
}
func ParseOperand ¶
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) 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 (Pipeline) StallBefore ¶
func (p Pipeline) StallBefore(stage PipelineStage)
func (Pipeline) TransferInstruction ¶
func (p Pipeline) TransferInstruction(fromStage PipelineStage) error
func (Pipeline) TransferInstructions ¶
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 Registers ¶
type Registers struct {
// contains filtered or unexported fields
}
func NewRegisters ¶
func NewRegisters() *Registers
type WB ¶
type WB struct {
// contains filtered or unexported fields
}
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)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.