Product Documentation
Virtuoso Unified Custom Constraints Configuration Guide
Product Version IC23.1, September 2023

1


Customizing Constraint Types Using a Configuration File

The Cadence® Virtuoso® unified custom constraint management system allows you to establish design needs, save them as constraints, and share those constraints across specification, simulation, and implementation to drive the accelerated layout solution with reduced errors. A constraint-driven design preserves the design intent by enabling efficient design collaboration.

The unified custom constraint management system is available in:

For more information, see the Virtuoso Unified Custom Constraints User Guide.

This configuration guide describes how to customize, configure and extend Cadence® Virtuoso® unified custom constraints (constraints) functionality in the Cadence® IC releases.

This configuration guide is aimed primarily at on-site CAD departments and assumes that you are familiar with:

In addition to creating constraints based on default system constraint types (Cadence-provided built-in constraint types), you can create new custom constraint types, override definitions of existing custom constraint types, and extend definitions of any system constraint type using the UI configuration file, config.xml. This file provides complete information about default and custom constraints, including their GUI displays.

The following topics in this chapter discuss the components of a config.xml file and how to use them to customize the system constraint types or create new custom constraint types:

Licensing Requirements

Licensing Requirements for Virtuoso Unified Custom Constraints

To use the constraint functionality in:

Virtuoso Tool License Required

Schematic XL

Virtuoso_Schematic_Editor_XL (License Number 95115)

Layout XL

Virtuoso_Layout_Suite_XL (License Number 95310)

Layout GXL

Virtuoso_Layout_Suite_GXL (License Number 95321) (IC6.1.8 Only)

For information on licensing in the Virtuoso Studio Design Environment, refer to Virtuoso Software Licensing and Configuration User Guide.

Depending on the advanced nodes feature being used, you will need one of the following licenses, in addition to the base product license:

For more information, see License Requirements for Advanced Node Features in Virtuoso Software Licensing and Configuration User Guide.

Licensing Requirements for PVS-CV

The following license is required for running PVS-CV in Virtuoso:

The PVE12.1.1 or later version should be used for the PVS-CV feature.

An Introduction to a Configuration File

The UI configuration file, config.xml, lets you manage the definition of constraint types including members, parameters, and other callbacks as well as the display of the constraints and parameters in the Constraint Manager assistant. By default, the definition of Cadence-provided system constraint types are stored in the config.xml file that can be found at the following path:

$CDSHOME/share/cdssetup/dfII/ci/config.xml

However, you can override this file by creating a new config.xml file that contains the desired customizations. If you save this new file in the .cadence/dfII/ci directory located on the Cadence Setup Search File (CSF) path, it will get picked automatically at the time of Constraint Browser initialization. If you have saved the config.xml file at a different location, use the ciLoadConfigXML SKILL function to load it at run time. However, the caveat here is that a config.xml file which is not on the CSF path needs to be loaded every time you start a new session of Virtuoso.

When the config.xml file containing the definition of a new constraint type is loaded, the Constraints Manager assistant displays the new constraint type in the Constraint Generator drop-down menu. When you create a constraint using this new constraint type, all associated parameters are displayed in the Constraint Parameter Editor.

In addition to creating new constraint types and its associated parameters, you can use a config.xml file to control their display in the Constraint Manager assistant. For example, you can rename a constraint type, hide a constraint type from the Constraint Generator drop-down menu, or control the display format of a constraint parameter.

Understanding the XML Tags Used in a Configuration File

For creating, extending, overriding, and formatting constraint types in a config.xml file, use the following XML tags:

A typical constraint type definition in the config.xml file looks like following:

<ConstraintType>
<Name>myCustomConstraint</Name>
<GUIName menu="Placement(DEFAULT)">myCustomConstraint</GUIName>
<Param>
<Name>myCustomParam</Name>
<GUIName summary="ValOnly">myCustomParam</GUIName>
<Type>int</Type>
<Scope>constraint</Scope>
<DefaultValue>4</DefaultValue>
<ValueRange>0 10</ValueRange>
</Param>
<MinMembers>1</MinMembers>
<MaxMembers>2</MaxMembers>
<AllowedMemberTypes>inst,net,instTerm,pin,cluster,modgen,shape,guide</AllowedMemberTypes>
<VerifyCB>CUSTExampleVerifyCB</VerifyCB>
<ValidateCB>CUSTExampleValidateCB</ValidateCB>
</ConstraintType>

ConstraintType

(Mandatory) Defines the name and parameters of a constraint type. The body of this XML tag contains the definitions of other XML tags explained in the sections below.

Name (Constraint Type Name)

(Mandatory) Defines the name of the constraint type, as shown below.

<Name>ConstTypeName</Name>
It is recommended that you use a private prefix starting with an upper case, such as Cst for Customer.

GUIName (Constraint Type Display Name)

Defines the display name of the constraint type.

If you do not specify the <GUIName> tag, the constraint type name specified with the <Name> tag is used as the GUI display name.

The <GUIName> tag can have the following attribute:

menu

Controls the placement of the constraint type in the Constraint Generator drop-down menu. It accepts the following values:

submenuName

The style of specifying this value determines how and where the constraint type will be displayed in the Constraint Generator drop-down menu. For information about the different styles and their impact on the GUI, see Styles of Using submenuName with the menu Attribute.

subMenuName(DEFAULT)

When you specify (DEFAULT) after the submenuName, the constraint type gets added to the specified submenu and becomes available for selection by default when you open the Constraint Manager assistant. For example:

<GUIName menu="Electrical(DEFAULT)">myCustomConstraint</GUIName>

{HIDE}

When you specify {HIDE}, the associated constraint type gets hidden from the Constraint Generator drop-down menu. For more information, see Hiding Constraint Types in the Constraint Generator Menu.

Styles of Using submenuName with the menu Attribute

With the menu attribute, you can specify a submenu name in different styles to determine how it should be displayed, that is, whether as new submenu, under an existing submenu, or as a hierarchical menu.

Hiding Constraint Types in the Constraint Generator Menu

If needed, you can hide constraint types such as Symmetry, Orientation, and Alignment from the Constraint Generator menu in the Constraint Manager assistant. To do so, in the config.xml file, specify “{HIDE}” as the menu name in the GUIName tag for the constraint that needs to be hidden. The example below shows how to hide the Alignment constraint from the menu.

<ConstraintConfig>
<ConstraintType>
<Name>alignment</Name>
<GUIName menu="{HIDE}">Alignment</GUIName>
...
<Param>
<Name>Owner</Name>
<GUIName visibleInEditor="false">Owner</GUIName>
</Param>
   ...
<Param>
<Name>edgeNumber</Name>
<GUIName visibleInEditor="false">Edge</GUIName>
</Param>
...
</ConstraintType>
...
</ConstraintConfig>
A separate config.xml file can also be created to hide specific constraint types from the menu and can be loaded using the ciLoadConfigXML function. Alternatively, you can use the ciLoadConfigXMLFromString function that does not require loading the config.xml files from certain search paths on the disk. With this capability of loading the config.xml files from a string, the config.xml strings can reside in SKILL files and be encrypted, if necessary.

Version

(Optional) Specifies the version number of the constraint when multiple versions of a constraint exist. This tag is used in conjunction with the BaseType tag allowing you to define multiple versions of a custom constraint type.

Each version must have its own unique Constraint Type Name and share the same BaseType name to allow multiple versions of the same base constraint type to exist at the same time. For more details, see Creating New Versions of a Constraint Type.

BaseType

(Optional) Specifies the original constraint name. This tag is used in conjunction with the Version tag allowing you to define multiple versions of a custom constraint type based on each sharing the same BaseType.

Each version must have its own unique Constraint Type Name and share the same BaseType name to allow multiple versions of the same base constraint type to exist at the same time. For more details, see Creating New Versions of a Constraint Type.

Categories

(Optional) Specifies the category of constraint, as shown below.

<Categories>frontEnd,Physical</Categories>

Any custom or default system constraint created in the Constraint Manager assistant can be propagated automatically to the Virtuoso ADE Assembler the Checks/Asserts assistant, by including the value, customAssertion, in the <Categories> tag within the config.xml file, as shown in the example below.

<Categories>frontEnd,Physical,customAssertion</Categories>

For more details refer to Propagating Constraints to the Checks/Asserts Assistant.

CustomSimulationCheckCB

(Optional) For constraints belonging to the category customAssertion, specifies a custom callback in the config.xml file, as shown below.

<CustomSimulationCheckCB>maxCurrentCustomCheckCallback</CustomSimulationCheckCB>

This allows customAssertion constraints to be netlisted as Spectre asserts along with the existing checks and asserts. For more details refer to Propagating Constraints to the Checks/Asserts Assistant.

Param

Defines the constraint parameters. Within the body of the ConstraintType tag, you can define multiple Param tags based on your requirement. The parameters defined in each body of a Param tag are added to a list of parameters that can be used for the given constraint type.

The following tags are defined within the body of a Param tag:

Name (Constraint Parameter Name)

Specifies the constraint parameter name. Ensure that a constraint parameter name is always unique and not reused.

This tag is mandatory if the Param tag has been specified.

GUIName (Constraint Parameter Display Name)

Defines the GUI display name of the constraint parameter.

If you do not specify the <GUIName> tag, the constraint parameter name specified with the <Name> tag is used as the GUI display name.

The <GUIName> tag can have the following attributes:

visibleInEditor

Controls the display of the constraint parameters in the Constraint Parameter Editor pane of the Constraint Manager assistant. It accepts the following values:

true

Displays a constraint parameter in the Constraint Parameter Editor pane. This is the default value.

false

Hides a constraint parameter in the Constraint Parameter Editor pane.

summary

Controls how the constraint parameters should be summarized in the Parameters column in the Constraint Browser. This attribute accepts the following values:

Ignore

Does not display the constraint parameter summary in the Parameters column. This is the default value of the summary attribute.

NameAndVal

Displays the name and value of the constraint parameter as “name=value”.

ValOnly

Displays only the value of the constraint parameter.

ValOnlyIfNotDefault

Displays only the value of the constraint parameter if it is not the default value.

NameAndValIfNotDefault

Displays the name and value of the constraint parameter as “name=value” only if the value is not the default.

NameOnlyIfTrue

Displays the name of the constraint parameter if its value is “True”.

This attribute value is valid only for Boolean parameters.

Type

Defines the type of values the constraint type can accept. This tag accepts one of the following keywords: boolean, int, double, string, enum, or enumset.

This tag is mandatory if the Param tag has been specified.

ValueRange

Defines the value range based on the parameter type, as given below.

If <Type> is boolean or string, you do not need to specify <ValueRange>.

DefaultValue

Defines the default value of a parameter.

For parameters that have a DefaultValue tag, but no ValueRange tag, the specified DefaultValue and ValueRange are considered to be the same. However, for parameters of int or double type, the allowed ValueRange is between -999999999 to 999999999.

In addition, the following rules are applicable to definition of the DefaultValue tag:

Scope

Restricts the scope of a parameter, that is, defines whether a parameter is a constraint parameter or member parameter. It has the following syntax:

<Scope>validScopeValue</Scope>

This tag accepts one of the following valid values:

constraint

Consider the associated parameter as constraint parameter only.

member

Consider the associated parameter as member parameter only.

constraint,member

Consider the associated parameter as both constraint parameter and member parameter.

If no value is given or the tag is missing, the constraint is treated as both constraint parameter and member parameter.

MinMembers

Specifies the minimum number of members needed for a constraint type.

The MinMembers tag defaults to 1, when one of the following conditions is true:

The MinMembers tag defaults to 0 when only master is specified within the AllowedMemberTypes tag.

MaxMembers

Specifies the maximum number of members allowed for a constraint type. If the MaxMembers tag is not specified, by default, any number of members greater than or equal to MinMembers are allowed.

AllowedMemberTypes

(Mandatory) Specifies the type of members (objects) that can be included as part of your custom constraint. For defining the allowedMemberTypes tag, you can use one or more of the following values in any combination: inst, master, net, instTerm, pin, netTerm, netClass, modgen, boundary, cluster, shape, via, and guide.

You must complete this tag otherwise an error message will be displayed.

VerifyCB

Defines the name of the verify callback. It is a one word string. For example:

<VerifyCB>callbackName</VerifyCB>

See also Using Validation and Verification Callbacks.

ValidateCB

Defines the name of the validate callback. It is a one word string. For example:

<ValidateCB>validateCBName</ValidateCB>

See also Using Validation and Verification Callbacks.

IgnoreConstraintType

Controls whether a constraint type should be ignored when the config.xml file is read. It is a Boolean value, which is set to false by default. If this tag is set to true in the body of a custom constraint type definition, the constraint type is not created.

You can also use this tag within the constraint generator definitions, which might be present in the config.xml file for GUI customizations. This tag prevents creation of a custom constraint type for those constraint generators.

Extending System Constraint Types

To extend system constraint types, you can perform only the following actions:

The extended system constraint types can be loaded at startup, that is, before a Virtuoso session is launched, or during a running session.

If you have extended an existing system constraint type, the related modifications get merged to the corresponding entries in the config.xml file. If a constraint type is read for the first time from a config.xml, it gets added to the in-memory configuration. When an entry of the same constraint type is detected in the same config.xml file or any other config.xml file on the CSF path, its unique tags and parameters are appended to the constraint type already present in the in-memory configuration. For more information on CSF path, see The Cadence Setup Search File: setup.loc in the Cadence Application Infrastructure User Guide.

See also Example 1: Extending an Existing System Constraint Type.

At Startup

To extend a system constraint type at startup:

  1. Create a config.xml file in a .cadence/dfII/ci directory located on the CSF path.
  2. Incorporate the required updates for the system constraint type you want to extend.

When Virtuoso is launched, all config.xml in CSF paths are read and the relevant (unique) tags for the existing constraint type are appended to the in-memory configuration. If new parameters were added to config.xml, then at the startup, the parameters with unique names are picked and appended to the existing configuration.

During a Virtuoso Session

To extend an existing system constraint type during a running Virtuoso session:

  1. Create a config.xml file.
  2. Incorporate the required updates for the system constraint type you want to extend.
  3. Use the ciLoadConfigXML SKILL function to specify the path of the new config.xml file as an argument. This modifies the impacted system constraint type(s) instantly.
    Alternatively, you can use the ciLoadConfigXMLFromString function that does not require loading the config.xml files from certain search paths on the disk.

Creating and Overriding Custom Constraint Types

Creating New Custom Constraint Types

Custom constraint types can be created at startup, that is, before a Virtuoso session is launched, or during a running session.

See also Example 2: Creating a New Custom Constraint Type.

At Startup

To create a new constraint type at startup:

  1. Create a config.xml file in a .cadence/dfII/ci directory located on the CSF path.
  2. Add to this file a unique constraint type entry.

When Virtuoso is launched, all config.xml in CSF paths are read and therefore, the custom constraint type is created.

During a Virtuoso Session

To create a new constraint type during a running Virtuoso session:

  1. Create a config.xml file.
  2. Add to this file the required constraint type entry.
  3. Use the ciLoadConfigXML SKILL function to specify the path of the new config.xml file as an argument.
    Alternatively, you can use the ciLoadConfigXMLFromString function that does not require loading the config.xml files from certain search paths on the disk.

The newly created custom constraint type is available for use instantly.

Overriding Existing Custom Constraint Types

The existing custom constraint types can be overridden with new definition at startup or during a running Virtuoso session. In this case, the definition is not extended as is the case with Cadence-provided system constraint types. Instead, their definition is completely overridden with the new definition.

For custom constraint types still created using propdict.def, overriding does not work. They will be treated as system constraint type and cannot be extended or overridden using a new config.xml file definition.

See also Example 3: Overriding an Existing Custom Constraint Type.

At Startup

To override a custom constraint type at startup:

  1. Create a config.xml file in a .cadence/dfII/ci directory located on the CSF path.
  2. Add to this file the new or updated parameters for an existing custom constraint type.

When Virtuoso is launched, all config.xml files in the CSF paths are read and the latest tags for a specific custom constraint type override its existing definitions, if already present in the in-memory configuration. Therefore, the last found definition of a custom constraint type is honored.

During Virtuoso Session

To override an existing custom constraint type during a running Virtuoso session:

  1. Create a config.xml file.
  2. Add to this file the new or updated parameters for an existing custom constraint type.
  3. Use the ciLoadConfigXML SKILL function to specify the path of the new config.xml file as an argument. This overrides the impacted custom constraint type(s) instantly.
    Alternatively, you can use the ciLoadConfigXMLFromString function that does not require loading the config.xml files from certain search paths on the disk.

Creating New Versions of a Constraint Type

You can create a new version of a constraint type, allowing multiple versions of a constraint type to exist while preserving the constraints that currently use an existing version.

The tags BaseType and Version let you control the different versions of your customized constraint types. Before creating different versions of a constraint type, you must first protect the existing constraint type by renaming it with a unique Name and giving it a BaseType and Version tag. You can then create a new version of the constraint type using the original constraint type name and giving it a unique version number while sharing the same BaseType.

If BaseType and Version tags are not created for an existing constraint before creating a new version, the new version created replaces all instances where the previous constraint type was used. Any differences between the new and old version will not be preserved.

Creating a New Version of a Constraint Type

You can replace an existing version of a custom constraint type with a new version, making the existing version obsolete while preserving the definitions used by existing constraints.

  1. Identify the existing custom constraint type required. For example, CurrentDisplay.
  2. Give the constraint type a new unique Name. For example, CurrentDisplay_v1.
  3. In BaseType enter the original name of the constraint type. For example, CurrentDisplay.
  4. In Version enter 1.
  5. (optional) Rename the constraint type’s GUI Name to distinguish this version of the constraint type from other versions displayed in the system. For example, CurrentDisplay_v1.
    The original version of this constraint type is now protected.
  6. Create a new constraint type and give it the original constraint type name. For example, CurrentDisplay.
    Creating a new constraint type with the same name will override the current constraint type.
  7. In BaseType enter the same BaseType as that selected for the original version of the constraint type. For example, CurrentDisplay.
  8. Set the Version to 2.
  9. (optional) Rename the constraint type’s GUI Name to distinguish this version of the constraint type from other versions displayed in the system. For example, CurrentDisplay_v2.
    The examples above would result in two versions of a constraint type with a base type of CurrentDisplay:

    Constraint Type Name

    GUI Name

    Version

    Base Type

    CurrentDisplay_v1

    CurrentDisplay_v1

    1

    CurrentDisplay

    CurrentDisplay

    CurrentDisplay_v2

    2

    CurrentDisplay

  10. Create any additional versions of the constraint type if required, incrementing the Version each time.

You can use the SKILL functions ciTypeDefBaseType and ciTypeDefVersion to return the version number and base type of a constraint type. You can also use these functions with the VerifyCB callback to determine if an existing constraint is an older version and can also be used to disable older constraint types. For more details on the VerifyCB callback, see Using Validation and Verification Callbacks.

Using Multiple Constraint Configuration Files

You can create multiple constraint configuration (config.xml) files and choose to save them on the CSF search path or elsewhere. If multiple config.xml files are found on the CSF search path, they will be loaded by the constraints system one-by-one, in append mode, based on the following rules:

Using Validation and Verification Callbacks

In the config.xml file, you can use of the following two callbacks related for validating and verifying new and modified constraint types:

<VerifyCB>verifyCBName</VerifyCB>
<ValidateCB>validateCBName</ValidateCB>

Validating Constraints

The validate callback is called automatically on the layout side whenever a constraint is created or modified (as with constraint checking) and is used by CAE (Constraint Aware Editing) during interactive edits to test and mark the constraint as being enforced.

The validate callback is not called on the schematic side.

You can insert a constraint validation callback into the body of ConstraintType XML tag in the config.xml file. For example:

<ConstraintType>
<Name>symmetry</Name>
<ValidateCB>CstSymmetryCallback</ValidateCB>
</ConstraintType>

When the above validation callback is set in a config.xml file, any symmetry constraint on the layout will use the user-defined “CstSymmetryCallback” function when the Constraint Aware Editing (CAE) validation code is run. Constraint status will also be updated when the Verify – Design command is run in Layout XL (and higher tiers) (the Process Rules tab is used to configure verification settings).

Verifying Constraints Consistency

To verify the consistency of the constraint members and parameters, the verify callback is called automatically when a constraint of a related type is created or modified. When a new constraint is created it will have all the attributes, members, and parameters properly populated. However, it will not be listed for those objects that refer to it until a constraint verification callback succeeds. The verify callback should use a SKILL API or the UT fields to verify whether the members and parameters are consistent. The SKILL callback has one single argument, the constraint ID.

If the callback returns nil, the verification fails with a warning message in the CIW, and the modification or creation is rejected. Any other value returned, including “FALSE”, is considered as a non-nil return and the changes will be accepted. See also Constraints Checks in the Virtuoso Schematic Editor User Guide.

A typical usage of verification callback is to yield warning messages and return nil when invalid combination of parameter settings and member is used. For example, your verify callback can allow a parameter to be set on a certain type of member, say net member, or on the first member. Moreover, it can restrict that only the first member can be, for example, an instance. Any logical check, with respect to constraint members and parameters, can be performed using the VerifyCB callback to restrict parameter and member usage.

Example for VerifyCB

The following is an example of the use of VerifyCB, as set in the config.xml file.

In a config.xml file:

<ConstraintType>
<Name>ExampleCon</Name>
<VerifyCB>CUSTExampleConVerifyCB</VerifyCB>
<Param>
<Name>param1</Name>
<ValueType>double</ValueType>
<DefaultValue>0.5</DefaultValue>
<ValueRange>0.0 1.0</ValueRange>
</Param>
</ConstraintType>

In a SKILL file loaded either in .cdsinit or in library libInit.il:

procedure(CUSTExampleConVerifyCB(con)
  ; This procedure validates that the right members and parameters are set on the constraint.
  let(((retVal t))
    when(length(ciConListMembers(con)) < 2
      warn("Constraint type %s requires at least 2 members. Constraint %s has only %d members.\n" ciConGetType(con) ciConGetName(con) length(ciConListMembers(con)))
      retVal = nil
    )
    foreach(mem ciConListMembers(con)
      when(cadr(mem) != 'inst
        warn("Constraint type %s requires instances as members. Member %s is of type %s.\n" ciConGetType(con) car(mem) cadr(mem))
        retVal = nil
      )
    )
    retVal
  )
)

Best Practices for Custom Constraint Type Definitions

When creating a custom constraint type, the following should be considered:

Adding a New Icon to the Constraint Manager Assistant

When you create a new constraint type, you also need an associated icon that will be displayed adjacent to it in the Constraint Manager assistant. This new icon should be an image of 16x16 bit size that is saved with a name of the format: <constraintName>.png

When you move the mouse cursor over the new icon in the Constraint Manager, a tooltip will display the text as defined in the config.xml file.

For your reference, a few examples are stored in the Cadence installation directory under:

./share/cdssetup/icons/16x16

For the Constraint Manager assistant to load a .png file, it must be located in the following directory:

.cadence/icons/16x16
The .cadence directory must be on the file search path. For more information, see The Cadence Setup Search File: setup.loc Cadence Application Infrastructure User Guide.

Propagating Constraints to the Checks/Asserts Assistant

Any custom or default system constraint created in the Constraint Manager assistant can be propagated automatically to the Checks/Asserts assistant, which is accessible from the Virtuoso ADE product suite.

To enable this automatic propagation, update the <ConstraintType> definition in the config.xml file to include the value, customAssertion, in the <Categories> tag, as shown in the example below.

Consequently, when you create a constraint of this constraint type in the Constraint Manager assistant, the same constraint starts to show in the Checks/Asserts assistant too, as shown in the image below.

In addition, you can specify a custom callback, as shown below, in the config.xml file to allow the constraints to be netlisted as Spectre asserts along with the existing checks and asserts.

The following image illustrates the procedure for maxCurrentCustomCheckCallback used in the custom callback example above:

The arguments for maxCurrentCustomCheckCallback are as follows:

con

The custom assert being netlisted. The constraint customization SKILL commands (prefix ci) can be used to get the custom assert name, parameters and members. For example, ciConGetName(con), ciConListParams(con), ciConListMembers(con).

This information can be used to form the simulator assert statement.

t_checkConPath

The simulation path to the custom assert being netlisted. For example, ether_adc45n\\/adc_cascode_opamp\\/Constr_1.

t_scopingParam

This argument is not used.

t_netlistDir

The path to the simulation netlist directory. For example, simulation/ether_adc45n_sim/adc_cascode_opamp_sim/adexl/results/data/Interactive.270/1/ACGainBW/netlist. The netlistDir can be used to map schematic device/terminal names to simulator device/terminal names. For example, simDevName = asiMapOutputName(netlistDir 'instance schDevName)

s_simulator

The simulator used, for example spectre. Only the spectre simulator supports custom checks/asserts.

t_libName

The library name. For example, ether_adc45n.

t_cellName

The cell name. For example, adc_cascode_opamp.

g_isTop

If set to t, the top level cellview is netlisted. If set to nil, a sub-circuit is being netlisted.

g_useHtmlMarkup

If set to t then HTML markup tags are allowed in the string returned by the custom assert netlisting callback. If set to nil, the string must only contain plain text.

The following image illustrates how the constraints are netlisted as Spectre assert statements:

Examples of Using the config.xml File

Example 1: Extending an Existing System Constraint Type

The alignment constraint is a system constraint type. The user wants to add a new parameter alignment_custom_param_first to the alignment constraint. The original config.xml already contains an entry for the alignment constraint and it might not always be possible to modify it. So, the user can create a new config.xml with the following entry:

<ConstraintType>
<Name>alignment</Name>
<Param>
<Name>align_custom_param_first</Name>
<GUIName visibleInEditor="true">AlignmentCustomParamFirst</GUIName>
<Type>int</Type>
<ValueRange>0 7 9 -5</ValueRange>
<DefaultValue>5</DefaultValue>
<Scope>constraint</Scope>
</Param>
</ConstraintType>

When this config.xml is read, there are two children of the ConstraintType tag—Name and Param.

The Name tag is anyway a must tag and is present in the in-memory configuration of alignment constraint. Therefore, it is ignored. The align_custom_param_first parameter is found to be unique and is appended to the alignment constraint entry in the in-memory configuration. A dump of the in-memory configuration will show this parameter added to the alignment constraint entry.

Now, assume that the user created another config.xml file, with the following entry:

<ConstraintType>
<Name>alignment</Name>
<Param>
<Name>align_custom_param_second</Name>
<GUIName visibleInEditor="true">AlignmentCustomParamSecond</GUIName>
<Type>string</Type>
<DefaultValue>My custom string</DefaultValue>
<Scope>constraint</Scope>
</Param>
</ConstraintType>

When this second config.xml file is loaded, the align_custom_param_second parameter is also found to be unique and is appended to the alignment constraint entry in the in-memory configuration. So, a dump of the in-memory configuration will now show the two parameters, align_custom_param_first and align_custom_param_second, added to the alignment constraint entry.

Example 2: Creating a New Custom Constraint Type

The following is an example of a config.xml file containing a new constraint type:

<ConstraintType>
<Name>CstNoiseAndCrosstalk</Name>
<VerifyCB>CstVerifyCallback</VerifyCB>
<ValidateCB>CstValidateCB</ValidateCB>
<Param>
<Name>CstCrosstalkValue</Name>
<Type>double</Type> 
<DefaultValue>0.5</DefaultValue>
</Param>
<Param>
<Name>CstMetalFillLayer</Name>
<Type>enum</Type> 
<DefaultValue>Metal1</DefaultValue> 
<ValueRange>Metal1 Metal2 Metal3 Metal4 Metal5 Metal6 Metal7 Metal8 Metal9</ValueRange>
</Param>
<Param>
<Name>CstParSameNet</Name>
<Type>int</Type> 
<DefaultValue>0</DefaultValue>
</Param>
<Param>
<Name>CstReserveLayersForOverBlockRouting</Name>
<Type>string</Type> 
<DefaultValue>Metal1 Metal2 Metal3 Metal4 Metal5 Metal6 Metal7 Metal8 Metal9</DefaultValue>
</Param>
<Param>
<Name>hierarchicalScope</Name>
<Type>enumset</Type>
<ValueRange>local below above</ValueRange>
<DefaultValue>local below</DefaultValue>
<Scope>constraint</Scope>
</Param>
</ConstraintType>

Here,

Example 3: Overriding an Existing Custom Constraint Type

Following are entries for a custom constraint type, custom_conType, in two different config.xml files:

First config.xml file:

<ConstraintType>
<Name>custom_conType</Name>
<GUIName >CustomConType</GUIName>
<Param>
<Name>customParam</Name>     
<GUIName visibleInEditor="true">CustomParam</GUIName>
<Type>int</Type>
<ValueRange>0 7 9 -5</ValueRange>
<DefaultValue>5</DefaultValue>
<Scope>constraint</Scope>
</Param>
</ConstraintType>

Second config.xml file:

<ConstraintType>
<Name>custom_conType</Name>
<GUIName >Custom Con Type</GUIName>
<Param>
<Name>customParam1</Name>     
<GUIName visibleInEditor="true">CustomParam</GUIName>
<Type>int</Type>
<ValueRange>0 7 9 -5</ValueRange>
<DefaultValue>5</DefaultValue>
<Scope>constraint</Scope>
</Param>
<Param>
<Name>customParam2</Name>     
<GUIName visibleInEditor="true">CustomParam</GUIName>
<Type>string</Type>
<DefaultValue>paramVal2</DefaultValue>
<Scope>constraint</Scope>
</Param>
<VerifyCB>myVerifyCB</VerifyCB>
</ConstraintType>

Here, first one is the closer config.xml (found earlier) and the second one is a distant one. When first one is loaded, a new constraint of the given type is created with the specified GUI name and a parameter, customParam. When the second one is loaded, the constraint type defined in the previous one is completely overridden with the new definition. Now, the constraint type has a new GUI name and two parameters, customParam1 and customParam2 along with a verification procedure.


Return to top
 ⠀
X