|
|||||||||||
| 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.FloatingPoint.toFloat
Fixed-point to floating-point converter (or integer to floating-point).
To learn about the floating-point format, see the FloatingPoint package summary.
The toFloat module can also be instanced
using static method calls in the FLOATINGPOINT class.
If desired, however, the constructor calls
may be made explicitly, as shown below.
First, you must import the Logic.Modules.FloatingPoint package:
import byucc.jhdl.Logic.Modules.FloatingPoint.*;
To instance a toFloat the following constructor would be used:
new toFloat (this, fixedWire, floatWire, fixedExponent, fixedIsSigned, floatExpWidth, pipelined, name);
For a more complete example, see examples/toFloatExample.java.
For example: 1000 (binary two's complement) = -8, but this takes five bits in signed-magnitude form (1(sign) 1000(magnitude)). All other four-bit two's complement representations fit in four bits in signed-magnitude form.
Solution: If the lowest negative number must be handled, sign-extend the input by one bit.
For all available constructors, see
Constructor Summary or
Constructor Detail.
| Field Summary | |
static CellInterface[] |
cell_interface
|
| 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 | |
toFloat(Node parent,
Wire fixedWire,
Wire floatWire,
int fixedExponent,
boolean fixedIsSigned,
int floatExponentWidth,
boolean pipelined)
Generates a fixed-to-float converter with a default instance name. |
|
toFloat(Node parent,
Wire fixedWire,
Wire floatWire,
int fixedExponent,
boolean fixedIsSigned,
int floatExponentWidth,
boolean pipelined,
java.lang.String instanceName)
Generates a fixed-to-float converter. |
|
| Method Summary | |
void |
clock()
Used by the simulator. |
void |
compute(BV fixedBV,
int fixedExponent,
FloatBV floatBV)
Computes a bit-accurate result without timing information. |
boolean |
defaultSimulationModelIsBehavioral()
Used by the simulator. |
int |
getLatency()
Returns the latency of the design. |
void |
propagate()
Used by the simulator. |
void |
reset()
Used by the simulator. |