at.dms.kjc.spacetime
Class RawProcElements

java.lang.Object
  extended by at.dms.kjc.spacetime.RawProcElements
Direct Known Subclasses:
RawChip

public class RawProcElements
extends Object

The processing devices for RAW. This level deals with co-ordinates and I/O devices. It has tiles and offchip devices and ports, etc. See RawChip for data / routines dealing with RawTiles.

Author:
gordon refactored dimock

Field Summary
protected  IODevice[] devices
           
protected  int gXSize
           
protected  int gYSize
           
protected  RawTile[][] tiles
           
 
Constructor Summary
RawProcElements(int xSize, int ySize)
          Data strucures for a xSize x ySize raw chip.
 
Method Summary
 boolean areNeighbors(RawComputeNode tile1, RawComputeNode tile2)
           
 RawComputeNode getComputeNode(int x, int y)
           
 IODevice[] getDevices()
           
 String getDirection(RawComputeNode from, RawComputeNode to)
           
 SwitchIPort getIPort(RawComputeNode from, RawComputeNode to)
           
 SwitchIPort getIPort2(RawComputeNode from, RawComputeNode to)
           
 int getNumDev()
           
 SwitchOPort getOPort(RawComputeNode from, RawComputeNode to)
           
 SwitchOPort getOPort2(RawComputeNode from, RawComputeNode to)
           
 int getXDir(RawComputeNode src, RawComputeNode dst)
          get the direction in X from src to dst, -1 for west 0 for same X, and 1 for east
 int getXSize()
           
 int getYDir(RawComputeNode src, RawComputeNode dst)
          get the direction in Y from src to dst, -1 for North 0 for same and 1 for south.
 int getYSize()
           
 int manhattanDistance(RawComputeNode n1, RawComputeNode n2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

devices

protected IODevice[] devices

gXSize

protected int gXSize

gYSize

protected int gYSize

tiles

protected RawTile[][] tiles
Constructor Detail

RawProcElements

public RawProcElements(int xSize,
                       int ySize)
Data strucures for a xSize x ySize raw chip.

Parameters:
xSize -
ySize -
Method Detail

getXSize

public int getXSize()

getYSize

public int getYSize()

getNumDev

public int getNumDev()

getDevices

public IODevice[] getDevices()

getXDir

public int getXDir(RawComputeNode src,
                   RawComputeNode dst)
get the direction in X from src to dst, -1 for west 0 for same X, and 1 for east


getYDir

public int getYDir(RawComputeNode src,
                   RawComputeNode dst)
get the direction in Y from src to dst, -1 for North 0 for same and 1 for south.


manhattanDistance

public int manhattanDistance(RawComputeNode n1,
                             RawComputeNode n2)
Parameters:
n1 -
n2 -
Returns:
The hops between
n1
and
n2
.

areNeighbors

public boolean areNeighbors(RawComputeNode tile1,
                            RawComputeNode tile2)
Parameters:
tile1 -
tile2 -
Returns:
True if
tile1
neighbors
tile2
.

getComputeNode

public RawComputeNode getComputeNode(int x,
                                     int y)

getDirection

public String getDirection(RawComputeNode from,
                           RawComputeNode to)

getOPort

public SwitchOPort getOPort(RawComputeNode from,
                            RawComputeNode to)

getOPort2

public SwitchOPort getOPort2(RawComputeNode from,
                             RawComputeNode to)

getIPort

public SwitchIPort getIPort(RawComputeNode from,
                            RawComputeNode to)

getIPort2

public SwitchIPort getIPort2(RawComputeNode from,
                             RawComputeNode to)