tlb

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 7 Imported by: 4

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 added in v1.4.0

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 added in v1.5.0

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 added in v1.5.0

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

Meta returns the meta data associated with the message.

type TLBFlushReqBuilder added in v1.5.0

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

TLBFlushReqBuilder can build AT flush requests

func (TLBFlushReqBuilder) Build added in v1.5.0

func (b TLBFlushReqBuilder) Build() *TLBFlushReq

Build creates a new TLBFlushReq

func (TLBFlushReqBuilder) WithDst added in v1.5.0

WithDst sets the destination of the request to build.

func (TLBFlushReqBuilder) WithPID added in v1.5.0

WithPID sets the pid whose entries are to be flushed

func (TLBFlushReqBuilder) WithSendTime added in v1.5.0

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

func (TLBFlushReqBuilder) WithSrc added in v1.5.0

WithSrc sets the source of the request to build.

func (TLBFlushReqBuilder) WithVAddrs added in v1.5.0

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

WithVAddrs sets the Vaddr of the pages to be flushed

type TLBFlushRsp added in v1.5.0

type TLBFlushRsp struct {
	akita.MsgMeta
}

A TLBFlushRsp is a response from AT indicating flush is complete

func (*TLBFlushRsp) Meta added in v1.5.0

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

Meta returns the meta data associated with the message.

type TLBFlushRspBuilder added in v1.5.0

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

TLBFlushRspBuilder can build AT flush rsp

func (TLBFlushRspBuilder) Build added in v1.5.0

func (b TLBFlushRspBuilder) Build() *TLBFlushRsp

Build creates a new TLBFlushRsps.

func (TLBFlushRspBuilder) WithDst added in v1.5.0

WithDst sets the destination of the request to build.

func (TLBFlushRspBuilder) WithSendTime added in v1.5.0

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

func (TLBFlushRspBuilder) WithSrc added in v1.5.0

WithSrc sets the source of the request to build.

type TLBRestartReq added in v1.5.0

type TLBRestartReq struct {
	akita.MsgMeta
}

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

func (*TLBRestartReq) Meta added in v1.5.0

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

Meta returns the meta data associated with the message.

type TLBRestartReqBuilder added in v1.5.0

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

TLBRestartReqBuilder can build TLB restart requests.

func (TLBRestartReqBuilder) Build added in v1.5.0

Build creates a new TLBRestartReq.

func (TLBRestartReqBuilder) WithDst added in v1.5.0

WithDst sets the destination of the request to build.

func (TLBRestartReqBuilder) WithSendTime added in v1.5.0

WithSendTime sets the send time of the request to build.

func (TLBRestartReqBuilder) WithSrc added in v1.5.0

WithSrc sets the source of the request to build.

type TLBRestartRsp added in v1.5.0

type TLBRestartRsp struct {
	akita.MsgMeta
}

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

func (*TLBRestartRsp) Meta added in v1.5.0

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

Meta returns the meta data associated with the message.

type TLBRestartRspBuilder added in v1.5.0

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

TLBRestartRspBuilder can build AT flush rsp

func (TLBRestartRspBuilder) Build added in v1.5.0

Build creates a new TLBRestartRsp

func (TLBRestartRspBuilder) WithDst added in v1.5.0

WithDst sets the destination of the request to build.

func (TLBRestartRspBuilder) WithSendTime added in v1.5.0

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

func (TLBRestartRspBuilder) WithSrc added in v1.5.0

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