tlb

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 7 Imported by: 29

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 sim.Engine) Builder

WithEngine sets the engine that the TLBs to use

func (Builder) WithFreq

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

WithFreq sets the freq the TLBs use

func (Builder) WithLowModule

func (b Builder) WithLowModule(lowModule sim.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 FlushReq added in v2.3.0

type FlushReq struct {
	sim.MsgMeta
	VAddr []uint64
	PID   ca.PID
}

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

func (*FlushReq) Meta added in v2.3.0

func (r *FlushReq) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type FlushReqBuilder added in v2.3.0

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

FlushReqBuilder can build AT flush requests

func (FlushReqBuilder) Build added in v2.3.0

func (b FlushReqBuilder) Build() *FlushReq

Build creates a new TLBFlushReq

func (FlushReqBuilder) WithDst added in v2.3.0

func (b FlushReqBuilder) WithDst(dst sim.Port) FlushReqBuilder

WithDst sets the destination of the request to build.

func (FlushReqBuilder) WithPID added in v2.3.0

func (b FlushReqBuilder) WithPID(pid ca.PID) FlushReqBuilder

WithPID sets the pid whose entries are to be flushed

func (FlushReqBuilder) WithSendTime added in v2.3.0

func (b FlushReqBuilder) WithSendTime(
	t sim.VTimeInSec,
) FlushReqBuilder

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

func (FlushReqBuilder) WithSrc added in v2.3.0

func (b FlushReqBuilder) WithSrc(src sim.Port) FlushReqBuilder

WithSrc sets the source of the request to build.

func (FlushReqBuilder) WithVAddrs added in v2.3.0

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

WithVAddrs sets the Vaddr of the pages to be flushed

type FlushRsp added in v2.3.0

type FlushRsp struct {
	sim.MsgMeta
}

A FlushRsp is a response from AT indicating flush is complete

func (*FlushRsp) Meta added in v2.3.0

func (r *FlushRsp) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type FlushRspBuilder added in v2.3.0

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

FlushRspBuilder can build AT flush rsp

func (FlushRspBuilder) Build added in v2.3.0

func (b FlushRspBuilder) Build() *FlushRsp

Build creates a new TLBFlushRsps.

func (FlushRspBuilder) WithDst added in v2.3.0

func (b FlushRspBuilder) WithDst(dst sim.Port) FlushRspBuilder

WithDst sets the destination of the request to build.

func (FlushRspBuilder) WithSendTime added in v2.3.0

func (b FlushRspBuilder) WithSendTime(
	t sim.VTimeInSec,
) FlushRspBuilder

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

func (FlushRspBuilder) WithSrc added in v2.3.0

func (b FlushRspBuilder) WithSrc(src sim.Port) FlushRspBuilder

WithSrc sets the source of the request to build.

type RestartReq added in v2.3.0

type RestartReq struct {
	sim.MsgMeta
}

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

func (*RestartReq) Meta added in v2.3.0

func (r *RestartReq) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type RestartReqBuilder added in v2.3.0

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

RestartReqBuilder can build TLB restart requests.

func (RestartReqBuilder) Build added in v2.3.0

func (b RestartReqBuilder) Build() *RestartReq

Build creates a new TLBRestartReq.

func (RestartReqBuilder) WithDst added in v2.3.0

WithDst sets the destination of the request to build.

func (RestartReqBuilder) WithSendTime added in v2.3.0

func (b RestartReqBuilder) WithSendTime(
	t sim.VTimeInSec,
) RestartReqBuilder

WithSendTime sets the send time of the request to build.

func (RestartReqBuilder) WithSrc added in v2.3.0

WithSrc sets the source of the request to build.

type RestartRsp added in v2.3.0

type RestartRsp struct {
	sim.MsgMeta
}

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

func (*RestartRsp) Meta added in v2.3.0

func (r *RestartRsp) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type RestartRspBuilder added in v2.3.0

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

RestartRspBuilder can build AT flush rsp

func (RestartRspBuilder) Build added in v2.3.0

func (b RestartRspBuilder) Build() *RestartRsp

Build creates a new TLBRestartRsp

func (RestartRspBuilder) WithDst added in v2.3.0

WithDst sets the destination of the request to build.

func (RestartRspBuilder) WithSendTime added in v2.3.0

func (b RestartRspBuilder) WithSendTime(
	t sim.VTimeInSec,
) RestartRspBuilder

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

func (RestartRspBuilder) WithSrc added in v2.3.0

WithSrc sets the source of the request to build.

type TLB

type TLB struct {
	*sim.TickingComponent

	LowModule sim.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 sim.VTimeInSec) bool

Tick defines how TLB update states at each cycle

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