The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 4:46pm
Pages: 1
Send Topic Print
Named Port Association in Verilog-AMS (Read 3886 times)
Vikram Srinivasan
Guest




Named Port Association in Verilog-AMS
Dec 18th, 2004, 11:47pm
 
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?
Back to top
 
 
  IP Logged
Mighty Mouse
Community Member
***
Offline

Here I come to save
the day!

Posts: 75
Fantasyland
Re: Named Port Association in Verilog-AMS
Reply #1 - Dec 20th, 2004, 9:58am
 
Named port associations seem like they should work. Kundert included an example of it in his book (see listing15 in chapter 4 at http://www.designers-guide.com/Books/dg-vams/index.html), and he claims they were all tested in AMS-Designer. Perhaps the fact that you have chosen names for your modules that are exactly the same names used for the built-in primitives is confusing things. Try myres rather than resistor, etc.

- MM -
Back to top
 
 
View Profile   IP Logged
Vikram Srinivasan
Guest




Re: Named Port Association in Verilog-AMS
Reply #2 - Dec 20th, 2004, 11:15am
 
Thanks MightyMouse !! I'l try that !
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.