|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectbyucc.jhdl.util.BVFormat.FieldFormat
byucc.jhdl.util.BVFormat.FieldFormatInteger
Abstract class used as the base for all Integer (non-fixed point) fields.
| Field Summary | |
protected int |
bottom
Bottom bit of range of field. |
protected int |
top
Top bit of range of field. |
| Fields inherited from class byucc.jhdl.util.BVFormat.FieldFormat |
minWidth |
| Constructor Summary | |
FieldFormatInteger(int top,
int bottom,
int minWidth)
Constructs a new FieldFormatInteger object with the specified range. |
|
| Method Summary | |
protected java.lang.String |
formatField(BV field,
boolean fractional)
Method required to be implemented by FieldFormat. |
protected abstract java.lang.String |
formatFieldInteger(BV field,
boolean fractional)
Abstract method to be implemented by subclasses. |
static java.lang.String |
fraction2DecimalString(BV fraction)
Takes a BV which represents a fractional portion of a number and converts it to a decimal string. |
int |
getBottom()
Gets the bottom bit of the range of the field. |
int |
getTop()
Gets the top bit of the range of the field. |
| Methods inherited from class byucc.jhdl.util.BVFormat.FieldFormat |
formatField, getMinWidth |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int top
protected int bottom
| Constructor Detail |
public FieldFormatInteger(int top,
int bottom,
int minWidth)
top - Top (most-significant) bit of the range.bottom - Bottom (lease-significant) bit of the range.minWidth - Optional minimum width. A value less than or equal to
zero means that there is no minumum width.| Method Detail |
public int getTop()
public int getBottom()
protected final java.lang.String formatField(BV field,
boolean fractional)
formatField in class FieldFormatfield - This BV is the entire BV. The correct ranges will need to be
gotten by subclasses of this class.fractional - Tells whether or not this field represents a
fraction (if true) or a whole number (if false).
protected abstract java.lang.String formatFieldInteger(BV field,
boolean fractional)
field - BV representing the field.fractional - Tells whether or not this field represents a
fraction (if true) or a whole number (if false).public static java.lang.String fraction2DecimalString(BV fraction)
fraction - BV representing the fraction to be converted.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||