Vikram Srinivasan
Guest
|
Hi
I was designing an RC network and I decided to have 3 modules in my source file-2 for definitions of the resistor and capacitor and the main module where instances of the R and C were created(with the appropriate interconnection). This is the code I wrote:
module rescap(posr,negc); electrical posr,negr,negc; resistor res(.p(posr),.n(negr)); capacitor cap(.pos(negr),.neg(negc)); endmodule
module resistor(p,n); parameter real rn=1k from [1:inf]; electrical p,n; analog begin V(p,n) <+ rn*I(p,n); end endmodule
module capacitor(pos,neg); parameter real c=100 from [1:inf]; electrical pos,neg; analog begin I(pos,neg) <+ c*ddt(V(pos,neg)); end endmodule
My test bench file looks like this: module rctest(posr,negc); electrical posr,negc; wire negr; resistor #(.rn(1000)) res(p,n); capacitor #(.c(100)) cap(pos,neg); vsource #(.type("sine"),.dc(0),.ampl(5),.freq(5000)) vin(posr,negc); endmodule
Now when I compile this, I get an error message that "Named Port Association is not valid for analog primitives in Affirma-AMS". I am confused. I thought named port association was valid in V-AMS.
Am I missing something?
|