All Packages Class Hierarchy This Package Previous Next Index
Class byucc.jhdl.Xilinx.XC4000.Shifter
java.lang.Object
|
+----byucc.jhdl.base.Nameable
|
+----byucc.jhdl.base.Node
|
+----byucc.jhdl.base.Cell
|
+----byucc.jhdl.base.Structural
|
+----byucc.jhdl.Logic.Logic
|
+----byucc.jhdl.Xilinx.XC4000.Shifter
- public final class Shifter
- extends Logic
- implements PreDefinedSchematic
The Shifter class implements a generic wire shift. It does this
using buffers and vcc / gnd symbols. It implements all shift
types: arithmetic shift right, logical shift right, and logical
shift left. It accepts wires of any width.
-
cell_interface
-
-
LEFT
- Simple flag for identifying the left-shift direction in the
constructor call.
-
RIGHT
- Simple flag for identifying the right-shift direction in the
constructor call.
-
Shifter(Node, Wire, Wire, int, boolean, boolean)
- Constructs a Shifter that shifts the
in Wire
parameter, with the out Wire parameter as output,
and with the shift amount, direction, and mode given by the
integer and boolean parameters.
-
cellInterfaceDeterminesUniqueNetlistStructure()
- The port interface for Shifter:
i: in ("n")
o: out ("n")
parameter: "n" (INTEGER).
-
getCellName()
- Returns the netlist-name of the Shifter, which is:
-
ashift<wire_width>r<shift_amount>, for arithmetic shift right;
-
shift<wire_width>r<shift_amount>, for logical shift right;
-
shift<wire_width>l<shift_amount>, for
logical shift left.
-
type()
-
cell_interface
public static CellInterface cell_interface[]
LEFT
public static final boolean LEFT
- Simple flag for identifying the left-shift direction in the
constructor call.
RIGHT
public static final boolean RIGHT
- Simple flag for identifying the right-shift direction in the
constructor call.
Shifter
public Shifter(Node parent,
Wire in,
Wire out,
int shift,
boolean direction,
boolean arithmetic)
- Constructs a Shifter that shifts the
in Wire
parameter, with the out Wire parameter as output,
and with the shift amount, direction, and mode given by the
integer and boolean parameters.
- Parameters:
- parent - The
Node to be used as the
hierarchical parent of the Shifter.
- in - The wire to be used as the input to the Shifter.
- out - The wire to be used as the output to the Shifter.
- shift - This shift amount.
- direction - The direction of shift -- Shifter.LEFT passed
in makes a left-shift be implemented; Shifter.RIGHT passed in
makes a right-shifted.
- arithmetic -
True if an arithmetic shift is to
be implemented.
cellInterfaceDeterminesUniqueNetlistStructure
public boolean cellInterfaceDeterminesUniqueNetlistStructure()
- The port interface for Shifter:
i: in ("n")
o: out ("n")
parameter: "n" (INTEGER). This parameter represents the
generic port width of Shifter.
- Overrides:
- cellInterfaceDeterminesUniqueNetlistStructure in class Cell
getCellName
public String getCellName()
- Returns the netlist-name of the Shifter, which is:
-
ashift<wire_width>r<shift_amount>, for arithmetic shift right;
-
shift<wire_width>r<shift_amount>, for logical shift right;
-
shift<wire_width>l<shift_amount>, for
logical shift left.
- Returns:
- The netlist-name
String of the Shifter.
- Overrides:
- getCellName in class Cell
type
public int type()
All Packages Class Hierarchy This Package Previous Next Index