The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design >> Analog Design >> How can I give variables as parameter to a module https://designers-guide.org/forum/YaBB.pl?num=1319014527 Message started by aistudy on Oct 19th, 2011, 1:55am |
Title: How can I give variables as parameter to a module Post by aistudy on Oct 19th, 2011, 1:55am Hi, how can I give variables as parameter to a Verilog-A module? I wrote the module Resistor in Verilog-A with parameter Noise and value of resistance. Code:
I can pass numbers direktly as parameter: Code:
But I can't pass any calculated value or a value which is a parameter or variable. I would like to pass the Variable "R_g", which will be calculated in following sample: Code:
I'm becoming the following error message from Agilent ADS: "Invalid (non-static) initialization for parameter R" Sometimes ADS gives non error message but the result of the DC-simulation are not practicable. How I solve this problem? Thanks a lot! |
Title: Re: How can I give variables as parameter to a module Post by boe on Oct 19th, 2011, 3:45am Hi Aistudy, aistudy wrote on Oct 19th, 2011, 1:55am:
Code:
If you want to change the value dynamically, you need to declare R as dynamicparam (if ADS supports this). - B O E |
Title: Re: How can I give variables as parameter to a module Post by aistudy on Oct 19th, 2011, 5:20am Hi, the declaration as localparam solved my problem. Thanks a lot. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |