cgra

package
v0.0.0-...-ec2b860 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cgra defines the commonly used data structure for CGRAs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	GetSize() (width, height int)
	GetTile(x, y int) Tile
	GetSidePorts(side Side, portRange [2]int) []sim.Port
}

A Device is a CGRA device.

type MoveMsg

type MoveMsg struct {
	sim.MsgMeta

	Data uint32
}

MoveMsg moves data from one tile to another in a CGRA.

func (*MoveMsg) Meta

func (m *MoveMsg) Meta() *sim.MsgMeta

Meta returns the meta data of the msg.

type MoveMsgBuilder

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

MoveMsgBuilder is a factory for MoveMsg.

func (MoveMsgBuilder) Build

func (m MoveMsgBuilder) Build() *MoveMsg

Build creates a MoveMsg.

func (MoveMsgBuilder) WithData

func (m MoveMsgBuilder) WithData(data uint32) MoveMsgBuilder

WithData sets the data of the msg.

func (MoveMsgBuilder) WithDst

func (m MoveMsgBuilder) WithDst(dst sim.Port) MoveMsgBuilder

WithDst sets the destination port of the msg.

func (MoveMsgBuilder) WithSendTime

func (m MoveMsgBuilder) WithSendTime(sendTime sim.VTimeInSec) MoveMsgBuilder

WithSendTime sets the send time of the msg.

func (MoveMsgBuilder) WithSrc

func (m MoveMsgBuilder) WithSrc(src sim.Port) MoveMsgBuilder

WithSrc sets the source port of the msg.

type Platform

type Platform struct {
	Devices []*Device
}

Platform is the hardware platform that may include multiple CGRA devices.

type Side

type Side int

Side defines the side of a tile.

const (
	North Side = iota
	East
	South
	West
)

func (Side) Name

func (s Side) Name() string

Name returns the name of the side.

type Tile

type Tile interface {
	GetPort(side Side) sim.Port
	SetRemotePort(side Side, port sim.Port)
	MapProgram(program []string)
}

Tile defines a tile in the CGRA.

Jump to

Keyboard shortcuts

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