If class

Represents a chain of blocks of code to be conditionally executed, like if/else if/else.

Inheritance

Constructors

If(Logic condition, {List<Conditional>? then, List<Conditional>? orElse})
If condition is high, then then executes, otherwise orElse is executed.
If.block(List<Iff> iffs)
Checks the conditions for iffs in order and executes the first one whose condition is enabled.
If.s(Logic condition, Conditional then, [Conditional? orElse])
If condition is high, then then is executes, otherwise orElse is executed.

Properties

conditionals → List<Conditional>
Lists of all Conditionals directly contained within this Conditional (not including itself).
latefinal
drivers → List<Logic>
Lists all drivers, recursively including all sub-Conditionals drivers.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
iffs → List<Iff>
A set of conditional items to check against for execution, in order.
final
receivers → List<Logic>
Lists all receivers, recursively including all sub-Conditionals receivers.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

calculateReceivers() → List<Logic>
The same as receivers, but uncached for situations where the list of conditionals may still be modified or to compute the cached result for receivers itself.
override
driverInput(Logic driver) → Logic
Gets the input port associated with driver.
inherited
driverValue(Logic driver) → LogicValue
Gets the value that should be used for execution for the input port associated with driver.
inherited
driveX(Set<Logic>? drivenSignals) → void
Drives X to all receivers.
inherited
execute(Set<Logic>? drivenSignals, [void guard(Logic)?]) → void
Executes the functionality of this Conditional and populates drivenSignals with all Logics that were driven during execution.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processSsa(Map<Logic, Logic> currentMappings, {required int context}) → Map<Logic, Logic>
Given existing currentMappings, connects drivers and receivers accordingly to SsaLogics and returns an updated set of mappings.
override
receiverOutput(Logic receiver) → Logic
Gets the output port associated with receiver.
inherited
toString() → String
A string representation of this object.
override
verilogContents(int indent, Map<String, String> inputsNameMap, Map<String, String> outputsNameMap, String assignOperator) → String
Returns a String of SystemVerilog to be used in generated output.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited