Latch

Signature

Latch(expression, condition)

Description

A latch is a storage element that can be updated based on a condition. If condition is false, the latch keeps its current value. If condition is true, the latch is immediately updated to the value of expression effectively passing through the input value without delay.

Result

Follows the current signal value if condition is true and maintains the last signal value if condition is false.

Arguments

 

expression

The input signal.

condition

A condition which defines the behavior of the latch: If true, the current value of the latch is updated. If false, the latch keeps its old value.