Argh. Normally I will not answer questions from people that cannot be bothered to format their code in a readable fashion. I should have stuck with that policy here.
Code:module allo(in,out);
parameter real td = 10n; // width of pulse
parameter real tt = 0n; // output transition time (s)
parameter real t1 = 0n;
output out;
input in;
voltage in, out;
real Vout, tend,rst;
analog begin
@(initial_step or cross(V(in)-1, -1)) begin
Vout = 0;
tend = $abstime + td;//return simulation time + td
end
@(timer(tend))
Vout = 1.8;
V(out) <+ transition(Vout, td, tt);
end
endmodule
Improperly indented code is largely unreadable, leading to confusion and mistakes, and making it hard for people to help you. Before asking someone to look at your code, you should indent it properly. It only took me a few seconds to do it, and in doing it you often find the problem yourself.
-Ken