wavefront

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package wavefront defines concepts related to a wavefront.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inst

type Inst struct {
	*insts.Inst

	ID string
}

Inst in the timing package is a wrapper of the insts.Inst.

func NewInst

func NewInst(raw *insts.Inst) *Inst

NewInst creates a newly created Inst

type Wavefront

type Wavefront struct {
	*kernels.Wavefront
	sync.RWMutex

	WG *WorkGroup

	State WfState

	LastFetchTime  sim.VTimeInSec // The time that the last instruction was fetched
	CompletedLanes int            // The number of lanes that is completed in the SIMD unit

	InstBuffer        []byte
	InstBufferStartPC uint64
	IsFetching        bool
	InstToIssue       *Inst

	SIMDID     int
	SRegOffset int
	VRegOffset int
	LDSOffset  int

	PC   uint64
	EXEC uint64
	VCC  uint64
	M0   uint32
	SCC  uint8

	OutstandingScalarMemAccess int
	OutstandingVectorMemAccess int
	// contains filtered or unexported fields
}

A Wavefront in the timing package contains the information of the progress of a wavefront

func NewWavefront

func NewWavefront(raw *kernels.Wavefront) *Wavefront

NewWavefront creates a new Wavefront of the timing package, wrapping the wavefront from the kernels package.

func (*Wavefront) DynamicInst

func (wf *Wavefront) DynamicInst() *Inst

DynamicInst returns the insts with an ID

func (*Wavefront) Inst

func (wf *Wavefront) Inst() *insts.Inst

Inst return the instruction that is being simulated

func (*Wavefront) ManagedInst

func (wf *Wavefront) ManagedInst() *Inst

ManagedInst returns the wrapped Inst

func (*Wavefront) PID

func (wf *Wavefront) PID() vm.PID

PID returns pid

func (*Wavefront) Scratchpad

func (wf *Wavefront) Scratchpad() emu.Scratchpad

Scratchpad returns the scratchpad of the wavefront

func (*Wavefront) SetDynamicInst

func (wf *Wavefront) SetDynamicInst(i *Inst)

SetDynamicInst sets the dynamic inst to execute

func (*Wavefront) SetPID

func (wf *Wavefront) SetPID(pid vm.PID)

SetPID sets pid

type WfState

type WfState int

WfState marks what state that wavefront it in.

const (
	WfDispatching WfState = iota // Dispatching in progress, not ready to run
	WfReady                      // Allow the scheduler to schedule instruction
	WfRunning                    // Instruction in fight
	WfCompleted                  // Wavefront completed
	WfAtBarrier                  // Wavefront at barrier
)

A list of all possible WfState

type WorkGroup

type WorkGroup struct {
	*kernels.WorkGroup

	Wfs    []*Wavefront
	MapReq *protocol.MapWGReq
	LDS    []byte
}

A WorkGroup is a wrapper for the kernels.WorkGroup

func NewWorkGroup

func NewWorkGroup(raw *kernels.WorkGroup, req *protocol.MapWGReq) *WorkGroup

NewWorkGroup returns a newly constructed WorkGroup

Jump to

Keyboard shortcuts

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