This block of logic gets executed if above conditions have been false and this condition is true.
This block of logic gets executed if above conditions have been false and this condition is true. The lazy argument pattern makes it possible to delay evaluation of cond, emitting the declaration and assignment of the Bool node of the predicate in the correct place.
This block of logic gets executed only if the above conditions were all false.
This block of logic gets executed only if the above conditions
were all false. No additional logic blocks may be appended past
the otherwise
. The lazy argument pattern makes it possible to
delay evaluation of cond, emitting the declaration and
assignment of the Bool node of the predicate in the correct
place.
A WhenContext may represent a when, and elsewhen, or an otherwise. Since FIRRTL does not have an "elsif" statement, alternatives must be mapped to nested if-else statements inside the alternatives of the preceeding condition. In order to emit proper FIRRTL, it is necessary to keep track of the depth of nesting of the FIRRTL whens. Due to the "thin frontend" nature of Chisel3, it is not possible to know if a when or elsewhen has a succeeding elsewhen or otherwise; therefore, this information is added by preprocessing the command queue.