monostable in verilog-a
I find the absdelay statement.
The VerilogA program is list below, in case someone may need it. Thanks,
// VerilogA for PMM_VA_Models, mono, veriloga
`include "constants.vams"
`include "disciplines.vams"
module mono(vin, vout);
electrical vin, vout, vindelay;
parameter real vlogic_high = 5;
parameter real vlogic_low = 0;
parameter real vtrans = 1.4;
parameter real tdel = 2u;
parameter real pulsew = 3u;
parameter real trise = 1u;
parameter real tfall = 1u;
real vout_val;
integer logic1;
analog begin
@ ( initial_step ) begin
if (vlogic_high < vlogic_low) begin
$display("Range specification error. vlogic_high = (%E) less than vlogic_low = (%E).\n", vlogic_high, vlogic_low );
$finish;
end
if (vtrans > vlogic_high || vtrans < vlogic_low) begin
$display("Inconsistent $threshold specification w/logic family.\n");
end
end
@(initial_step)logic1 = 0;
V(vindelay) <+ absdelay(V(vin), pulsew);
@ (cross(V(vin) - vtrans, 1)) logic1 = 1;
@ (cross(V(vindelay) - vtrans, 1)) logic1 = 0;
vout_val = (logic1) ? vlogic_high : vlogic_low;
V(vout) <+ transition( vout_val, tdel, trise, tfall);
end
endmodule