Hello,
I am trying to write a verilog-a behavioral model for pfet and nfet, i.e. using them as switches.
analog begin
if (analysis("static")) begin
Rch = Roff ;
end else
begin
if (V(G) >=Vth) Rch = Ron ;
else Rch = Roff ;
end;
I(S, D) <+ V(S, D) / transition(Rch,0,tr,tf);
end
endmodule
The model works fine. But when i use both pfet and nfet models to build an inverter i just get 0 at output. I think i need voltage as output. SO i tried
V(S, D) <+ I(S, D) * transition(Rch,0,tr,tf);
But this gives segmentation fault in spectre.
Can anybody tell some changes in the model where i can model voltages?
Also, is there a standard model for nfet or pfet to operate them as switches which can be used to build logic gates.
Waiting for reply.