idealmemcontroller

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: 5 Imported by: 11

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 Builder

type Builder struct {
	// contains filtered or unexported fields
}

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder returns a new Builder

func (Builder) Build

func (b Builder) Build(
	name string,
) *Comp

Build builds a new Comp

func (Builder) WithAddressConverter

func (b Builder) WithAddressConverter(addressConverter mem.AddressConverter) Builder

WithAddressConverter sets the address converter of the memory controller

func (Builder) WithCacheLineSize

func (b Builder) WithCacheLineSize(cacheLineSize int) Builder

WithCacheLineSize sets the cache line size of the memory controller

func (Builder) WithEngine

func (b Builder) WithEngine(engine sim.Engine) Builder

WithEngine sets the engine of the memory controller

func (Builder) WithFreq

func (b Builder) WithFreq(freq sim.Freq) Builder

WithFreq sets the frequency of the memory controller

func (Builder) WithLatency

func (b Builder) WithLatency(latency int) Builder

WithLatency sets the latency of the memory controller

func (Builder) WithNewStorage

func (b Builder) WithNewStorage(capacity uint64) Builder

WithNewStorage sets the capacity of the memory controller

func (Builder) WithStorage

func (b Builder) WithStorage(storage *mem.Storage) Builder

WithStorage sets the storage of the memory controller

func (Builder) WithTopBufSize

func (b Builder) WithTopBufSize(topBufSize int) Builder

WithTopBufSize sets the size of the top buffer

func (Builder) WithWidth

func (b Builder) WithWidth(width int) Builder

WithWidth sets the width of the memory controller

type Comp

type Comp struct {
	*sim.TickingComponent

	Storage *mem.Storage
	Latency 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 (*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

Jump to

Keyboard shortcuts

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