at.dms.kjc.spacedynamic
Class RawChip

java.lang.Object
  extended by at.dms.kjc.spacedynamic.RawChip

public class RawChip
extends Object

This class represents the RawChip we are compiling to *


Field Summary
static int cacheLineBytes
           
static int cacheLineWords
           
static int dCacheSizeBytes
           
 
Constructor Summary
RawChip(int xSize, int ySize)
           
 
Method Summary
 boolean areNeighbors(ComputeNode tile1, ComputeNode tile2)
           
 void connectDevice(IODevice dev, IOPort port)
           
 ComputeNode getComputeNode(int x, int y)
           
 String getDirection(ComputeNode from, ComputeNode to)
           
 IOPort getIOPort(int i)
           
 int getNumPorts()
           
 int getSimulatedXSize()
           
 int getSimulatedYSize()
           
 RawTile getTile(int tileNumber)
           
 RawTile getTile(int x, int y)
           
 int getTotalSimulatedTiles()
           
 int getTotalTiles()
           
 int getXDir(ComputeNode src, ComputeNode dst)
          get the direction in X from src to dst, -1 for west 0 for same X, and 1 for east
 int getXSize()
          Return the number of tiles in the Y direction for the chip configuration.
 int getYDir(ComputeNode src, ComputeNode dst)
          get the direction in Y from src to dst, -1 for North 0 for same and 1 for south.
 int getYSize()
          Return the number of tiles in the Y direction for the chip configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheLineBytes

public static final int cacheLineBytes
See Also:
Constant Field Values

cacheLineWords

public static final int cacheLineWords
See Also:
Constant Field Values

dCacheSizeBytes

public static final int dCacheSizeBytes
See Also:
Constant Field Values
Constructor Detail

RawChip

public RawChip(int xSize,
               int ySize)
Method Detail

getNumPorts

public int getNumPorts()

getIOPort

public IOPort getIOPort(int i)

connectDevice

public void connectDevice(IODevice dev,
                          IOPort port)

getTile

public RawTile getTile(int tileNumber)

getComputeNode

public ComputeNode getComputeNode(int x,
                                  int y)

getTile

public RawTile getTile(int x,
                       int y)

getTotalTiles

public int getTotalTiles()
Returns:
The total number of tiles for the configuration we are targeting (this is either 4 or 8).

getTotalSimulatedTiles

public int getTotalSimulatedTiles()
Returns:
The total number of tiles for the configuration we are simulating (remember this might not be equal to the number of tiles we are targeting on the simulator or the actual chip).

getXSize

public int getXSize()
Return the number of tiles in the Y direction for the chip configuration.

Returns:
the number of tiles in the Y direction for the chip configuration.

getYSize

public int getYSize()
Return the number of tiles in the Y direction for the chip configuration.

Returns:
the number of tiles in the Y direction for the chip configuration.

getSimulatedXSize

public int getSimulatedXSize()
Returns:
The number of tiles in the x direction for the chip size we would like to simulate (as passed by the user).

getSimulatedYSize

public int getSimulatedYSize()
Returns:
The number of tiles in the y direction for the chip size we would like to simulate (as passed by the user).

areNeighbors

public boolean areNeighbors(ComputeNode tile1,
                            ComputeNode tile2)

getXDir

public int getXDir(ComputeNode src,
                   ComputeNode 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(ComputeNode src,
                   ComputeNode dst)
get the direction in Y from src to dst, -1 for North 0 for same and 1 for south.


getDirection

public String getDirection(ComputeNode from,
                           ComputeNode to)