idealmemcontroller

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 5 Imported by: 38

Documentation

Overview

Package idealmemcontroller provides an implementation of an ideal memory controller, which has a fix latency and unlimited concurrency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct {
	*sim.TickingComponent

	Storage           *mem.Storage
	Latency           int
	AddressConverter  mem.AddressConverter
	MaxNumTransaction int
	// contains filtered or unexported fields
}

An Comp is an ideal memory controller that can perform read and write

Ideal memory controller always respond to the request in a fixed number of cycles. There is no limitation on the concurrency of this unit.

func New

func New(
	name string,
	engine sim.Engine,
	capacity uint64,
) *Comp

New creates a new ideal memory controller

func (*Comp) Handle

func (c *Comp) Handle(e sim.Event) error

Handle defines how the Comp handles event

func (*Comp) Tick

func (c *Comp) Tick(now sim.VTimeInSec) bool

Tick updates ideal memory controller state.

Jump to

Keyboard shortcuts

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