byucc.jhdl.util.BVFormat
Class FieldFormatHex
java.lang.Object
byucc.jhdl.util.BVFormat.FieldFormat
byucc.jhdl.util.BVFormat.FieldFormatInteger
byucc.jhdl.util.BVFormat.FieldFormatHex
- public class FieldFormatHex
- extends FieldFormatInteger
FieldFormat class used for formatting hexadecimal.
Field Summary |
protected static BV |
zero_width1
BV used to pad BVs which are to be converted to fractional hex. |
protected static BV |
zero_width2
BV used to pad BVs which are to be converted to fractional hex. |
protected static BV |
zero_width3
BV used to pad BVs which are to be converted to fractional hex. |
Constructor Summary |
FieldFormatHex(int top,
int bottom,
int width)
Constructor which simply specifies the width of the field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zero_width1
protected static final BV zero_width1
- BV used to pad BVs which are to be converted to fractional hex. The width is 1 and
the value is zero.
zero_width2
protected static final BV zero_width2
- BV used to pad BVs which are to be converted to fractional hex. The width is 2 and
the value is zero.
zero_width3
protected static final BV zero_width3
- BV used to pad BVs which are to be converted to fractional hex. The width is 3 and
the value is zero.
FieldFormatHex
public FieldFormatHex(int top,
int bottom,
int width)
- Constructor which simply specifies the width of the field.
- Parameters:
top
- Top (most-significant) bit of the range.bottom
- Bottom (lease-significant) bit of the range.
formatFieldInteger
public java.lang.String formatFieldInteger(BV field,
boolean fractional)
- Formats a field.
- Specified by:
formatFieldInteger
in class FieldFormatInteger
- Parameters:
field
- BV which represents the field to be formatted.fractional
- Tells whether or not this field represents a
fraction (if true) or a whole number (if false).
- Returns:
- String version of the field.
Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.