org.opencores.structure
Class Channel

java.lang.Object
  |
  +--org.opencores.structure.Channel

public class Channel
extends java.lang.Object

Class that represents horizontal or vertical channel.

Channel connect two adjacent switch boxes.

Each channel is attached to node (share same source position) and consists of multiple wire segments. nets Net array identifies which of them are still free.

Nodes are adjacent when there exist wire segment between them.

List of all nodes channel connects to can be constructed.

See Also:
adjacentChannels

Field Summary
 Channel[] adjacentChannels
          List of all adjacent channels.
 float cost
          Used by wave algorithm - cost to this node
 Net[] nets
          Nets going through this channel, each allocating one wire segment.
 int nNets
          Number of nets allocated on this channel.
 Node node
          Node channel is connected to.
 int x
          This channel position.
 int y
          This channel position.
 
Constructor Summary
Channel(int x, int y)
          Constructs new channel.
 
Method Summary
 int maxSegments()
          Returns max. segments per way
static int switchsTo(int segment, int channel)
          Identifies which segment we will reach, if we are on segment segment and going to neighbour index channel.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

x

public int x
This channel position.

y

public int y
This channel position.

node

public Node node
Node channel is connected to.

adjacentChannels

public Channel[] adjacentChannels
List of all adjacent channels.

cost

public float cost
Used by wave algorithm - cost to this node

nets

public Net[] nets
Nets going through this channel, each allocating one wire segment.

nNets

public int nNets
Number of nets allocated on this channel.
Constructor Detail

Channel

public Channel(int x,
               int y)
Constructs new channel.
Parameters:
idx - channel position
Method Detail

maxSegments

public int maxSegments()
Returns max. segments per way
Returns:
number of used segments

switchsTo

public static final int switchsTo(int segment,
                                  int channel)
Identifies which segment we will reach, if we are on segment segment and going to neighbour index channel. This transform is based on USM.
Parameters:
segment - segment we are on
channel - index of neighbour
Returns:
neighbours segment, negative if invalid move
See Also: