org.opencores.structure
Class NodeGPC

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

public class NodeGPC
extends IndexedNode

GPC, consisting of one 5->1 LUT and one FFs.

See Also:
IndexedNode

Field Summary
 NodeLUT a
          LUT inside this
static int CLK
          a's clock
private static int[] INPUT_CONF
          Precalculated table for input selection.
static int NINPUTS_LUT
          number of inputs for LUT
static int OUT
          a's output
 NodeFF ra
          FF inside this
static int RST
          a's async reset
static int SET
          a's async set
 
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
NodeGPC(NodeLUT a, NodeFF ra, boolean updateNets, NetGlobal fillWith)
          groups specified elements into one GPC
 
Method Summary
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 idx)
          returns GPCs x position.
 int posY()
          returns its y position
static int posY(int idx)
          returns GPCs 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
clone, duplicate, linkNets, setWidth, unlinkNets
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

NINPUTS_LUT

public static final int NINPUTS_LUT
number of inputs for LUT

CLK

public static final int CLK
a's clock

SET

public static final int SET
a's async set

RST

public static final int RST
a's async reset

OUT

public static final int OUT
a's output

a

public NodeLUT a
LUT inside this

ra

public NodeFF ra
FF inside this

INPUT_CONF

private static final int[] INPUT_CONF
Precalculated table for input selection.
Constructor Detail

NodeGPC

public NodeGPC(NodeLUT a,
               NodeFF ra,
               boolean updateNets,
               NetGlobal fillWith)
groups specified elements into one GPC
Parameters:
a - LUT
ra - FF connected to a's output
updateNets - whether nets should be relinked to new GPC
fillWith - this global net is set to unassigned inputs If parameters are null, they are ignored.

WARNING: no checking for FFs. Nets between x-rx have to be deleted manually

Method Detail

toString

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

posX

public static int posX(int idx)
returns GPCs x position.
Parameters:
idx - GPC index
Returns:
x position

posY

public static int posY(int idx)
returns GPCs y position.
Parameters:
idx - GPC 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.
Parameters:
stream - stream to write to
Overrides:
writeBitstream in class NodeRoutable