The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 10:33pm
Pages: 1
Send Topic Print
Function of CDS_inherited_parameter (Read 1371 times)
krishna95
New Member
*
Offline



Posts: 5

Function of CDS_inherited_parameter
Jun 05th, 2019, 4:57pm
 
Hi, I came across "* cds_inherited_parameter * " in a verilogA document which mentioned it in the following code. It looks like it is used for modelling a monte-carlo simulation effect.

module res(vp, vn);
inout vp, vn;
electrical vp, vn;
(* cds_inherited_parameter *) parameter real monteres = 0;
parameter real r = 1k;
localparam real r_effective = r + monteres; // nominal resistance plus
// monte-carlo mismatch effect
analog
V(vp, vn) <+ (r_effective)*I(vp, vn);
endmodule

I wrote this code in my cadence verilogA simulator it seems its not recognizing the cds definition as it appears gray as shown in figure. Although there are no error while running the va file, the resistor component thus made gives an error in transient simulation. The error specifies that "parameter montres is unknown". But when I write an extra line "parameter real montres=0", it works fine. But then what is the function of cds_inherited _parameter? How is it used?

Back to top
 

SNippet.png
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Function of CDS_inherited_parameter
Reply #1 - Jun 13th, 2019, 10:52am
 
I think the gray is just the syntax-highlighting of your editor: comments are red, keywords are blue, etc.

The (*  *) characters indicate an attribute. I often see attributes like
(* desc="width" unit="m" *) parameter real w=1u;

You could try putting that in your source code and see if it also gets colored gray, and whether w is accepted as a parameter.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Function of CDS_inherited_parameter
Reply #2 - Jun 13th, 2019, 10:54am
 
Quote:
The error specifies that "parameter montres is unknown".


There's a typo there: is it montres or monteres?

I just don't know if there's a typo in the actual netlist, or if you just mistyped it in your post.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
krishna95
New Member
*
Offline



Posts: 5

Re: Function of CDS_inherited_parameter
Reply #3 - Jun 14th, 2019, 9:40am
 
The error specifies that "parameter monteres is unknown". Sorry for the previous typo. The command  " cds_inherited..." gives a default value for monteres so I dont need to specify "parameter real monteres=0" again, but I dont know why the error appears from the cadence simulation. How can I resolve it?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Function of CDS_inherited_parameter
Reply #4 - Jun 14th, 2019, 10:47am
 
(* cds_inherited_parameter *) is an attribute. In principle, attributes aren't supposed to change the answer, just give the simulator a hint for optimization. I'm puzzled that this attribute appears to "hide" the parameter.

What if you just delete (* cds_inherited_parameter *) ?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Function of CDS_inherited_parameter
Reply #5 - Jun 14th, 2019, 10:53am
 
Ah, OK, it looks like that attribute is used so you don't have to specify monteres on the instance line; the model will pick up the value from the hierarchy where the instance resides. That is, you will need

parameters monteres = 0

in the netlist or model library, and then you can use a statistics mismatch block to give the distribution for monteres.

Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   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.