Documentation
¶
Overview ¶
Package signal defines the common data structures used in the dram system, including transactions, sub-transactions, and commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { addressmapping.Location ID string Kind CommandKind Address uint64 CycleLeft int SubTrans *SubTransaction }
Command is a signal sent to the bank to let the bank perform a certain action.
func (*Command) IsReadOrWrite ¶
IsReadOrWrite returns true if the command is one of the following kind. * Read * Write * ReadPrecharge * WritePrecharge
type CommandKind ¶
type CommandKind int
CommandKind represents the kind of the command.
const ( CmdKindRead CommandKind = iota CmdKindReadPrecharge CmdKindWrite CmdKindWritePrecharge CmdKindActivate CmdKindPrecharge CmdKindRefreshBank CmdKindRefresh CmdKindSRefEnter CmdKindSRefExit NumCmdKind )
A list of supported DRAM command kinds.
func (CommandKind) String ¶
func (k CommandKind) String() string
String converts the command kind to the string representation.
type SubTransaction ¶
type SubTransaction struct { ID string Transaction *Transaction Address uint64 Completed bool }
SubTransaction is the read and write to a single bank.
func (SubTransaction) IsRead ¶
func (st SubTransaction) IsRead() bool
IsRead returns true if the transaction that the subtransaction belongs to is an read transaction.
type Transaction ¶
type Transaction struct { Read *mem.ReadReq Write *mem.WriteReq InternalAddress uint64 SubTransactions []*SubTransaction }
Transaction is the state associated with the processing of a read or write request.
func (*Transaction) AccessByteSize ¶
func (t *Transaction) AccessByteSize() uint64
AccessByteSize returns the number of bytes that the transaction is accessing.
func (*Transaction) GlobalAddress ¶
func (t *Transaction) GlobalAddress() uint64
GlobalAddress returns the address that the transaction is accessing.
func (*Transaction) IsCompleted ¶
func (t *Transaction) IsCompleted() bool
IsCompleted returns true if the transaction is fully ready to be returned.
func (*Transaction) IsRead ¶
func (t *Transaction) IsRead() bool
IsRead returns true if the transaction is a read transaction.
func (*Transaction) IsWrite ¶
func (t *Transaction) IsWrite() bool
IsWrite returns true if the transaction is a write transaction.