put method
- dynamic val, {
- bool fill = false,
override
Puts a value val
onto this signal, which may or may not be picked up
for changed in this Simulator tick.
The type of val
should be an int
, BigInt, bool
, or LogicValue.
This function is used for propogating glitches through connected signals. Use this function for custom definitions of Module behavior.
If fill
is set, all bits of the signal gets set to val
, similar
to '
in SystemVerilog.
Implementation
@override
void put(dynamic val, {bool fill = false}) {
if (val is FloatingPointValue) {
if ((val.exponentWidth != exponent.width) ||
(val.mantissaWidth != mantissa.width)) {
throw RohdHclException('FloatingPoint width does not match');
}
if (val.explicitJBit != explicitJBit) {
throw RohdHclException('FloatingPoint explicit jbit does not match');
}
if (val.subNormalAsZero != subNormalAsZero) {
throw RohdHclException(
'FloatingPoint subnormal as zero does not match');
}
put(val.value);
} else {
super.put(val, fill: fill);
}
}