|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.base.Nameable
byucc.jhdl.base.Node
byucc.jhdl.base.Cell
byucc.jhdl.base.Structural
byucc.jhdl.Logic.LogicGates
byucc.jhdl.Logic.LogicStatic
byucc.jhdl.Logic.Logic
byucc.jhdl.Logic.Modules.arrayMult
Variable width array multiplier with the option of signed or unsigned multiply and generic pipeline depth.
As seen in the diagram, the multiplier will multiply the two inputs on the buses x and y and produce a product outputted on the pout bus. If the width of the pout (product) bus is less than the sum of the width of the x and y buses, then the most significant bits will be outputted with the least significant bits truncated off.
Other characterics of note:
The easiest way to instance the arrayMult
is by using static method calls in the
MULTIPLIERS class.
If desired, however, the constructor calls
may be made explicitly, as shown below.
First, you must import the Logic.Modules package:
import byucc.jhdl.Logic.Modules.*;
To instance a standard arrayMult, the following constructor would be used:
new arrayMult(this, x, y, null, pout, false, 0, "name");
Note: If there is no pipelining (pipedepth = 0), the enable signal
will not be used and should be passed as null.
To instance a signed, enabled, and pipelined arrayMult with
pipedepth 2, the constructor would be:
new arrayMult(this, x, y, en, pout, true, 2, "name");
For all available constructors, see
Constructor Summary or
Constructor Detail.
pipedepth
parameter of this divider does NOT represent
the latency of the divider but the frequency of a pipeline register.
pipedepth=0
means fully-combinational multiplier
pipedepth=1
means fully-pipelined multiplier
(one pipeline register per logic stage).
pipedepth=2
means place a pipeline register every
other stage
pipedepth=3
means place a pipeline register every
third stage
latency
method or by using the
getLatency
method once a multiplier has been constructed.
The number of pipeline stages (registers between multiplier stages)
can be calculated by following formula:
(Y=width(y) P=pipedepth and the operator '/' is
an integer divide (throw away remainder))
if P=0: pipline registers=0
otherwise: pipeline registers=
((Y-1)/P) + 1
Field Summary | |
static CellInterface[] |
cell_interface
Standard JHDL CellInterface. |
static boolean |
disableWarning
Field that will turn off the warning message that is given when the width of the y input is greater than the width of the x input in a pipelined multiplier. |
static boolean |
SIGNED
definition of SIGNED used in arrayMult |
static boolean |
UNSIGNED
definition of UNSIGNED used in arrayMult |
static boolean |
verbose
Field to turn on verbose creation of multipliers (tells the size of the multiplier, whether is is signed or not and the pipedepth). |
Fields inherited from class byucc.jhdl.Logic.Logic |
ABOVE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_LSB, ALIGN_MSB, ALIGN_RIGHT, ALIGN_TOP, BELOW, DOWN, EAST_OF, LEFT_OF, MAX_PACK, NORTH_OF, ON, ONTOP, ONTOP_OF, RIGHT_OF, SOUTH_OF, TOLEFT, TORIGHT, UNCONSTRAINED, UP, WEST_OF |
Fields inherited from class byucc.jhdl.Logic.LogicGates |
tech_mapper |
Constructor Summary | |
arrayMult(Node parent,
Wire x,
Wire y,
Wire clk_en,
Wire pout,
boolean sign,
int pipedepth)
Constructor without an instance name parameter. |
|
arrayMult(Node parent,
Wire x,
Wire y,
Wire clk_en,
Wire pout,
boolean sign,
int pipedepth,
java.lang.String instanceName)
Constructor with an instance name parameter. |
Method Summary | |
boolean |
cellInterfaceDeterminesUniqueNetlistStructure()
Method to indicate that the netlister can assume that the wires and the bound parameters in the cell interface uniquely determine a cell structure. |
void |
clock()
Clock method is used for behavioral pipelined similuation. |
static long |
compute(long x,
int lx,
long y,
int ly,
int lp,
boolean sign)
Compute method will provide a mathematically correct answer to what the multiplier would compute with the given parameters and inputs. |
boolean |
defaultSimulationModelIsBehavioral()
The default simulation model is behavioral. |
int |
getLatency()
Method to get the latency of a multiplier is already constructed. |
int |
getNumOfStages()
Method to get the number of pipelinable logic stages of a multiplier that is already constructed. |
void |
initUserDefinedNode(UserDefinedNode udn)
init method needed for UserDefinedSchematic interface. |
static int |
latency(int yWidth,
int pipedepth)
The latency method gives the latency in clock cycles of the module with the given input parameters. |
static int |
numOfStages(int yWidth)
Method that calculates the number of pipelinable logic stages (stages consist of mulitplier/adder units). |
void |
paint(UserDefinedNode udn)
paint method for UserDefinedSchematic interface. |
void |
propagate()
Propagate method for combinational behavioral simulation (no registers). |
void |
reset()
Reset method simply puts zeros onto pout wire and clears behavioral delay array. |
Methods inherited from class byucc.jhdl.base.Node |
addObservable, addSimulatorCallback, checkAll, delete, getBuildingFlag, getChildren, getChildrenEnumeration, getInstanceName, getParent, getParentCell, getRelatives, getSystem, getWires, optimize, orphanAllowed, printAllChildren, printTree, removeSimulatorCallback, setDefaultClock |
Methods inherited from class byucc.jhdl.base.Nameable |
caseSensitivity, caseSensitivity, disableNameClashChecking, getFullName, getFullNameNoTestBench, getHierNameNoTestBench, getInstanceNo, getInstanceNumber, getLeafName, getLeafName, getRelativeName, getUserName, getUserName, hasUserSpecifiedName, isDescendantOf, setInstanceNumber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean verbose
public static boolean disableWarning
public static final boolean UNSIGNED
public static final boolean SIGNED
public static CellInterface[] cell_interface
Constructor Detail |
public arrayMult(Node parent, Wire x, Wire y, Wire clk_en, Wire pout, boolean sign, int pipedepth)
arrayMultException
- Thrown when multiplier parameters
are invalid, impossible to implement, or when either
the x
or y
wire width is less
than 3 bits.public arrayMult(Node parent, Wire x, Wire y, Wire clk_en, Wire pout, boolean sign, int pipedepth, java.lang.String instanceName)
arrayMultException
- Thrown when multiplier parameters
are invalid, impossible to implement, or when either
the x
or y
wire width is less
than 3 bits.Method Detail |
public boolean cellInterfaceDeterminesUniqueNetlistStructure()
cellInterfaceDeterminesUniqueNetlistStructure
in class Cell
public void initUserDefinedNode(UserDefinedNode udn)
initUserDefinedNode
in interface UserDefinedSchematic
public void paint(UserDefinedNode udn)
paint
in interface UserDefinedSchematic
public static int latency(int yWidth, int pipedepth)
public int getLatency()
public static int numOfStages(int yWidth)
public int getNumOfStages()
public boolean defaultSimulationModelIsBehavioral()
defaultSimulationModelIsBehavioral
in class Structural
public void reset()
reset
in interface Clockable
reset
in class Structural
public void clock()
clock
in interface Clockable
clock
in class Structural
public void propagate()
propagate
in interface byucc.jhdl.base.Propagateable
propagate
in class Structural
public static long compute(long x, int lx, long y, int ly, int lp, boolean sign)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |