addresstranslator

package
v3.0.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 6 Imported by: 4

Documentation

Overview

Package addresstranslator implements a component that can forward the translated read and write request to the bottom memory unit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressTranslator

type AddressTranslator struct {
	*sim.TickingComponent
	// contains filtered or unexported fields
}

AddressTranslator is a component that forwards the read/write requests with the address translated from virtual to physical.

func (*AddressTranslator) SetLowModuleFinder

func (t *AddressTranslator) SetLowModuleFinder(lmf mem.LowModuleFinder)

SetLowModuleFinder sets the table recording where to find an address.

func (*AddressTranslator) SetTranslationProvider

func (t *AddressTranslator) SetTranslationProvider(p sim.Port)

SetTranslationProvider sets the remote port that can translate addresses.

func (*AddressTranslator) Tick

func (t *AddressTranslator) Tick(now sim.VTimeInSec) bool

Tick updates state at each cycle.

type Builder

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

A Builder can create address translators

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a new builder

func (Builder) Build

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

Build returns a new AddressTranslator

func (Builder) WithCtrlPort

func (b Builder) WithCtrlPort(p sim.Port) Builder

WithCtrlPort sets the port of the component that can send ctrl reqs to AT

func (Builder) WithDeviceID

func (b Builder) WithDeviceID(n uint64) Builder

WithDeviceID sets the GPU ID that the address translator belongs to

func (Builder) WithEngine

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

WithEngine sets the engine to be used by the address translators

func (Builder) WithFreq

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

WithFreq sets the frequency of the address translators

func (Builder) WithLog2PageSize

func (b Builder) WithLog2PageSize(n uint64) Builder

WithLog2PageSize sets the page size as a power of 2

func (Builder) WithLowModuleFinder

func (b Builder) WithLowModuleFinder(f mem.LowModuleFinder) Builder

WithLowModuleFinder sets the low modules finder that can tell the address translators where to send the memory access request to.

func (Builder) WithNumReqPerCycle

func (b Builder) WithNumReqPerCycle(n int) Builder

WithNumReqPerCycle sets the number of request the address translators can process in each cycle.

func (Builder) WithTranslationProvider

func (b Builder) WithTranslationProvider(p sim.Port) Builder

WithTranslationProvider sets the port that can provide the translation service. The port must be a port on a TLB or an MMU.

Jump to

Keyboard shortcuts

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