Documentation
¶
Overview ¶
Package trans defines concepts related to DRAM transactions and subtransactions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClosePageCommandCreator ¶
type ClosePageCommandCreator struct {
AddrMapper addressmapping.Mapper
}
ClosePageCommandCreator always creates precharge commands as precharge commands will be the last command in a row.
func (*ClosePageCommandCreator) Create ¶
func (c *ClosePageCommandCreator) Create( subTrans *signal.SubTransaction, ) *signal.Command
Create creates new commands that can accomplish the subTrans.
type CommandCreator ¶
type CommandCreator interface {
Create(subTrans *signal.SubTransaction) *signal.Command
}
A CommandCreator can convert a subtransaction to a command.
type FCFSSubTransactionQueue ¶
type FCFSSubTransactionQueue struct { Capacity int Queue []*signal.SubTransaction CmdCreator CommandCreator CmdQueue cmdq.CommandQueue }
A FCFSSubTransactionQueue returns sub-transactions in a first-come-first-serve way.
func (*FCFSSubTransactionQueue) CanPush ¶
func (q *FCFSSubTransactionQueue) CanPush(n int) bool
CanPush returns true if there are enough slots to hold n subtransactions.
func (*FCFSSubTransactionQueue) Push ¶
func (q *FCFSSubTransactionQueue) Push(t *signal.Transaction)
Push adds new transaction to the transaction queue.
func (*FCFSSubTransactionQueue) Tick ¶
func (q *FCFSSubTransactionQueue) Tick(now sim.VTimeInSec) bool
Tick breaks down transactions to commands and dispatches the command to the command queues.
type SubTransSplitter ¶
type SubTransSplitter interface {
Split(t *signal.Transaction)
}
A SubTransSplitter can split transactions into sub-transactions.
func NewSubTransSplitter ¶
func NewSubTransSplitter(log2BankSize uint64) SubTransSplitter
NewSubTransSplitter creates a default SubTransSplitter
type SubTransactionQueue ¶
type SubTransactionQueue interface { CanPush(n int) bool Push(t *signal.Transaction) Tick(now sim.VTimeInSec) bool }
A SubTransactionQueue is a queue for subtransactions.