tlb

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tlb provides a TLB component 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 TLBs

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder returns a Builder

func (Builder) Build

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

Build creates a new TLB

func (Builder) WithEngine

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

WithEngine sets the engine that the TLBs to use

func (Builder) WithFreq

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

WithFreq sets the freq the TLBs use

func (Builder) WithLowModule

func (b Builder) WithLowModule(lowModule akita.Port) Builder

WithLowModule sets the port that can provide the address translation in case of tlb miss.

func (Builder) WithNumMSHREntry

func (b Builder) WithNumMSHREntry(num int) Builder

WithNumMSHREntry sets the number of mshr entry

func (Builder) WithNumReqPerCycle

func (b Builder) WithNumReqPerCycle(n int) Builder

WithNumReqPerCycle sets the number of requests per cycle can be processed by a TLB

func (Builder) WithNumSets

func (b Builder) WithNumSets(n int) Builder

WithNumSets sets the number of sets in a TLB. Use 1 for fully associated TLBs.

func (Builder) WithNumWays

func (b Builder) WithNumWays(n int) Builder

WithNumWays sets the number of ways in a TLB. Set this field to the number of TLB entries for all the functions.

func (Builder) WithPageSize

func (b Builder) WithPageSize(n uint64) Builder

WithPageSize sets the page size that the TLB works with.

type TLB

type TLB struct {
	*akita.TickingComponent

	TopPort     akita.Port
	BottomPort  akita.Port
	ControlPort akita.Port

	LowModule akita.Port

	Sets []internal.Set
	// contains filtered or unexported fields
}

A TLB is a cache that maintains some page information.

func (*TLB) Tick

func (tlb *TLB) Tick(now akita.VTimeInSec) bool

Tick defines how TLB update states at each cycle

type TLBFlushReq

type TLBFlushReq struct {
	akita.MsgMeta
	VAddr []uint64
	PID   ca.PID
}

A TLBFlushReq asks the TLB to invalidate certain entries. It will also not block all incoming and outgoing ports

func (*TLBFlushReq) Meta

func (r *TLBFlushReq) Meta() *akita.MsgMeta

Meta returns the meta data associated with the message.

type TLBFlushReqBuilder

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

TLBFlushReqBuilder can build AT flush requests

func (TLBFlushReqBuilder) Build

func (b TLBFlushReqBuilder) Build() *TLBFlushReq

Build creates a new TLBFlushReq

func (TLBFlushReqBuilder) WithDst

WithDst sets the destination of the request to build.

func (TLBFlushReqBuilder) WithPID

WithPID sets the pid whose entries are to be flushed

func (TLBFlushReqBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (TLBFlushReqBuilder) WithSrc

WithSrc sets the source of the request to build.

func (TLBFlushReqBuilder) WithVAddrs

func (b TLBFlushReqBuilder) WithVAddrs(vAddrs []uint64) TLBFlushReqBuilder

WithVAddrs sets the Vaddr of the pages to be flushed

type TLBFlushRsp

type TLBFlushRsp struct {
	akita.MsgMeta
}

A TLBFlushRsp is a response from AT indicating flush is complete

func (*TLBFlushRsp) Meta

func (r *TLBFlushRsp) Meta() *akita.MsgMeta

Meta returns the meta data associated with the message.

type TLBFlushRspBuilder

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

TLBFlushRspBuilder can build AT flush rsp

func (TLBFlushRspBuilder) Build

func (b TLBFlushRspBuilder) Build() *TLBFlushRsp

Build creats a new TLBFlushRsps

func (TLBFlushRspBuilder) WithDst

WithDst sets the destination of the request to build.

func (TLBFlushRspBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (TLBFlushRspBuilder) WithSrc

WithSrc sets the source of the request to build.

type TLBRestartReq

type TLBRestartReq struct {
	akita.MsgMeta
}

A TLBRestartReq is a request to TLB to start accepting requests and resume operations

func (*TLBRestartReq) Meta

func (r *TLBRestartReq) Meta() *akita.MsgMeta

Meta returns the meta data associated with the message.

type TLBRestartReqBuilder

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

TLBFlushRspBuilder can build AT flush rsp

func (TLBRestartReqBuilder) Build

Build creats a new TLBRestartReq

func (TLBRestartReqBuilder) WithDst

WithDst sets the destination of the request to build.

func (TLBRestartReqBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (TLBRestartReqBuilder) WithSrc

WithSrc sets the source of the request to build.

type TLBRestartRsp

type TLBRestartRsp struct {
	akita.MsgMeta
}

A TLBRestartRsp is a response from AT indicating it has resumed working

func (*TLBRestartRsp) Meta

func (r *TLBRestartRsp) Meta() *akita.MsgMeta

Meta returns the meta data associated with the message.

type TLBRestartRspBuilder

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

TLBRestartRspBuilder can build AT flush rsp

func (TLBRestartRspBuilder) Build

Build creates a new TLBRestartRsp

func (TLBRestartRspBuilder) WithDst

WithDst sets the destination of the request to build.

func (TLBRestartRspBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (TLBRestartRspBuilder) WithSrc

WithSrc sets the source of the request to build.

Directories

Path Synopsis
Package internal provides the definition required for defining TLB.
Package internal provides the definition required for defining TLB.

Jump to

Keyboard shortcuts

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