mmu

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 7 Imported by: 37

Documentation

Overview

Package mmu provides a Memory Management Unit implementation.

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
}

A Builder can build MMU component

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a new builder

func (Builder) Build

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

Build returns a newly created MMU component

func (Builder) WithEngine

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

WithEngine sets the engine to be used with the MMU

func (Builder) WithFreq

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

WithFreq sets the frequency that the MMU to work at

func (Builder) WithLog2PageSize

func (b Builder) WithLog2PageSize(log2PageSize uint64) Builder

WithLog2PageSize sets the page size that the mmu support.

func (Builder) WithMaxNumReqInFlight

func (b Builder) WithMaxNumReqInFlight(n int) Builder

WithMaxNumReqInFlight sets the number of requests can be concurrently processed by the MMU.

func (Builder) WithMigrationServiceProvider

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

WithMigrationServiceProvider sets the destination port that can perform page migration.

func (Builder) WithPageTable

func (b Builder) WithPageTable(pageTable vm.PageTable) Builder

WithPageTable sets the page table that the MMU uses.

func (Builder) WithPageWalkingLatency

func (b Builder) WithPageWalkingLatency(n int) Builder

WithPageWalkingLatency sets the number of cycles required for walking a page table.

type MMU added in v2.3.0

type MMU struct {
	sim.TickingComponent

	MigrationServiceProvider sim.Port

	PageAccessedByDeviceID map[uint64][]uint64
	// contains filtered or unexported fields
}

MMU is the default mmu implementation. It is also an akita Component.

func (*MMU) Tick added in v2.3.0

func (mmu *MMU) Tick(now sim.VTimeInSec) bool

Tick defines how the MMU update state each cycle

Jump to

Keyboard shortcuts

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