org

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package org defines the DRAM organization related sub-component definitions, such as Channels and Banks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank interface {
	tracing.NamedHookable

	GetReadyCommand(
		now sim.VTimeInSec,
		cmd *signal.Command,
	) *signal.Command
	StartCommand(now sim.VTimeInSec, cmd *signal.Command)
	UpdateTiming(cmdKind signal.CommandKind, cycleNeeded int)
	Tick(now sim.VTimeInSec) bool
}

type BankImpl

type BankImpl struct {
	sim.HookableBase
	BankName string

	CmdCycles map[signal.CommandKind]int
	// contains filtered or unexported fields
}

func NewBankImpl

func NewBankImpl(name string) *BankImpl

func (*BankImpl) GetReadyCommand

func (b *BankImpl) GetReadyCommand(
	now sim.VTimeInSec,
	cmd *signal.Command,
) *signal.Command

func (*BankImpl) Name

func (b *BankImpl) Name() string

func (*BankImpl) StartCommand

func (b *BankImpl) StartCommand(now sim.VTimeInSec, cmd *signal.Command)

func (*BankImpl) Tick

func (b *BankImpl) Tick(now sim.VTimeInSec) (madeProgress bool)

func (*BankImpl) UpdateTiming

func (b *BankImpl) UpdateTiming(cmdKind signal.CommandKind, cycleNeeded int)

type BankState

type BankState int
const (
	BankStateOpen BankState = iota
	BankStateClosed
	BankStateSRef
	BankStatePD
	BankStateInvalid
)

type Banks

type Banks [][][]Bank

Banks is indexed by rank, bank-group, bank.

func MakeBanks

func MakeBanks(numRank, numBankGroup, numBank uint64) Banks

func (Banks) GetBank

func (b Banks) GetBank(rank, bankGroup, bank uint64) Bank

func (Banks) GetSize

func (b Banks) GetSize() (rank, bankGroup, bank uint64)

type Channel

type Channel interface {
	GetReadyCommand(
		now sim.VTimeInSec,
		cmd *signal.Command,
	) *signal.Command

	StartCommand(
		now sim.VTimeInSec,
		cmd *signal.Command,
	)

	UpdateTiming(
		now sim.VTimeInSec,
		cmd *signal.Command,
	)

	Tick(now sim.VTimeInSec) (madeProgress bool)
}

type ChannelImpl

type ChannelImpl struct {
	Banks  Banks
	Timing Timing
}

func (*ChannelImpl) GetReadyCommand

func (cs *ChannelImpl) GetReadyCommand(
	now sim.VTimeInSec,
	cmd *signal.Command,
) *signal.Command

func (*ChannelImpl) StartCommand

func (cs *ChannelImpl) StartCommand(now sim.VTimeInSec, cmd *signal.Command)

func (*ChannelImpl) Tick

func (cs *ChannelImpl) Tick(now sim.VTimeInSec) (madeProgress bool)

func (*ChannelImpl) UpdateTiming

func (cs *ChannelImpl) UpdateTiming(now sim.VTimeInSec, cmd *signal.Command)

type TimeTable

type TimeTable [][]TimeTableEntry

func MakeTimeTable

func MakeTimeTable() TimeTable

type TimeTableEntry

type TimeTableEntry struct {
	NextCmdKind       signal.CommandKind
	MinCycleInBetween int
}

type Timing

type Timing struct {
	SameBank              TimeTable
	OtherBanksInBankGroup TimeTable
	SameRank              TimeTable
	OtherRanks            TimeTable
}

Jump to

Keyboard shortcuts

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