Documentation
¶
Overview ¶
Package mem and its subpackages provide definitions for memoy systems.
Index ¶
- Constants
- type AccessReq
- type AccessRsp
- type ControlMsg
- type ControlMsgBuilder
- func (b ControlMsgBuilder) Build() *ControlMsg
- func (b ControlMsgBuilder) ToDiscardTransactions() ControlMsgBuilder
- func (b ControlMsgBuilder) ToNotifyDone() ControlMsgBuilder
- func (b ControlMsgBuilder) ToRestart() ControlMsgBuilder
- func (b ControlMsgBuilder) WithDst(dst akita.Port) ControlMsgBuilder
- func (b ControlMsgBuilder) WithSendTime(t akita.VTimeInSec) ControlMsgBuilder
- func (b ControlMsgBuilder) WithSrc(src akita.Port) ControlMsgBuilder
- type DataReadyRsp
- type DataReadyRspBuilder
- func (b DataReadyRspBuilder) Build() *DataReadyRsp
- func (b DataReadyRspBuilder) WithData(data []byte) DataReadyRspBuilder
- func (b DataReadyRspBuilder) WithDst(dst akita.Port) DataReadyRspBuilder
- func (b DataReadyRspBuilder) WithRspTo(id string) DataReadyRspBuilder
- func (b DataReadyRspBuilder) WithSendTime(t akita.VTimeInSec) DataReadyRspBuilder
- func (b DataReadyRspBuilder) WithSrc(src akita.Port) DataReadyRspBuilder
- type GL0InvalidateReq
- type GL0InvalidateReqBuilder
- func (b GL0InvalidateReqBuilder) Build() *GL0InvalidateReq
- func (b GL0InvalidateReqBuilder) WithDst(dst akita.Port) GL0InvalidateReqBuilder
- func (b GL0InvalidateReqBuilder) WithPID(pid ca.PID) GL0InvalidateReqBuilder
- func (b GL0InvalidateReqBuilder) WithSendTime(t akita.VTimeInSec) GL0InvalidateReqBuilder
- func (b GL0InvalidateReqBuilder) WithSrc(src akita.Port) GL0InvalidateReqBuilder
- type GL0InvalidateRsp
- type GL0InvalidateRspBuilder
- func (b GL0InvalidateRspBuilder) Build() *GL0InvalidateRsp
- func (b GL0InvalidateRspBuilder) WithDst(dst akita.Port) GL0InvalidateRspBuilder
- func (b GL0InvalidateRspBuilder) WithPID(pid ca.PID) GL0InvalidateRspBuilder
- func (b GL0InvalidateRspBuilder) WithRspTo(id string) GL0InvalidateRspBuilder
- func (b GL0InvalidateRspBuilder) WithSendTime(t akita.VTimeInSec) GL0InvalidateRspBuilder
- func (b GL0InvalidateRspBuilder) WithSrc(src akita.Port) GL0InvalidateRspBuilder
- type ReadReq
- type ReadReqBuilder
- func (b ReadReqBuilder) Build() *ReadReq
- func (b ReadReqBuilder) CanWaitForCoalesce() ReadReqBuilder
- func (b ReadReqBuilder) WithAddress(address uint64) ReadReqBuilder
- func (b ReadReqBuilder) WithByteSize(byteSize uint64) ReadReqBuilder
- func (b ReadReqBuilder) WithDst(dst akita.Port) ReadReqBuilder
- func (b ReadReqBuilder) WithInfo(info interface{}) ReadReqBuilder
- func (b ReadReqBuilder) WithPID(pid ca.PID) ReadReqBuilder
- func (b ReadReqBuilder) WithSendTime(t akita.VTimeInSec) ReadReqBuilder
- func (b ReadReqBuilder) WithSrc(src akita.Port) ReadReqBuilder
- type Storage
- type WriteBuffer
- type WriteDoneRsp
- type WriteDoneRspBuilder
- func (b WriteDoneRspBuilder) Build() *WriteDoneRsp
- func (b WriteDoneRspBuilder) WithDst(dst akita.Port) WriteDoneRspBuilder
- func (b WriteDoneRspBuilder) WithRspTo(id string) WriteDoneRspBuilder
- func (b WriteDoneRspBuilder) WithSendTime(t akita.VTimeInSec) WriteDoneRspBuilder
- func (b WriteDoneRspBuilder) WithSrc(src akita.Port) WriteDoneRspBuilder
- type WriteReq
- type WriteReqBuilder
- func (b WriteReqBuilder) Build() *WriteReq
- func (b WriteReqBuilder) CanWaitForCoalesce() WriteReqBuilder
- func (b WriteReqBuilder) WithAddress(address uint64) WriteReqBuilder
- func (b WriteReqBuilder) WithData(data []byte) WriteReqBuilder
- func (b WriteReqBuilder) WithDirtyMask(mask []bool) WriteReqBuilder
- func (b WriteReqBuilder) WithDst(dst akita.Port) WriteReqBuilder
- func (b WriteReqBuilder) WithInfo(info interface{}) WriteReqBuilder
- func (b WriteReqBuilder) WithPID(pid ca.PID) WriteReqBuilder
- func (b WriteReqBuilder) WithSendTime(t akita.VTimeInSec) WriteReqBuilder
- func (b WriteReqBuilder) WithSrc(src akita.Port) WriteReqBuilder
Constants ¶
const ( KB uint64 = 1 << (10 * iota) MB GB TB )
For capacity
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessReq ¶
AccessReq abstracts read and write requests that are sent to the cache modules or memory controllers.
type ControlMsg ¶ added in v1.8.5
ControlMsg is the commonly used message type for controlling the components on the memory hierarchy. It is also used for resonpding the original requester with the Done field.
func (*ControlMsg) Meta ¶ added in v1.8.5
func (m *ControlMsg) Meta() *akita.MsgMeta
Meta returns the meta data assocated with the ControlMsg.
type ControlMsgBuilder ¶ added in v1.8.5
type ControlMsgBuilder struct {
// contains filtered or unexported fields
}
A ControlMsgBuilder can build control messages.
func (ControlMsgBuilder) Build ¶ added in v1.8.5
func (b ControlMsgBuilder) Build() *ControlMsg
func (ControlMsgBuilder) ToDiscardTransactions ¶ added in v1.8.5
func (b ControlMsgBuilder) ToDiscardTransactions() ControlMsgBuilder
ToDiscardTransactions sets the discard transactions bit of the control messages to 1.
func (ControlMsgBuilder) ToNotifyDone ¶ added in v1.8.5
func (b ControlMsgBuilder) ToNotifyDone() ControlMsgBuilder
ToNotifyDone sets the "notify done" bit of the control messages to 1.
func (ControlMsgBuilder) ToRestart ¶ added in v1.8.5
func (b ControlMsgBuilder) ToRestart() ControlMsgBuilder
ToRestart sets the restart bit of the control messages to 1.
func (ControlMsgBuilder) WithDst ¶ added in v1.8.5
func (b ControlMsgBuilder) WithDst(dst akita.Port) ControlMsgBuilder
WithDst sets the destination of the request to build.
func (ControlMsgBuilder) WithSendTime ¶ added in v1.8.5
func (b ControlMsgBuilder) WithSendTime( t akita.VTimeInSec, ) ControlMsgBuilder
WithSendTime sets the send time of the message to build.
func (ControlMsgBuilder) WithSrc ¶ added in v1.8.5
func (b ControlMsgBuilder) WithSrc(src akita.Port) ControlMsgBuilder
WithSrc sets the source of the request to build.
type DataReadyRsp ¶
type DataReadyRsp struct {
akita.MsgMeta
RespondTo string // The ID of the request it replies
Data []byte
}
A DataReadyRsp is the respond sent from the lower module to the higher module that carries the data loaded.
func (*DataReadyRsp) GetRespondTo ¶
func (r *DataReadyRsp) GetRespondTo() string
GetRespondTo returns the ID if the request that the respond is resonding to.
func (*DataReadyRsp) Meta ¶ added in v1.3.0
func (r *DataReadyRsp) Meta() *akita.MsgMeta
Meta returns the meta data attached to each message.
type DataReadyRspBuilder ¶ added in v1.3.0
type DataReadyRspBuilder struct {
// contains filtered or unexported fields
}
DataReadyRspBuilder can build data ready responds.
func (DataReadyRspBuilder) Build ¶ added in v1.3.0
func (b DataReadyRspBuilder) Build() *DataReadyRsp
Build creates a new DataReadyRsp
func (DataReadyRspBuilder) WithData ¶ added in v1.3.0
func (b DataReadyRspBuilder) WithData(data []byte) DataReadyRspBuilder
WithData sets the data of the request to build.
func (DataReadyRspBuilder) WithDst ¶ added in v1.3.0
func (b DataReadyRspBuilder) WithDst(dst akita.Port) DataReadyRspBuilder
WithDst sets the destination of the request to build.
func (DataReadyRspBuilder) WithRspTo ¶ added in v1.3.0
func (b DataReadyRspBuilder) WithRspTo(id string) DataReadyRspBuilder
WithRspTo sets ID of the request that the respond to build is replying to.
func (DataReadyRspBuilder) WithSendTime ¶ added in v1.3.0
func (b DataReadyRspBuilder) WithSendTime( t akita.VTimeInSec, ) DataReadyRspBuilder
WithSendTime sets the send time of the request to build.
func (DataReadyRspBuilder) WithSrc ¶ added in v1.3.0
func (b DataReadyRspBuilder) WithSrc(src akita.Port) DataReadyRspBuilder
WithSrc sets the source of the request to build.
type GL0InvalidateReq ¶ added in v1.12.0
func (*GL0InvalidateReq) GetAddress ¶ added in v1.12.0
func (r *GL0InvalidateReq) GetAddress() uint64
GetAddress returns the address that the request is accessing
func (*GL0InvalidateReq) GetByteSize ¶ added in v1.12.0
func (r *GL0InvalidateReq) GetByteSize() uint64
GetByteSize returns the number of byte that the request is accessing.
func (*GL0InvalidateReq) GetPID ¶ added in v1.12.0
func (r *GL0InvalidateReq) GetPID() ca.PID
GetPID returns the process ID that the request is working on.
func (*GL0InvalidateReq) Meta ¶ added in v1.12.0
func (m *GL0InvalidateReq) Meta() *akita.MsgMeta
Meta returns the meta data associated with the message.
type GL0InvalidateReqBuilder ¶ added in v1.12.0
CUPipelineRestartReqBuilder can build new CU restart reqs
func (GL0InvalidateReqBuilder) Build ¶ added in v1.12.0
func (b GL0InvalidateReqBuilder) Build() *GL0InvalidateReq
Build creats a new CUPipelineRestartReq
func (GL0InvalidateReqBuilder) WithDst ¶ added in v1.12.0
func (b GL0InvalidateReqBuilder) WithDst(dst akita.Port) GL0InvalidateReqBuilder
WithDst sets the destination of the request to build.
func (GL0InvalidateReqBuilder) WithPID ¶ added in v1.12.0
func (b GL0InvalidateReqBuilder) WithPID(pid ca.PID) GL0InvalidateReqBuilder
WithPID sets the PID of the request to build.
func (GL0InvalidateReqBuilder) WithSendTime ¶ added in v1.12.0
func (b GL0InvalidateReqBuilder) WithSendTime( t akita.VTimeInSec, ) GL0InvalidateReqBuilder
WithSendTime sets the send time of the request to build.:w
func (GL0InvalidateReqBuilder) WithSrc ¶ added in v1.12.0
func (b GL0InvalidateReqBuilder) WithSrc(src akita.Port) GL0InvalidateReqBuilder
WithSrc sets the source of the request to build.
type GL0InvalidateRsp ¶ added in v1.12.0
func (*GL0InvalidateRsp) GetAddress ¶ added in v1.12.0
func (r *GL0InvalidateRsp) GetAddress() uint64
GetAddress returns the address that the request is accessing
func (*GL0InvalidateRsp) GetByteSize ¶ added in v1.12.0
func (r *GL0InvalidateRsp) GetByteSize() uint64
GetByteSize returns the number of byte that the request is accessing.
func (*GL0InvalidateRsp) GetPID ¶ added in v1.12.0
func (r *GL0InvalidateRsp) GetPID() ca.PID
GetPID returns the process ID that the request is working on.
func (*GL0InvalidateRsp) GetRespondTo ¶ added in v1.12.0
func (r *GL0InvalidateRsp) GetRespondTo() string
GetRespondTo returns the ID if the request that the respond is resonding to.
func (*GL0InvalidateRsp) Meta ¶ added in v1.12.0
func (m *GL0InvalidateRsp) Meta() *akita.MsgMeta
Meta returns the meta data associated with the message.
type GL0InvalidateRspBuilder ¶ added in v1.12.0
CUPipelineRestartReqBuilder can build new CU restart reqs
func (GL0InvalidateRspBuilder) Build ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) Build() *GL0InvalidateRsp
Build creats a new CUPipelineRestartReq
func (GL0InvalidateRspBuilder) WithDst ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) WithDst(dst akita.Port) GL0InvalidateRspBuilder
WithDst sets the destination of the request to build.
func (GL0InvalidateRspBuilder) WithPID ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) WithPID(pid ca.PID) GL0InvalidateRspBuilder
WithPID sets the PID of the request to build.
func (GL0InvalidateRspBuilder) WithRspTo ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) WithRspTo(id string) GL0InvalidateRspBuilder
WithRspTo sets ID of the request that the respond to build is replying to.
func (GL0InvalidateRspBuilder) WithSendTime ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) WithSendTime( t akita.VTimeInSec, ) GL0InvalidateRspBuilder
WithSendTime sets the send time of the request to build.:w
func (GL0InvalidateRspBuilder) WithSrc ¶ added in v1.12.0
func (b GL0InvalidateRspBuilder) WithSrc(src akita.Port) GL0InvalidateRspBuilder
WithSrc sets the source of the request to build.
type ReadReq ¶
type ReadReq struct {
akita.MsgMeta
Address uint64
AccessByteSize uint64
PID ca.PID
CanWaitForCoalesce bool
Info interface{}
}
A ReadReq is a request sent to a memory controller to fetch data
func (*ReadReq) GetAddress ¶
GetAddress returns the address that the request is accessing
func (*ReadReq) GetByteSize ¶
GetByteSize returns the number of byte that the request is accessing.
type ReadReqBuilder ¶ added in v1.3.0
type ReadReqBuilder struct {
// contains filtered or unexported fields
}
ReadReqBuilder can build read requests.
func (ReadReqBuilder) Build ¶ added in v1.3.0
func (b ReadReqBuilder) Build() *ReadReq
Build creates a new ReadReq
func (ReadReqBuilder) CanWaitForCoalesce ¶ added in v1.3.0
func (b ReadReqBuilder) CanWaitForCoalesce() ReadReqBuilder
CanWaitForCoalesce allow the request to build to wait for coalesce.
func (ReadReqBuilder) WithAddress ¶ added in v1.3.0
func (b ReadReqBuilder) WithAddress(address uint64) ReadReqBuilder
WithAddress sets the address of the request to build.
func (ReadReqBuilder) WithByteSize ¶ added in v1.3.0
func (b ReadReqBuilder) WithByteSize(byteSize uint64) ReadReqBuilder
WithByteSize sets the byte size of the request to build.
func (ReadReqBuilder) WithDst ¶ added in v1.3.0
func (b ReadReqBuilder) WithDst(dst akita.Port) ReadReqBuilder
WithDst sets the destination of the request to build.
func (ReadReqBuilder) WithInfo ¶ added in v1.8.7
func (b ReadReqBuilder) WithInfo(info interface{}) ReadReqBuilder
WithInfo sets the Info of the request to build.
func (ReadReqBuilder) WithPID ¶ added in v1.3.0
func (b ReadReqBuilder) WithPID(pid ca.PID) ReadReqBuilder
WithPID sets the PID of the request to build.
func (ReadReqBuilder) WithSendTime ¶ added in v1.3.0
func (b ReadReqBuilder) WithSendTime(t akita.VTimeInSec) ReadReqBuilder
WithSendTime sets the send time of the request to build.
func (ReadReqBuilder) WithSrc ¶ added in v1.3.0
func (b ReadReqBuilder) WithSrc(src akita.Port) ReadReqBuilder
WithSrc sets the source of the request to build.
type Storage ¶
A Storage keeps the data of the guest system.
A storage is an abstraction of all different type of storage including registers, main memory, and hard drives.
The storage implementation manages the storage in units. The unit can is similar to the concept of page in mmemory management. For the units that it not touched by Read and Write function, no memory will be allocated.
func NewStorage ¶
NewStorage creates a storage object with the specified capacity
type WriteBuffer ¶ added in v1.1.6
type WriteBuffer interface {
Tick(now akita.VTimeInSec) bool
CanEnqueue() bool
Enqueue(write *WriteReq)
Query(read *ReadReq) *WriteReq
SetWriteCombineGranularity(size uint64)
}
WriteBuffer is a place where the write can be transferred at a later time.
func NewWriteBuffer ¶ added in v1.1.6
func NewWriteBuffer(capacity int, port akita.Port) WriteBuffer
NewWriteBuffer creates and returns a default write buffer
type WriteDoneRsp ¶ added in v1.3.0
A WriteDoneRsp is a respond sent from the lower module to the higher module to mark a previous requests is completed successfully.
func (*WriteDoneRsp) GetRespondTo ¶ added in v1.3.0
func (r *WriteDoneRsp) GetRespondTo() string
GetRespondTo returns the ID of the request that the respond is responding to.
func (*WriteDoneRsp) Meta ¶ added in v1.3.0
func (r *WriteDoneRsp) Meta() *akita.MsgMeta
Meta returns the meta data accociated with the message.
type WriteDoneRspBuilder ¶ added in v1.3.0
type WriteDoneRspBuilder struct {
// contains filtered or unexported fields
}
WriteDoneRspBuilder can build data ready responds.
func (WriteDoneRspBuilder) Build ¶ added in v1.3.0
func (b WriteDoneRspBuilder) Build() *WriteDoneRsp
Build creates a new WriteDoneRsp
func (WriteDoneRspBuilder) WithDst ¶ added in v1.3.0
func (b WriteDoneRspBuilder) WithDst(dst akita.Port) WriteDoneRspBuilder
WithDst sets the destination of the request to build.
func (WriteDoneRspBuilder) WithRspTo ¶ added in v1.3.0
func (b WriteDoneRspBuilder) WithRspTo(id string) WriteDoneRspBuilder
WithRspTo sets ID of the request that the respond to build is replying to.
func (WriteDoneRspBuilder) WithSendTime ¶ added in v1.3.0
func (b WriteDoneRspBuilder) WithSendTime( t akita.VTimeInSec, ) WriteDoneRspBuilder
WithSendTime sets the send time of the message to build.
func (WriteDoneRspBuilder) WithSrc ¶ added in v1.3.0
func (b WriteDoneRspBuilder) WithSrc(src akita.Port) WriteDoneRspBuilder
WithSrc sets the source of the request to build.
type WriteReq ¶
type WriteReq struct {
akita.MsgMeta
Address uint64
Data []byte
DirtyMask []bool
PID ca.PID
CanWaitForCoalesce bool
Info interface{}
}
A WriteReq is a request sent to a memory controller to write data
func (*WriteReq) GetAddress ¶
GetAddress returns the address that the request is accessing
func (*WriteReq) GetByteSize ¶
GetByteSize returns the number of byte that the request is writing.
type WriteReqBuilder ¶ added in v1.3.0
type WriteReqBuilder struct {
// contains filtered or unexported fields
}
WriteReqBuilder can build read requests.
func (WriteReqBuilder) Build ¶ added in v1.3.0
func (b WriteReqBuilder) Build() *WriteReq
Build creates a new WriteReq
func (WriteReqBuilder) CanWaitForCoalesce ¶ added in v1.3.0
func (b WriteReqBuilder) CanWaitForCoalesce() WriteReqBuilder
CanWaitForCoalesce allow the request to build to wait for coalesce.
func (WriteReqBuilder) WithAddress ¶ added in v1.3.0
func (b WriteReqBuilder) WithAddress(address uint64) WriteReqBuilder
WithAddress sets the address of the request to build.
func (WriteReqBuilder) WithData ¶ added in v1.3.0
func (b WriteReqBuilder) WithData(data []byte) WriteReqBuilder
WithData sets the data of the request to build.
func (WriteReqBuilder) WithDirtyMask ¶ added in v1.3.0
func (b WriteReqBuilder) WithDirtyMask(mask []bool) WriteReqBuilder
WithDirtyMask sets the dirty mask of the request to build.
func (WriteReqBuilder) WithDst ¶ added in v1.3.0
func (b WriteReqBuilder) WithDst(dst akita.Port) WriteReqBuilder
WithDst sets the destination of the request to build.
func (WriteReqBuilder) WithInfo ¶ added in v1.8.7
func (b WriteReqBuilder) WithInfo(info interface{}) WriteReqBuilder
WithInfo sets the information attached to the request to build.
func (WriteReqBuilder) WithPID ¶ added in v1.3.0
func (b WriteReqBuilder) WithPID(pid ca.PID) WriteReqBuilder
WithPID sets the PID of the request to build.
func (WriteReqBuilder) WithSendTime ¶ added in v1.3.0
func (b WriteReqBuilder) WithSendTime(t akita.VTimeInSec) WriteReqBuilder
WithSendTime sets the send time of the message to build.
func (WriteReqBuilder) WithSrc ¶ added in v1.3.0
func (b WriteReqBuilder) WithSrc(src akita.Port) WriteReqBuilder
WithSrc sets the source of the request to build.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package acceptancetests provides utility data structure definitions for writing memory system acceptance tests.
|
Package acceptancetests provides utility data structure definitions for writing memory system acceptance tests. |
|
dram
command
|
|
|
idealmemcontroller
command
|
|
|
writebackcache
command
|
|
|
Package cache provides the basic commonly used utility data structures for cache implementation.
|
Package cache provides the basic commonly used utility data structures for cache implementation. |
|
writeback
Package writeback implements a writeback cache.
|
Package writeback implements a writeback cache. |
|
Package dram defines detailed DRAM modeling.
|
Package dram defines detailed DRAM modeling. |
|
internal/addressmapping
Package addressmapping defines how to maps an address to a localtion.
|
Package addressmapping defines how to maps an address to a localtion. |
|
internal/cmdq
Package cmdq provides command queue implementations
|
Package cmdq provides command queue implementations |
|
internal/org
Package org defines the DRAM organization related sub-component definitions, such as Channels and Banks.
|
Package org defines the DRAM organization related sub-component definitions, such as Channels and Banks. |
|
internal/signal
Package signal defines the common data structures used in the dram system, including transactions, sub-transactions, and commands.
|
Package signal defines the common data structures used in the dram system, including transactions, sub-transactions, and commands. |
|
internal/trans
Package trans defines concepts related to DRAM transactions and subtransactions.
|
Package trans defines concepts related to DRAM transactions and subtransactions. |
|
Package idealmemcontroller provides an implementation of an ideal memory controller, which has a fix latency and unlimited concurrency.
|
Package idealmemcontroller provides an implementation of an ideal memory controller, which has a fix latency and unlimited concurrency. |
|
Package trace provides a tracer that can trace memory system tasks.
|
Package trace provides a tracer that can trace memory system tasks. |
|
Package vm provides the models for address translations
|
Package vm provides the models for address translations |
|
addresstranslator
Package addresstranslator implements a component that can forward the translated read and write request to the bottom memory unit.
|
Package addresstranslator implements a component that can forward the translated read and write request to the bottom memory unit. |
|
mmu
Package mmu provides a Memory Management Unit implementation.
|
Package mmu provides a Memory Management Unit implementation. |
|
tlb
Package tlb provides a TLB component implementation.
|
Package tlb provides a TLB component implementation. |
|
tlb/internal
Package internal provides the definition required for defining TLB.
|
Package internal provides the definition required for defining TLB. |