signal

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 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

func (*Command) IsReadOrWrite

func (c *Command) IsReadOrWrite() bool

func (*Command) IsWrite

func (c *Command) IsWrite() bool

type CommandKind

type CommandKind int
const (
	CmdKindRead CommandKind = iota
	CmdKindReadPrecharge
	CmdKindWrite
	CmdKindWritePrecharge
	CmdKindActivate
	CmdKindPrecharge
	CmdKindRefreshBank
	CmdKindRefresh
	CmdKindSRefEnter
	CmdKindSRefExit
	NumCmdKind
)

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

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

func (*Transaction) GlobalAddress

func (t *Transaction) GlobalAddress() uint64

func (*Transaction) IsCompleted

func (t *Transaction) IsCompleted() bool

func (*Transaction) IsRead

func (t *Transaction) IsRead() bool

func (*Transaction) IsWrite

func (t *Transaction) IsWrite() bool

Jump to

Keyboard shortcuts

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