cp

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: 17 Imported by: 4

Documentation

Overview

Package cp defines the Command Processor component of a GCN3 GPU

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder can build Command Processors

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a new builder with default configuration values.

func (Builder) Build

func (b Builder) Build(name string) *CommandProcessor

Build builds a new Command Processor

func (Builder) WithEngine

func (b Builder) WithEngine(engine sim.Engine) Builder

WithEngine sets the even-driven simulation engine to use.

func (Builder) WithFreq

func (b Builder) WithFreq(freq sim.Freq) Builder

WithFreq sets the frequency that the Command Processor works at.

func (Builder) WithMonitor

func (b Builder) WithMonitor(monitor *monitoring.Monitor) Builder

WithMonitor sets the monitor used to show progress bars.

func (Builder) WithPerfAnalyzer

func (b Builder) WithPerfAnalyzer(
	analyzer *analysis.PerfAnalyzer,
) Builder

WithPerfAnalyzer sets the buffer analyzer used to analyze the command processor's buffers.

func (Builder) WithVisTracer

func (b Builder) WithVisTracer(tracer tracing.Tracer) Builder

WithVisTracer enables tracing for visualization on the command processor and the dispatchers.

type CUInterfaceForCP

type CUInterfaceForCP interface {
	resource.DispatchableCU

	// ControlPort returns a port on the CU that the CP can send controlling
	// messages to.
	ControlPort() sim.Port
}

CUInterfaceForCP defines the interface that a CP requires from CU.

type CommandProcessor

type CommandProcessor struct {
	*sim.TickingComponent

	Dispatchers        []dispatching.Dispatcher
	DMAEngine          sim.Port
	Driver             sim.Port
	TLBs               []sim.Port
	CUs                []sim.Port
	AddressTranslators []sim.Port
	RDMA               sim.Port
	PMC                sim.Port
	L1VCaches          []sim.Port
	L1SCaches          []sim.Port
	L1ICaches          []sim.Port
	L2Caches           []sim.Port
	DRAMControllers    []*idealmemcontroller.Comp

	ToDriver sim.Port

	ToDMA sim.Port

	ToCUs sim.Port

	ToTLBs sim.Port

	ToAddressTranslators sim.Port

	ToCaches sim.Port

	ToRDMA sim.Port

	ToPMC sim.Port
	// contains filtered or unexported fields
}

CommandProcessor is an Akita component that is responsible for receiving requests from the driver and dispatch the requests to other parts of the GPU.

func (*CommandProcessor) RegisterCU

func (p *CommandProcessor) RegisterCU(cu CUInterfaceForCP)

RegisterCU allows the Command Processor to control the CU.

func (*CommandProcessor) Tick

func (p *CommandProcessor) Tick(now sim.VTimeInSec) bool

Tick ticks

type DMAEngine

type DMAEngine struct {
	*sim.TickingComponent

	Log2AccessSize uint64

	ToCP  sim.Port
	ToMem sim.Port
	// contains filtered or unexported fields
}

A DMAEngine is responsible for accessing data that does not belongs to the GPU that the DMAEngine works in.

func NewDMAEngine

func NewDMAEngine(
	name string,
	engine sim.Engine,
	localDataSource mem.LowModuleFinder,
) *DMAEngine

NewDMAEngine creates a DMAEngine, injecting a engine and a "LowModuleFinder" that helps with locating the module that holds the data.

func (*DMAEngine) SetLocalDataSource

func (dma *DMAEngine) SetLocalDataSource(s mem.LowModuleFinder)

SetLocalDataSource sets the table that maps from addresses to port that can provide the data.

func (*DMAEngine) Tick

func (dma *DMAEngine) Tick(now sim.VTimeInSec) bool

Tick ticks

type RequestCollection added in v3.0.1

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

A RequestCollection contains a single MemCopy Msg and the IDs of the Read/Write requests that correspond to it, as well as the number of remaining requests

func NewRequestCollection added in v3.0.1

func NewRequestCollection(
	superiorRequest sim.Msg,
) *RequestCollection

Directories

Path Synopsis
internal
dispatching
Package dispatching defines how work-groups and wavefronts are dispatched to compute units.
Package dispatching defines how work-groups and wavefronts are dispatched to compute units.
resource
Package resource manages the Compute Unit resources
Package resource manages the Compute Unit resources

Jump to

Keyboard shortcuts

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