trans

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 4 Imported by: 0

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

Push adds new transaction to the transaction queue.

func (*FCFSSubTransactionQueue) Tick

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL