The boolean output y is delayed by tDelay compared to the Boolean input u.
The change in boolean output is triggered when the delayed real signal crosses a threshold halfway between the extreme values of 0 and 1.
The use of a when structure ensures that this change is instantaneous i.e. there is a rising or falling edge.