Documentation ¶
Overview ¶
Package tlb provides a TLB component implementation.
Index ¶
- type Builder
- func (b Builder) Build(name string) *TLB
- func (b Builder) WithEngine(engine sim.Engine) Builder
- func (b Builder) WithFreq(freq sim.Freq) Builder
- func (b Builder) WithLowModule(lowModule sim.Port) Builder
- func (b Builder) WithNumMSHREntry(num int) Builder
- func (b Builder) WithNumReqPerCycle(n int) Builder
- func (b Builder) WithNumSets(n int) Builder
- func (b Builder) WithNumWays(n int) Builder
- func (b Builder) WithPageSize(n uint64) Builder
- type FlushReq
- type FlushReqBuilder
- func (b FlushReqBuilder) Build() *FlushReq
- func (b FlushReqBuilder) WithDst(dst sim.Port) FlushReqBuilder
- func (b FlushReqBuilder) WithPID(pid vm.PID) FlushReqBuilder
- func (b FlushReqBuilder) WithSendTime(t sim.VTimeInSec) FlushReqBuilder
- func (b FlushReqBuilder) WithSrc(src sim.Port) FlushReqBuilder
- func (b FlushReqBuilder) WithVAddrs(vAddrs []uint64) FlushReqBuilder
- type FlushRsp
- type FlushRspBuilder
- type RestartReq
- type RestartReqBuilder
- type RestartRsp
- type RestartRspBuilder
- type TLB
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 (Builder) WithEngine ¶
WithEngine sets the engine that the TLBs to use
func (Builder) WithLowModule ¶
WithLowModule sets the port that can provide the address translation in case of tlb miss.
func (Builder) WithNumMSHREntry ¶
WithNumMSHREntry sets the number of mshr entry
func (Builder) WithNumReqPerCycle ¶
WithNumReqPerCycle sets the number of requests per cycle can be processed by a TLB
func (Builder) WithNumSets ¶
WithNumSets sets the number of sets in a TLB. Use 1 for fully associated TLBs.
func (Builder) WithNumWays ¶
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 ¶
WithPageSize sets the page size that the TLB works with.
type FlushReq ¶
A FlushReq asks the TLB to invalidate certain entries. It will also not block all incoming and outgoing ports
type FlushReqBuilder ¶
type FlushReqBuilder struct {
// contains filtered or unexported fields
}
FlushReqBuilder can build AT flush requests
func (FlushReqBuilder) Build ¶
func (b FlushReqBuilder) Build() *FlushReq
Build creates a new TLBFlushReq
func (FlushReqBuilder) WithDst ¶
func (b FlushReqBuilder) WithDst(dst sim.Port) FlushReqBuilder
WithDst sets the destination of the request to build.
func (FlushReqBuilder) WithPID ¶
func (b FlushReqBuilder) WithPID(pid vm.PID) FlushReqBuilder
WithPID sets the pid whose entries are to be flushed
func (FlushReqBuilder) WithSendTime ¶
func (b FlushReqBuilder) WithSendTime( t sim.VTimeInSec, ) FlushReqBuilder
WithSendTime sets the send time of the request to build.:w
func (FlushReqBuilder) WithSrc ¶
func (b FlushReqBuilder) WithSrc(src sim.Port) FlushReqBuilder
WithSrc sets the source of the request to build.
func (FlushReqBuilder) WithVAddrs ¶
func (b FlushReqBuilder) WithVAddrs(vAddrs []uint64) FlushReqBuilder
WithVAddrs sets the Vaddr of the pages to be flushed
type FlushRspBuilder ¶
type FlushRspBuilder struct {
// contains filtered or unexported fields
}
FlushRspBuilder can build AT flush rsp
func (FlushRspBuilder) Build ¶
func (b FlushRspBuilder) Build() *FlushRsp
Build creates a new TLBFlushRsps.
func (FlushRspBuilder) WithDst ¶
func (b FlushRspBuilder) WithDst(dst sim.Port) FlushRspBuilder
WithDst sets the destination of the request to build.
func (FlushRspBuilder) WithSendTime ¶
func (b FlushRspBuilder) WithSendTime( t sim.VTimeInSec, ) FlushRspBuilder
WithSendTime sets the send time of the request to build.:w
func (FlushRspBuilder) WithSrc ¶
func (b FlushRspBuilder) WithSrc(src sim.Port) FlushRspBuilder
WithSrc sets the source of the request to build.
type RestartReq ¶
A RestartReq is a request to TLB to start accepting requests and resume operations
func (*RestartReq) Meta ¶
func (r *RestartReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RestartReqBuilder ¶
type RestartReqBuilder struct {
// contains filtered or unexported fields
}
RestartReqBuilder can build TLB restart requests.
func (RestartReqBuilder) Build ¶
func (b RestartReqBuilder) Build() *RestartReq
Build creates a new TLBRestartReq.
func (RestartReqBuilder) WithDst ¶
func (b RestartReqBuilder) WithDst(dst sim.Port) RestartReqBuilder
WithDst sets the destination of the request to build.
func (RestartReqBuilder) WithSendTime ¶
func (b RestartReqBuilder) WithSendTime( t sim.VTimeInSec, ) RestartReqBuilder
WithSendTime sets the send time of the request to build.
func (RestartReqBuilder) WithSrc ¶
func (b RestartReqBuilder) WithSrc(src sim.Port) RestartReqBuilder
WithSrc sets the source of the request to build.
type RestartRsp ¶
A RestartRsp is a response from AT indicating it has resumed working
func (*RestartRsp) Meta ¶
func (r *RestartRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RestartRspBuilder ¶
type RestartRspBuilder struct {
// contains filtered or unexported fields
}
RestartRspBuilder can build AT flush rsp
func (RestartRspBuilder) Build ¶
func (b RestartRspBuilder) Build() *RestartRsp
Build creates a new TLBRestartRsp
func (RestartRspBuilder) WithDst ¶
func (b RestartRspBuilder) WithDst(dst sim.Port) RestartRspBuilder
WithDst sets the destination of the request to build.
func (RestartRspBuilder) WithSendTime ¶
func (b RestartRspBuilder) WithSendTime( t sim.VTimeInSec, ) RestartRspBuilder
WithSendTime sets the send time of the request to build.:w
func (RestartRspBuilder) WithSrc ¶
func (b RestartRspBuilder) WithSrc(src sim.Port) RestartRspBuilder
WithSrc sets the source of the request to build.