byucc.jhdl.Logic
Class Directive

java.lang.Object
  extended bybyucc.jhdl.Logic.Directive

public class Directive
extends java.lang.Object

The Directive class is meant to be used as a placement directive in Logic place calls like so:

place( Cell, Directive, Cell);

There are 10 Declared Directives in the Logic class and expert users can create there own. Each of the 10 directives have one of 5 different directions assoceiated with them. The Directives also contain optional Vertial and Horizontal alignment fields to how cells should be aligned when placeing with that particular directive. When alignment is used the Directive methods return a new directive so that future use of the Directive will not be affected. This unfortunatley will create a lot of wasted objects, but they should be cleaned up after the cell is placed, since they are no longer needed.


Method Summary
 Directive align(int va, int ha)
          This method constructs a new Directive and sets the Horizontal and vertical alignment to specified values.
 Directive align(Wire wa)
          This method constructs a new Directive and sets the alignment to ALIGN_CENTER and the alignment wire to the specified wire.
 Directive alignBottom()
          This method constructs a new Directive and sets the Vertical alignment to ALIGN_BOTTOM.
 Directive alignCenter()
          This method constructs a new Directive and sets the Horizontal and vertical alignment to ALIGN_CENTER.
 Directive alignCenter(Wire wa)
          This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_CENTER.
 Directive alignLeft()
          This method constructs a new Directive and sets the Horizontal alignment to ALIGN_LEFT.
 Directive alignLSB()
          This method constructs a new Directive and sets the alignment to ALIGN_LSB.
 Directive alignLSB(Wire wa)
          This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_LSB.
 Directive alignMSB()
          This method constructs a new Directive and sets the alignment to ALIGN_MSB.
 Directive alignMSB(Wire wa)
          This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_MSB.
 Directive alignRight()
          This method constructs a new Directive and sets the Horizontal alignment to ALIGN_RIGHT.
 Directive alignTop()
          This method constructs a new Directive and sets the Vertical alignment to ALIGN_TOP.
 Wire getAlignmentWire()
          This method returns the alignment Wire associated with this Directive.
 int getDirection()
          This method returns the direction associated with this Directive.
 int getHAlign()
          This method returns the horizontal alignment associated with this Directive.
 int getVAlign()
          This method returns the vertical alignment associated with this Directive.
 boolean isPortAligned()
          This method returns a boolean that indicates whether this Directive has a Wire associated with it for Placement based on port alignment.
 Directive setAlignment(int VertAlignment, int HorAlignment)
          This method sets the Vertical and Horizontal alignment of the associated Directive.
 Wire setAlignmentWire(Wire wa)
          This method sets the alignment Wire associated with this Directive.
 Directive setHorizontalAlignment(int ha)
          This method sets the Horizontal alignment of the associated Directive.
 Directive setVerticalAlignment(int va)
          This method sets the Vertical alignment of the associated Directive.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setAlignment

public Directive setAlignment(int VertAlignment,
                              int HorAlignment)
This method sets the Vertical and Horizontal alignment of the associated Directive. The possible values for Vertical and Horizontal Alignment are listed in byucc.jhdl.Logic.Logic Both alignment fields are only necessary when using the ONTOP_OF Directive.

Parameters:
VertAlignment - An integer to represent the Vertical Alignment to set this Directive to.
HorAlignment - An integer to represent the Horizontal Alignment to set this Directive to.
Returns:
This Directive with its alignment set to the new values.

setVerticalAlignment

public Directive setVerticalAlignment(int va)
This method sets the Vertical alignment of the associated Directive. The possible values for Vertical Alignment are listed in byucc.jhdl.Logic.Logic. The vertical alignment field only applies when using certain Directives.

Parameters:
va - An integer to represent the Vertical Alignment to set this Directive to.
Returns:
This Directive with its alignment set to the new value.

setHorizontalAlignment

public Directive setHorizontalAlignment(int ha)
This method sets the Horizontal alignment of the associated Directive. The possible values for Horizontal Alignment are listed in byucc.jhdl.Logic.Logic. The horizontal alignment field only applies when using certain Directives.

Parameters:
ha - An integer to represent the Horizontal Alignment to set this Directive to.
Returns:
This Directive with its alignment set to the new value.

alignBottom

public Directive alignBottom()
This method constructs a new Directive and sets the Vertical alignment to ALIGN_BOTTOM. The new Directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its vertical alignment set to ALIGN_BOTTOM.

alignTop

public Directive alignTop()
This method constructs a new Directive and sets the Vertical alignment to ALIGN_TOP. The new Directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its vertical alignment set to ALIGN_TOP.

alignLeft

public Directive alignLeft()
This method constructs a new Directive and sets the Horizontal alignment to ALIGN_LEFT. The new Directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its horizontal alignment set to ALIGN_LEFT.

alignRight

public Directive alignRight()
This method constructs a new Directive and sets the Horizontal alignment to ALIGN_RIGHT. The new Directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its horizontal alignment set to ALIGN_RIGHT.

alignCenter

public Directive alignCenter()
This method constructs a new Directive and sets the Horizontal and vertical alignment to ALIGN_CENTER. The new Directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its vertical and horizontal alignment set to ALIGN_CENTER.

align

public Directive align(int va,
                       int ha)
This method constructs a new Directive and sets the Horizontal and vertical alignment to specified values. The new Directive is returned so that future uses of the same Directive are not affected.

Parameters:
va - Vertical Alignment value
ha - Horizontal Alignment value
Returns:
A new Directive with its vertical and horizontal alignment set to va and ha respectively

align

public Directive align(Wire wa)
This method constructs a new Directive and sets the alignment to ALIGN_CENTER and the alignment wire to the specified wire. This is meant to be used with port placement and will align based on the CENTER bit of the alignment wire of this Directive. The new directive is returned so that future uses of the same Directive are not affected.

Parameters:
wa - The Wire to align with.
Returns:
A new Directive with its alignment set to ALIGN_LSB of wa.

alignLSB

public Directive alignLSB()
This method constructs a new Directive and sets the alignment to ALIGN_LSB. This is meant to be used with port placement and will align based on the LSB of the alignment wire of this Directive, if no alignment Wire has been specifed The default action will be to align bottom. The new directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its alignment set to ALIGN_LSB.

alignMSB

public Directive alignMSB()
This method constructs a new Directive and sets the alignment to ALIGN_MSB. This is meant to be used with port placement and will align based on the MSB of a wire. The new directive is returned so that future uses of the same Directive are not affected.

Returns:
A new Directive with its alignment set to ALIGN_MSB.

alignCenter

public Directive alignCenter(Wire wa)
This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_CENTER. This is meant to be used with port placement and will align based on the CENTER bit of a wire. The new directive is returned so that future uses of the same Directive are not affected.

Parameters:
wa - The wire with which to align by.
Returns:
A new Directive with its alignment set to ALIGN_CENTER.

alignLSB

public Directive alignLSB(Wire wa)
This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_LSB. This is meant to be used with port placement and will align based on the LSB of a wire. The new Directive is returned so that future uses of this Directive are not affected.

Parameters:
wa - The wire with which to align by.
Returns:
A new directive with its alignment set to ALIGN_LSB.

alignMSB

public Directive alignMSB(Wire wa)
This method constructs a new Directive with the specified wire as the wire to align with and sets the alignment to ALIGN_MSB. This is meant to be used with port placement and will align based on the MSB of a wire. The new Directive is returned so that future uses of the same Directive are not affected.

Parameters:
wa - The wire with which to align by.
Returns:
A new Directive with its alignment set to ALIGN_MSB.

getAlignmentWire

public Wire getAlignmentWire()
This method returns the alignment Wire associated with this Directive.

Returns:
The alignment Wire of this Directive (byucc.jhdl.base.Wire)

setAlignmentWire

public Wire setAlignmentWire(Wire wa)
This method sets the alignment Wire associated with this Directive.

Parameters:
wa - The alignment Wire to be used for this Directive (byucc.jhdl.base.Wire)

getDirection

public int getDirection()
This method returns the direction associated with this Directive.

Returns:
An integer representation of this Directive's Direction.

getVAlign

public int getVAlign()
This method returns the vertical alignment associated with this Directive.

Returns:
An integer representation of this Directive's Vertical Alignment.

getHAlign

public int getHAlign()
This method returns the horizontal alignment associated with this Directive.

Returns:
An integer representation of this Directive's Horizontal Alignment.

isPortAligned

public boolean isPortAligned()
This method returns a boolean that indicates whether this Directive has a Wire associated with it for Placement based on port alignment.

Returns:
true if portAligned, false if not portAligned.

toString

public java.lang.String toString()


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.