cmdq

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 cmdq provides command queue implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandQueue

type CommandQueue interface {
	GetCommandToIssue(
		now sim.VTimeInSec,
	) *signal.Command
	CanAccept(command *signal.Command) bool
	Accept(command *signal.Command)
}

A CommandQueue is a queue of command that needs to be executed by a rank or a bank.

type CommandQueueImpl

type CommandQueueImpl struct {
	Queues           []Queue
	CapacityPerQueue int

	Channel org.Channel
	// contains filtered or unexported fields
}

CommandQueueImpl implements a command queue.

func (*CommandQueueImpl) Accept

func (q *CommandQueueImpl) Accept(cmd *signal.Command)

Accept adds a new command in the command queue.

func (*CommandQueueImpl) CanAccept

func (q *CommandQueueImpl) CanAccept(cmd *signal.Command) bool

CanAccept returns true is there is empty space in the command queue.

func (*CommandQueueImpl) GetCommandToIssue

func (q *CommandQueueImpl) GetCommandToIssue(
	now sim.VTimeInSec,
) *signal.Command

GetCommandToIssue returns the next command ready to issue. It returns nil if there if no command ready.

type Queue

type Queue []*signal.Command

A Queue is a list of commands that needs to be executed by either a bank or a rank.

Jump to

Keyboard shortcuts

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