FloatingPoint32 class
Single floating point representation.
- Inheritance
-
- Object
- LogicStructure
- FloatingPoint
- FloatingPoint32
- Available extensions
Constructors
- FloatingPoint32.new({String? name})
- Construct a 32-bit (single-precision) floating point number.
Properties
- arrayIndex → int?
-
If this is a part of a LogicArray, the index within that array.
Othwerise, returns
null
.no setterinherited - bias → Logic
-
Return the exponent Logic representing the bias of this
FloatingPoint signal, the offset of the exponent, also representing the
zero exponent
2^0 = 1
.latefinalinherited - bit → LogicValue
-
The current active value of this signal if it has width 1, as
a LogicValue.
no setterinherited
-
changed
→ Stream<
LogicValueChanged> -
A Stream of
LogicValueChanged
events which triggers at most once per Simulator tick, iff the value of the Logic has changed.latefinalinherited -
dstConnections
→ Iterable<
Logic> -
An Iterable of all
Logic
s that are being directly driven bythis
.no setterinherited -
elements
→ List<
Logic> -
All elements of this structure.
latefinalinherited
- explicitJBit → bool
-
Return
true
if the J-bit is explicitly represented in the mantissa.finalinherited - exponent → Logic
-
unsigned, biased binary exponent.
finalinherited
- floatingPointValue → FloatingPointValue
-
Return the FloatingPointValue of the current value.
no setterinherited
-
glitch
→ SynchronousEmitter<
LogicValueChanged> -
A stream of
LogicValueChanged
events for every time the signal transitions at any time during a Simulator tick.latefinalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasNets → bool
-
Indicates whether this structure or any of its elements isNet.
no setterinherited
- isAnInfinity → Logic
-
Return a Logic
1
if this FloatingPoint is an infinity by having its exponent field set to the NaN value (typically all ones) and a zero mantissa.latefinalinherited - isArrayMember → bool
-
True if this is a member of a LogicArray.
no setterinherited
- isAZero → Logic
-
Return a Logic
1
if this FloatingPoint is a zero by having its exponent field set to the NaN value (typically all ones) and a zero mantissa.latefinalinherited - isInOut → bool
-
Returns true iff this signal is an inOut of its parent Module.
latefinalinherited
- isInput → bool
-
Returns true iff this signal is an input of its parent Module.
latefinalinherited
- isNaN → Logic
-
Return a Logic
1
if this FloatingPoint is Not a Number (NaN) by having its exponent field set to the NaN value (typically all ones) and a non-zero mantissa.latefinalinherited - isNet → bool
-
Indicates whether this signal behaves like a LogicNet, allowing multiple
drivers.
no setterinherited
- isNormal → Logic
-
Return a Logic
1
if this FloatingPoint contains a normal number, defined as having mantissa in the range[1,2)
.latefinalinherited - isOutput → bool
-
Returns true iff this signal is an output of its parent Module.
latefinalinherited
- isPort → bool
-
Returns true iff this signal is an input, output, or inOut of its parent
Module.
latefinalinherited
-
leafElements
→ List<
Logic> -
A list of all leaf-level elements at the deepest hierarchy of this
structure provided in index order.
latefinalinherited
- mantissa → Logic
-
unsigned binary mantissa.
finalinherited
- name → String
-
The name of this signal.
finalinherited
- naming → Naming
-
Controls the naming (and renaming) preferences of this signal in generated
outputs.
no setterinherited
- nan → FloatingPoint
-
Construct a FloatingPoint that represents NaN for this FP type.
latefinalinherited
-
negedge
→ Stream<
LogicValueChanged> -
A Stream of
LogicValueChanged
events which triggers at most once per Simulator tick, iff the value of the Logic has changed from1
to0
.no setterinherited -
nextChanged
→ Future<
LogicValueChanged> -
Triggers at most once, the next time that this Logic changes
value at the end of a Simulator tick.
no setterinherited
-
nextNegedge
→ Future<
LogicValueChanged> -
Triggers at most once, the next time that this Logic changes
value at the end of a Simulator tick from
1
to0
.no setterinherited -
nextPosedge
→ Future<
LogicValueChanged> -
Triggers at most once, the next time that this Logic changes
value at the end of a Simulator tick from
0
to1
.no setterinherited - oneExponent → Logic
-
Return the one exponent representation for this type of FloatingPoint.
latefinalinherited
- packed → Logic
-
Packs all elements into one flattened Logic bus.
latefinalinherited
- parentModule → Module?
-
The Module that this Logic exists within.
no setterinherited
- parentStructure → LogicStructure?
-
If this is a part of a LogicStructure, the structure which this is
a part of. Otherwise,
null
.no setterinherited -
posedge
→ Stream<
LogicValueChanged> -
A Stream of
LogicValueChanged
events which triggers at most once per Simulator tick, iff the value of the Logic has changed from0
to1
.no setterinherited - previousFloatingPointValue → FloatingPointValue?
-
Return the FloatingPointValue of the previousValue.
no setterinherited
- previousValue → LogicValue?
-
The value of this signal before the most recent Simulator.tick had
completed. It will be
null
before the first tick after this signal is created.no setterinherited - reversed → Logic
-
Returns a version of this Logic with the bit order reversed.
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign → Logic
-
sign bit with '1' representing a negative number.
finalinherited
- srcConnection → Logic?
-
A LogicStructure never has a direct source driving it, only its
elements do, so always returns
null
.no setterinherited -
srcConnections
→ Iterable<
Logic> -
All
Logic
s drivingthis
, if any.no setterinherited - structureName → String
-
Returns the name relative to the parentStructure-defined hierarchy, if
one exists. Otherwise, this is the same as name.
no setterinherited
- subNormalAsZero → bool
-
Return
true
if subnormal numbers are represented as zero.finalinherited - value → LogicValue
-
The current active value of this signal.
no setterinherited
- valueBigInt → BigInt
-
The current valid active value of this signal as a BigInt.
no setterinherited
- valueInt → int
-
The current valid active value of this signal as an int.
no setterinherited
- width → int
-
The number of bits in this signal.
latefinalinherited
- zeroExponent → Logic
-
Return the zero exponent representation for this type of FloatingPoint.
latefinalinherited
Methods
-
abs(
) → Logic -
Calculates the absolute value of a signal, assuming that the
number is a two's complement.
inherited
-
and(
) → Logic -
Unary AND.
inherited
-
assignSubset(
List< Logic> updatedSubset, {int start = 0}) → void -
Performs an assignment operation on a portion this signal to be driven by
updatedSubset
. Each index ofupdatedSubset
will be assigned to drive the corresponding index, plusstart
, of this signal.inherited -
clone(
{String? name}) → FloatingPoint32 -
Creates a new LogicStructure with the same structure as
this
and cloned elements, optionally with the providedname
.override -
decr(
{Logic s(Logic p1)?, dynamic val = 1}) → Conditional -
Decrements each element of elements using Logic.decr.
inherited
-
divAssign(
dynamic val, {Logic s(Logic p1)?}) → Conditional -
Divide-assigns each element of elements using Logic.divAssign.
inherited
-
eq(
dynamic other) → Logic -
Equal
inherited
-
getRange(
int startIndex, [int? endIndex]) → Logic -
Returns a subset Logic. It is inclusive of
startIndex
, exclusive ofendIndex
.inherited -
gets(
Logic other) → void -
Connects this Logic directly to be driven by
other
.inherited -
gt(
dynamic other) → Logic -
Greater-than.
inherited
-
gte(
dynamic other) → Logic -
Greater-than-or-equal-to.
inherited
-
hasValidValue(
) → bool -
Returns
true
iff the value of this signal is valid (nox
orz
).inherited -
incr(
{Logic s(Logic p1)?, dynamic val = 1}) → Conditional -
Increments each element of elements using Logic.incr.
inherited
-
inf(
{Logic? sign, bool negative = false}) → FloatingPoint -
Construct a FloatingPoint that represents infinity for this FP type.
inherited
-
inject(
dynamic val, {bool fill = false}) → void -
Injects a value onto this signal in the current Simulator tick.
inherited
-
isFloating(
) → bool -
Returns
true
iff all bits of the current value are floating (z
).inherited -
isIn(
List list) → Logic -
Returns
1
(of width=1) if the Logic calling this function is inlist
. Else0
(of width=1) if not present.inherited -
lt(
dynamic other) → Logic -
Less-than.
inherited
-
lte(
dynamic other) → Logic -
Less-than-or-equal-to.
inherited
-
makeUnassignable(
{String? reason}) → void -
Makes it so that this signal cannot be assigned by any full (
<=
) or conditional (<
) assignment.inherited -
mulAssign(
dynamic val, {Logic s(Logic p1)?}) → Conditional -
Multiply-assigns each element of elements using Logic.mulAssign.
inherited
-
named(
String name, {Naming? naming}) → LogicStructure -
Makes a clone, optionally with the specified
name
, then assigns it to be driven bythis
.inherited -
negate(
) → FloatingPoint -
Negate the FloatingPoint.
inherited
-
neq(
dynamic other) → Logic -
Not Equal
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
or(
) → Logic -
Unary OR.
inherited
-
pow(
dynamic exponent) → Logic -
Power operation
inherited
-
put(
dynamic val, {bool fill = false}) → void -
Puts a value
val
onto this signal, which may or may not be picked up for changed in this Simulator tick.inherited -
replicate(
int multiplier) → Logic -
Returns a replicated signal using ReplicationOp with new width =
this.width *
multiplier
inherited -
resolveSubNormalAsZero(
) → FloatingPoint -
Convert the current FloatingPoint to a new FloatingPoint but with the
mantissa resolved if not isNormal and subNormalAsZero is
true
.inherited -
rotateLeft(
dynamic rotateAmount, {int? maxAmount}) → Logic -
Available on Logic, provided by the RotateLogic extension
Returns a Logic rotated left byrotateAmount
. -
rotateRight(
dynamic rotateAmount, {int? maxAmount}) → Logic -
Available on Logic, provided by the RotateLogic extension
Returns a Logic rotated right byrotateAmount
. -
selectFrom(
List< Logic> busList, {Logic? defaultValue}) → Logic -
Performs a Logic
index
based selection on an List of Logic namedbusList
.inherited -
signExtend(
int newWidth) → Logic -
Returns a new Logic width width
newWidth
where new bits added are sign bits as the most significant bits. The sign is determined using two's complement, so it takes the most significant bit of the original signal and extends with that.inherited -
slice(
int endIndex, int startIndex) → Logic -
Accesses a subset of this signal from
startIndex
toendIndex
, both inclusive.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
valuePopulator(
) → FloatingPointValuePopulator< FloatingPoint32Value> -
A FloatingPointValuePopulator for values associated with this
FloatingPoint type.
override
-
waitCycles(
int numCycles, {Edge edge = Edge.pos}) → Future< void> -
Available on Logic, provided by the LogicWaiter extension
Returns a Future which completes after the specifiednumCycles
, where each cycle is defined as the next occurence of the specifiededge
. -
withSet(
int startIndex, Logic update) → Logic -
Returns a copy of this Logic with the bits starting from
startIndex
up untilstartIndex
+update
.width
set toupdate
instead of their original value.inherited -
xor(
) → Logic -
Unary XOR.
inherited
-
zeroExtend(
int newWidth) → Logic -
Returns a new Logic with width
newWidth
where new bits added are zeros as the most significant bits.inherited
Operators
-
operator %(
dynamic other) → Logic -
Modulo operation.
inherited
-
operator &(
Logic other) → Logic -
Logical bitwise AND.
inherited
-
operator *(
dynamic other) → Logic -
Multiplication.
inherited
-
operator +(
dynamic other) → Logic -
Addition.
inherited
-
operator -(
dynamic other) → Logic -
Subtraction.
inherited
-
operator /(
dynamic other) → Logic -
Division.
inherited
-
operator <(
dynamic other) → Conditional -
Conditional assignment operator.
inherited
-
operator <<(
dynamic other) → Logic -
Logical left-shift.
inherited
-
operator <=(
Logic other) → void -
Connects this Logic directly to another Logic.
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
dynamic other) → Logic -
Greater-than.
inherited
-
operator >=(
dynamic other) → Logic -
Greater-than-or-equal-to.
inherited
-
operator >>(
dynamic other) → Logic -
Arithmetic right-shift.
inherited
-
operator >>>(
dynamic other) → Logic -
Logical right-shift.
inherited
-
operator [](
dynamic index) → Logic -
Accesses the
index
th bit of this signal.inherited -
operator ^(
Logic other) → Logic -
Logical bitwise XOR.
inherited
-
operator unary-(
) → FloatingPoint -
Negate the FloatingPoint.
inherited
-
operator |(
Logic other) → Logic -
Logical bitwise OR.
inherited
-
operator ~(
) → Logic -
Logical bitwise NOT.
inherited