ashrafSazid
New Member
Offline
Posts: 5
Germany
|
Hi, Does anyone have a code for Ideal Switch ( MOS Switch) in VerilogA? I tried one but that is not working at all. Please have a look at my code. suggest me how I can do it or Please provide me a code if you have.
module simple_switch(in, out, tp);
input in, tp;
output out;
electricl in, out, tp;
parameter real vth =0.4;
real vout analog begin
if (V(tp) >= vth) begin vout = V(in); end else vout = 0; V(out) <+ vout; end endmodule
|