bus

package
Version: v0.0.0-...-6b40fa4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2016 License: LGPL-3.0 Imports: 4 Imported by: 2

Documentation

Overview

BusErrors

bus

pcmba

Index

Constants

View Source
const (
	FLAGS_SIZE = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	Load(addr types.HCWORD, dest []types.HCWORD) error
	Set(addr types.HCWORD, value types.HCWORD) error
	SetBatch(addr types.HCWORD, values []types.HCWORD) error

	GetFlag(index types.HCWORD) types.HCWORD
	OrFlag(index types.HCWORD, value types.HCWORD)
	AndFlag(index types.HCWORD, value types.HCWORD)

	// It's better to do lock in OS, without the supporting from HW
	// The lock result will be setted after tick
	Trylock(addr types.HCWORD, size types.HCWORD)
	Unlock(addr types.HCWORD, size types.HCWORD)

	ToCell(id, addr types.HCWORD, values []types.HCWORD) error
}

type Cell

type Cell interface {
	GetPendingLock() (addr types.HCWORD, size types.HCWORD)
	SetLockResult(result types.HCWORD)

	Set(addr types.HCWORD, values []types.HCWORD)
}

type IllegalAddressError

type IllegalAddressError struct {
	ErrorString string
	Address     types.HCWORD
}

func NewIllegalAddressError

func NewIllegalAddressError(addr types.HCWORD) *IllegalAddressError

func (*IllegalAddressError) Error

func (ia *IllegalAddressError) Error() string

type PCMBA

type PCMBA struct {
	Cells []Cell

	MemoryBank *mem.MemoryBank
	// contains filtered or unexported fields
}

Programmable CPU-Memory Bus Array

func (*PCMBA) AndFlag

func (ba *PCMBA) AndFlag(index types.HCWORD, value types.HCWORD)

func (*PCMBA) GetFlag

func (ba *PCMBA) GetFlag(index types.HCWORD) types.HCWORD

func (*PCMBA) Init

func (ba *PCMBA) Init(logicSize types.HCWORD, mb *mem.MemoryBank)

func (*PCMBA) Load

func (ba *PCMBA) Load(addr types.HCWORD, dest []types.HCWORD) error

func (*PCMBA) OrFlag

func (ba *PCMBA) OrFlag(index types.HCWORD, value types.HCWORD)

func (*PCMBA) PreTick

func (ba *PCMBA) PreTick()

func (*PCMBA) Set

func (ba *PCMBA) Set(addr types.HCWORD, value types.HCWORD) error

func (*PCMBA) SetBatch

func (ba *PCMBA) SetBatch(addr types.HCWORD, values []types.HCWORD) error

func (*PCMBA) Tick

func (ba *PCMBA) Tick()

func (*PCMBA) ToCell

func (ba *PCMBA) ToCell(id, addr types.HCWORD, values []types.HCWORD) error

func (*PCMBA) Trylock

func (ba *PCMBA) Trylock(addr types.HCWORD, size types.HCWORD)

The lock result will be setted after tick

func (*PCMBA) Unlock

func (ba *PCMBA) Unlock(addr types.HCWORD, size types.HCWORD)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL