I would think you want something more like this:
Code: real vout, vsamp;
@(initial_step) begin
vout = 0;
end
vsamp = absdelay(V(dut),10n);
@(cross( V(utility)- V(ref),1)) begin
vout = vsamp;
end
V(tout)<+ vout;
At the crossing, this captures a sample from 10n earlier, and holds this until the next crossing. But I don't know if you wanted a hold, or if you wanted the output to be zero between crossings, or if you wanted the output to be zero until a crossing, and after the crossing to track (a delayed copy of) the input.