signal

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 3 Imported by: 0

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) Clone

func (c *Command) Clone() *Command

Clone will create another command with the same content, but different ID.

func (*Command) IsRead

func (c *Command) IsRead() bool

IsRead returns true if the command is a read or read precharge command.

func (*Command) IsReadOrWrite

func (c *Command) IsReadOrWrite() bool

IsReadOrWrite returns true if the command is one of the following kind. * Read * Write * ReadPrecharge * WritePrecharge

func (*Command) IsWrite

func (c *Command) IsWrite() bool

IsWrite returns true if the command is a write or write precharge command.

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.

Jump to

Keyboard shortcuts

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