xand

package
v0.0.0-...-1646a41 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: BSD-2-Clause Imports: 7 Imported by: 1

Documentation

Overview

implementation of ajvondrak's xand core

Index

Constants

View Source
const (
	MemoryLoad = iota
	MemoryStore
)
View Source
const (
	AluSubtract = iota
	AluLessThanZero
	AluLessThanOrEqualToZero
)
View Source
const MemorySize = 128

Variables

This section is empty.

Functions

func RegistrationName

func RegistrationName() string

Types

type Alu

type Alu struct {
	Control chan<- Word
	First   chan<- Word
	Second  chan<- Word
	Op      chan<- Word
	Result  <-chan Word
	// contains filtered or unexported fields
}

func NewAlu

func NewAlu() *Alu

type BranchUnit

type BranchUnit struct {
	Control, Condition, OnTrue, OnFalse chan<- Word
	Result                              <-chan Word
	// contains filtered or unexported fields
}

func NewBranchUnit

func NewBranchUnit() *BranchUnit

type Core

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

func New

func New() (*Core, error)

func (*Core) Dump

func (this *Core) Dump(output chan<- byte) error

func (*Core) GetDebugStatus

func (this *Core) GetDebugStatus() bool

func (*Core) InstallProgram

func (this *Core) InstallProgram(input <-chan byte) error

func (*Core) Run

func (this *Core) Run() error

func (*Core) SetDebug

func (this *Core) SetDebug(_ bool)

func (*Core) Shutdown

func (this *Core) Shutdown() error

func (*Core) Startup

func (this *Core) Startup() error

type MemoryUnit

type MemoryUnit struct {
	Control, Op, Addr, Value chan<- Word
	Result                   <-chan Word
	Error                    <-chan error
	// contains filtered or unexported fields
}

func NewMemoryUnit

func NewMemoryUnit() *MemoryUnit

type Word

type Word int8

Jump to

Keyboard shortcuts

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