Vikram Srinivasan
Guest
|
Hi Andrew and Ken
Thanks for letting me know about the schematic tool for AMS-Design Browser. I tried my resistor code to see what kind of simulation I got... The following are the codes:
Resistor: `include "disciplines.vams" `include "constants.vams" `timescale 10ps/1ps;
module res(pos,neg); parameter real rn=1k from [0:inf] exclude 0; electrical pos,neg; analog begin V(pos,neg) <+ rn*I(pos,neg); end endmodule
TESTBENCH: `include "disciplines.vams" `include "constants.vams" `timescale 10ps/1ps
module resistortest(p,n); ground n; electrical p,n; res #(rn(100)) resistor(p,n); vsource#(.type("sine"),.ampl(5),.freq(5000),.dc(0))vin(p,n); endmodule
Now when I complie this, I see a sine wave for the pos terminal and just a straight line output for neg terminal. The Schematic tool shows that 0 signal comes out of the device from the neg terminal.
Am I doing something wrong?
How can I get V-I characteristics instead of getting Voltage characteristics w.r.t Time?
Vikram
|