org.opencores.structure
Class NodeRoutable

java.lang.Object
  |
  +--org.opencores.structure.Node
        |
        +--org.opencores.structure.NodeRoutable
Direct Known Subclasses:
IndexedNode, NodeSR

public class NodeRoutable
extends Node

Node, that can be routable - all nodes that are passed to routing phase should be NodeRoutable type.


Field Summary
 float cost
          Cost to get here, used by routing
private static float[] costs
          Cost per connection
 NodeRoutable[] neigh
          All neighbouring nodes.
static int[][] neighCoor
          Neighbours coordinates
static int NINPUTS_ROUTABLE
          Number of inputs for routable cell
 int nSegments
          Number of free segments left.
 int portsUnassigned
          Bit field, designating 0 for port that has routable connection and 1 for port without routable connection.
 Net[] segments
          Owners of wire segments.
 
Fields inherited from class org.opencores.structure.Node
dir, flag, fx, fy, INOUT, INPUT, link, name, nfx, nfy, OUTPUT, ports, temp, visited, weight, width, x, y
 
Constructor Summary
NodeRoutable(int width)
          Costructs new node.
NodeRoutable(int x, int y)
          Costruct dummy node, which is capable of routing, but does not hold any data
 
Method Summary
 float calcCost(int neighbourIdx)
          Calculates cost of connection c-neighbour Connection cost must be strictly greater than zero!
 boolean isConnectable(int port, int segment)
           
protected  int lessLoadedNeighbour()
          Returns less loaded neighbour index
static int opposite(int s)
          Returns segment index with opposite direction.
 void writeBitstream(BitStreamWriter stream)
          Writes (necessary) bistream representation of this object to stream.
 
Methods inherited from class org.opencores.structure.Node
clone, duplicate, linkNets, setWidth, toString, unlinkNets
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

NINPUTS_ROUTABLE

public static final int NINPUTS_ROUTABLE
Number of inputs for routable cell

neighCoor

public static final int[][] neighCoor
Neighbours coordinates

costs

private static final float[] costs
Cost per connection

cost

public float cost
Cost to get here, used by routing

neigh

public NodeRoutable[] neigh
All neighbouring nodes.

portsUnassigned

public int portsUnassigned
Bit field, designating 0 for port that has routable connection and 1 for port without routable connection.

segments

public Net[] segments
Owners of wire segments. IMPORTANT: NodeRoutable.segments designate where segment outputs relative to node, while architecture (in architecture specification) is defined different!

nSegments

public int nSegments
Number of free segments left.
Constructor Detail

NodeRoutable

public NodeRoutable(int width)
Costructs new node.
Parameters:
width - node width

NodeRoutable

public NodeRoutable(int x,
                    int y)
Costruct dummy node, which is capable of routing, but does not hold any data
Method Detail

isConnectable

public boolean isConnectable(int port,
                             int segment)
Returns:
true whether connection is possible for port port using wire segment segment/i>

calcCost

public float calcCost(int neighbourIdx)
Calculates cost of connection c-neighbour Connection cost must be strictly greater than zero!
Parameters:
neighbourIdx - dest segment; they should be connectable
Returns:
cost of connection

opposite

public static final int opposite(int s)
Returns segment index with opposite direction.
Parameters:
segment -  
Returns:
opposite segment to s

lessLoadedNeighbour

protected int lessLoadedNeighbour()
Returns less loaded neighbour index

writeBitstream

public void writeBitstream(BitStreamWriter stream)
                    throws java.io.IOException
Writes (necessary) bistream representation of this object to stream. This method writes bitstream for unused LUT and FF.
Parameters:
stream - stream to write to