In addition to the built-in connect rules, the ie statement also supports custom connect rules (user-defined connect rules). You can specify your custom connect rule file using the xrun command and use the connrules parameter to specify the connect rule that you want to generate based on the specified connect rule file. For example:
xrun top.vams amscf.scs myCR.vams
//amscf.scs
amsd{
ie vsup=1.8
ie vsup=5 connrules=myConnrule inst=top.a1 vdelta=0.1n
ie vsup=3.3 connrules=myConnrule cell=middle nparam=0.5
Here, two connect rules will be generated based on myConnrule. Note that the parameters specified above, such as vdelta, nparam, and vsup should be text macros specified in the myCR.vams connect rule file. In addition, parameters configured through the ie statement should be valid ie parameters that are text macros specified using the `define directive in the myCR.vams connect rule file. For example:
`define supply 1.8 //Supply voltage
`define tran 0.2n //Transition rising time
`define RO 300 //Output resistence
`define V_delta (`supply)/64.0 //Voltage delta of absdelta
`define V_tol_Delta (`V_delta)/4.0 //Voltage tolerance of absdelta
`define T_tol_Delta (`tran)/20.0
You can also specify a custom rule in the ie statement with only the scope setting and without reconfiguring any parameter, as shown below.
//amscf.scsamsd{...
ie connrules myConnrule inst=top.a1...
}
You can import the user-defined connect rule file using the following methods:
- Adding the file directly at the
xruncommand line.xrun ... myCR.vams
- Compiling to a specific library using the
xrun-makeliboption.xrun ...-makelib amslib myCR.vams -endlib
- Using the precompiled library directory with the
xrun-refliboption.xrun .. -reflib myConn_lib
xrun reads the custom connect rule file and generates a new set of internal disciplines and connect rules based on the specified ie parameters. Therefore, the user-defined connect rule file supported by AMS should contain the text macro definitions of all parameters used in the ie statement and appropriate connect statements. `ifdef is not supported in the user-defined connect rule file.
