Documentation
¶
Overview ¶
Package addresstranslator implements a component that can forward the translated read and write request to the bottom memory unit.
Index ¶
- type AddressTranslator
- type Builder
- func (b Builder) Build(name string) *AddressTranslator
- func (b Builder) WithCtrlPort(p sim.Port) Builder
- func (b Builder) WithDeviceID(n uint64) Builder
- func (b Builder) WithEngine(engine sim.Engine) Builder
- func (b Builder) WithFreq(freq sim.Freq) Builder
- func (b Builder) WithLog2PageSize(n uint64) Builder
- func (b Builder) WithLowModuleFinder(f mem.LowModuleFinder) Builder
- func (b Builder) WithNumReqPerCycle(n int) Builder
- func (b Builder) WithTranslationProvider(p sim.Port) Builder
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 (Builder) Build ¶
func (b Builder) Build(name string) *AddressTranslator
Build returns a new AddressTranslator
func (Builder) WithCtrlPort ¶
WithCtrlPort sets the port of the component that can send ctrl reqs to AT
func (Builder) WithDeviceID ¶
WithDeviceID sets the GPU ID that the address translator belongs to
func (Builder) WithEngine ¶
WithEngine sets the engine to be used by the address translators
func (Builder) WithLog2PageSize ¶
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 ¶
WithNumReqPerCycle sets the number of request the address translators can process in each cycle.