org.opencores.structure
Class NodeIOC

java.lang.Object
  |
  +--org.opencores.structure.Node
        |
        +--org.opencores.structure.NodeRoutable
              |
              +--org.opencores.structure.IndexedNode
                    |
                    +--org.opencores.structure.NodeIOC

public class NodeIOC
extends IndexedNode


Field Summary
 int typeI
          input type
 int typeO
          output type
 
Fields inherited from class org.opencores.structure.IndexedNode
idx
 
Fields inherited from class org.opencores.structure.NodeRoutable
cost, costs, neigh, neighCoor, NINPUTS_ROUTABLE, nSegments, portsUnassigned, 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
NodeIOC()
          Constructs new node with given direction
NodeIOC(NodePort p, NetGlobal fillWith)
          Constructs new node based on port.
 
Method Summary
 java.lang.Object clone()
          creates new (unlinked) node with same parameters.
 void duplicate(NodeIOC n)
          duplicates parameters from n to this
static int indexOf(int x, int y)
          Returns index in array, based on position in matrix.
 boolean isConnectable(int pin, int segment)
           
 int posX()
          Returns its x position.
static int posX(int pi)
          returns port's x position.
 int posY()
          Returns its y position.
static int posY(int pi)
          Returns port's y position.
 java.lang.String toString()
           
 void writeBitstream(BitStreamWriter stream)
          Writes (necessary) bistream representation of this object to stream.
 
Methods inherited from class org.opencores.structure.NodeRoutable
calcCost, lessLoadedNeighbour, opposite
 
Methods inherited from class org.opencores.structure.Node
duplicate, linkNets, setWidth, unlinkNets
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

typeI

public int typeI
input type

typeO

public int typeO
output type
Constructor Detail

NodeIOC

public NodeIOC()
Constructs new node with given direction

NodeIOC

public NodeIOC(NodePort p,
               NetGlobal fillWith)
Constructs new node based on port.
Parameters:
fillWith - net to fill unused inputs with
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Node

clone

public java.lang.Object clone()
creates new (unlinked) node with same parameters.
Returns:
duplicated node
Overrides:
clone in class Node

duplicate

public void duplicate(NodeIOC n)
duplicates parameters from n to this
Parameters:
n - node to copy data from

posX

public static int posX(int pi)
returns port's x position. Ports are arranged: {(0..X-1,0),(0..X-1,Y-1),(0,0..Y-1),(X-1,0..Y-1)}
Parameters:
pi - port index
Returns:
x position

posY

public static int posY(int pi)
Returns port's y position. Ports are arranged: {(0..X-1,0),(0..X-1,Y-1),(0,0..Y-1),(X-1,0..Y-1)}
Parameters:
pi - port index
Returns:
y position

posX

public int posX()
Returns its x position.
Returns:
x position
Overrides:
posX in class IndexedNode

posY

public int posY()
Returns its y position.
Returns:
y position
Overrides:
posY in class IndexedNode

indexOf

public static int indexOf(int x,
                          int y)
Returns index in array, based on position in matrix.
Parameters:
x - x position
y - y position
Returns:
array index

isConnectable

public boolean isConnectable(int pin,
                             int segment)
Returns:
true whether connection is possible for pin pin using wire segment segment/i>
Overrides:
isConnectable in class NodeRoutable

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
Overrides:
writeBitstream in class NodeRoutable