Welcome to the Bartels Group of Companies
IC-Design-Systemfunktionen - Deutsche Version IC Design System Functions - English Version
Bartels

Bartels System GmbH
Bartels
Bartels AutoEngineer
BAE Product Info
BAE Price List
BAE Downloads
BAE Documentation
BAE Installation Guide
BAE User Manual
BAE Libraries
User Language Programmer's Guide
Preface
1 Introduction
2 Language Description
3 Programming System
4 BAE User Language Programs
A Conventions and Definitions
B Index Variable Types
C System Functions
C.1 Function Reference
C.2 Standard System Functions
C.3 SCM System Functions
C.4 PCB Design System Functions
C.5 IC Design System Functions
C.5.1 IC Design Data Access Functions
C.5.2 Chip Editor Functions
BAE Update History
BAE Next Version Release Notes Preliminary
BAE V8.0 Release Notes
BAE V7.8 Release Notes
BAE V7.6 Release Notes
BAE V7.4 Release Notes
BAE V7.2 Release Notes
BAE V7.0 Release Notes
BAE V6.8 Release Notes
BAE V6.6 Release Notes
BAE V6.4 Release Notes
BAE V6.2 Release Notes
BAE V6.0 Release Notes
BAE V5.4 Release Notes
BAE V5.0 Release Notes
BAE V4.6 Release Notes
BAE V4.4 Release Notes
BAE V4.2 Release Notes
BAE V4.0 Release Notes
BAE V3.4 Release Notes
BAE Support
BAE Contributions
BAE Development and Service Companies
Electronics Development
Bartels Sport Service
Company Profile
Corporate Info
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: IC Design System Functions
Bartels User Language - Programmer's Guide

C.5 IC Design System Functions

Bartels AutoEngineer® Dokumentation

This section describes (in alphabetical order) the IC design system functions of the Bartels User Language. See Appendix C.1 for function description notations.

 

C.5.1 IC Design Data Access Functions

The following User Language system functions are assigned to caller type ICD; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:


icd_altpinlay - IC Design setup alternate pin layer (ICD)

Synopsis
int icd_altpinlay(            // Returns layer number (ICD1)
      );
Description
The icd_altpinlay function returns the alternate pin layer number defined in the BAE IC setup file for GDS input.

icd_cellconlay - IC Design setup internal cell connection layer (ICD)

Synopsis
int icd_cellconlay(           // Returns layer number (ICD1)
      );
Description
The icd_cellconlay function returns the layer number defined in the BAE IC setup for internal cell connections.

icd_cellscan - IC Design setup DRC on cell level mode (ICD)

Synopsis
int icd_cellscan(             // Returns cell DRC mode
      );
Description
The icd_cellscan function returns the cell DRC mode defined in the BAE IC setup (0 = no DRC for cell structures, 1 = DRC for cell structures).

icd_cellshr - IC Design setup cell keepout area shrink (ICD)

Synopsis
double icd_cellshr(           // Cell keepout area shrink value (STD2)
      );
Description
The icd_cellshr function returns the shrink value defined in the BAE IC setup for the automatic autorouter keepout area generation.

icd_ciflayname - IC Design setup CIF output layer name (ICD)

Synopsis
string icd_ciflayname(        // Returns layer name
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_ciflayname function returns the CIF output layer name defined for the given layer number (ICD1) in the BAE IC setup file.

icd_cstdsiz - IC Design setup standard cell height (ICD)

Synopsis
double icd_cstdsiz(           // Returns standard cell height (STD2)
      );
Description
The icd_cellshr function returns the standard cell height value defined in the BAE IC setup for the automatic cell placer.

icd_defelemname - IC Design setup default element name (ICD)

Synopsis
string icd_defelemname(       // Returns default element name
      );
Description
The icd_defelemname function returns the default IC Design element name defined in the BAE IC setup file.

icd_deflibname - IC Design setup default library name (ICD)

Synopsis
string icd_deflibname(        // Returns default library name
      );
Description
The icd_deflibname function returns the default IC Design library name defined in the BAE IC setup file.

icd_drcarc - IC Design setup DRC arc mode (ICD)

Synopsis
int icd_drcarc(               // Returns DRC arc mode
      );
Description
The icd_drcarc function returns the DRC arc mode defined in the BAE IC setup (0 = arcs allowed, 1 = no arcs allowed).

icd_drcgrid - IC Design setup DRC grid (ICD)

Synopsis
double icd_drcgrid(           // Returns DRC grid value (STD2)
      );
Description
The icd_drcgrid function returns the DRC grid value defined in the BAE IC setup.

icd_drclaymode - IC Design setup layer DRC mode (ICD)

Synopsis
int icd_drclaymode(           // Returns layer DRC mode
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_drclaymode function returns the DRC mode for the given layer defined in the BAE IC setup (0 = no DRC on the given layer, 1 = DRC on the given layer).

icd_drcmaxpar - IC Design setup DRC parallel check length (ICD)

Synopsis
double icd_drcmaxpar(         // Returns parallel check length (STD2)
      );
Description
The icd_drcmaxpar function returns the DRC maximal parallel structures length value value defined in the BAE IC setup.

icd_drcminwidth - IC Design setup DRC layer minimal dimensions (ICD)

Synopsis
double icd_drcminwidth(       // Returns DRC minimal value (STD2)
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_drcminwidth function returns the DRC minimal structure size value for the given layer defined in the BAE IC setup.

icd_drcrect - IC Design setup DRC orthogonal mode (ICD)

Synopsis
int icd_drcrect(              // Returns DRC orthogonal mode
      );
Description
The icd_drcarc function returns the DRC arc mode defined in the BAE IC setup (0 = arbitrary angles allowed, 1 = only right angles allowed).

icd_ecnlaymode - IC Design setup layer connectivity check (ICD)

Synopsis
int icd_ecnlaymode(           // Returns layer connectivity mode
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_ecnlaymode function returns the connectivity mode for the given layer defined in the BAE IC setup (0 = no connectivity on the given layer, 1 = connectivity on the given layer).

icd_findconpart - Find IC Design part index of a named part (ICD)

Synopsis
int icd_findconpart(          // Returns status
      string;                 // Part name
      & index I_CPART;        // Returns part index
      );
Description
The icd_findconpart function searches the IC Design connection list part index with the specified part name. The function returns zero if the part has been found or nonzero otherwise.
See also
Functions icd_findconpartpin, icd_findcontree.

icd_findconpartpin - Find IC Design part pin index of a named part pin (ICD)

Synopsis
int icd_findconpartpin(       // Returns status
      string;                 // Pin name
      index I_CPART;          // Net list part index
      & index I_CPIN;         // Returns net list part pin index
      );
Description
The icd_findconpartpin function searches an IC Design connection list part for the part pin index with the specified pin name. The function returns zero if the part pin has been found or nonzero otherwise.
See also
Functions icd_findconpart, icd_findcontree.

icd_findcontree - Find IC Design net index of a named net (ICD)

Synopsis
int icd_findcontree(          // Returns status
      string;                 // Net name
      & index I_CNET;         // Returns net index
      );
Description
The icd_findcontree function searches the IC Design connection list net index with the specified net name. The function returns zero if the net has been found or nonzero otherwise.
See also
Functions icd_findconpart, icd_findconpartpin.

icd_getrulecnt - Get rule count for specific object (ICD)

Synopsis
int icd_getrulecnt(           // Returns rule count or (-1) on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      );
Description
The icd_getrulecnt function is used for determining the number of rules attached to a specific object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_POOL index type value passed for the object ident code). The function returns a (non-negative) rule count or (-1) on error. The rule count determines the valid range for rule list indices to be passed to the icd_getrulename function for getting object-specific rule names. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_getrulecnt function.
See also
Functions icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_getrulename - Get rule name from specific object (ICD)

Synopsis
int icd_getrulename(          // Returns nonzero on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      int [0,[;               // Rule name list index
      & string;               // Rule name result
      );
Description
The icd_getrulename function is used to get the name of an index-specified rule assigned to the specified object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_POOL index type value passed for the object ident code). The rule name list index to be specified can be determined using the icd_getrulecnt function. The rule name is returned with the last function parameter. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_getrulename function.
See also
Functions icd_getrulecnt, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_gettreeidx - Find IC Design net index of a tree (ICD)

Synopsis
int icd_gettreeidx(           // Returns status
      int;                    // Net tree number
      & index I_CNET;         // Returns net index
      );
Description
The icd_gettreeidx function searches the IC Design connection list net index with the specified net tree number. The function returns zero if the net has been found or nonzero otherwise.

icd_grpdisplay - IC Design setup group display layer (ICD)

Synopsis
int icd_grpdisplay(           // Returns layer number (ICD1)
      );
Description
The icd_grpdisplay function returns the group display layer number defined in the BAE IC setup file.

icd_lastfigelem - Get last modified IC Design figure list element (ICD)

Synopsis
int icd_lastfigelem(          // Returns status
      & index I_FIGURE;       // Returns figure list index
      );
Description
The icd_lastfigelem function gets the last created and/or modified IC Design figure list element and returns the corresponding figure list index with the return parameter. The function returns zero if such an element exists or nonzero else.

icd_maccoords - Get IC Design (scanned) macro coordinates (ICD)

Synopsis
void icd_maccoords(
      & double;               // Macro X coordinate (STD2)
      & double;               // Macro Y coordinate (STD2)
      & double;               // Macro rotation angle (STD3)
      & double;               // Macro scaling factor
      & int;                  // Macro mirror mode (STD14)
      );
Description
The icd_maccoords function returns with its parameters the placement data of the currently scanned macro. This function is intended for use in the macro callback function of icd_scanall, icd_scanfelem or icd_scanpool only (otherwise zero/default values are returned).
See also
Functions icd_scanall, icd_scanfelem, icd_scanpool.

icd_nrefsearch - Search named IC Design reference (ICD)

Synopsis
int icd_nrefsearch(           // Returns status
      string;                 // Reference name
      & index I_FIGURE;       // Returns figure list index
      );
Description
The icd_nrefsearch function searches for the specified named reference on the currently loaded IC Design element. The figure list index is set accordingly if the named reference is found. The function returns zero if the named reference has been found or nonzero otherwise.

icd_outlinelay - IC Design setup cell outline layer (ICD)

Synopsis
int icd_outlinelay(           // Returns layer number (ICD1)
      );
Description
The icd_outlinelay function returns the cell outline layer number defined in the BAE IC setup.

icd_pindist - IC Design setup pin keepout distance (ICD)

Synopsis
double icd_pindist(           // Returns pin keepout distance (STD2)
      );
Description
The icd_pindist function returns the pin keepout distance value defined in the BAE IC setup for the automatic keepout area generation.

icd_plcxgrid - IC Design setup placement grid (ICD)

Synopsis
double icd_plcxgrid(          // Returns placement grid value (STD2)
      );
Description
The icd_plcxgrid function returns the horizontal cell placement grid value defined in the BAE IC setup for the automatic cell placement.

icd_plcxoffset - IC Design setup placement offset (ICD)

Synopsis
double icd_plcxoffset(        // Returns placement offset value (STD2)
      );
Description
The icd_plcxoffset function returns the horizontal cell placement offset value defined in the BAE IC setup for the automatic cell placement.

icd_routcellcnt - IC Design setup number of power supply cells (ICD)

Synopsis
int icd_routcellcnt(          // Returns cell count
      );
Description
The icd_routcellcnt function returns the number of power supply cells defined in the BAE IC setup.

icd_routcellname - IC Design setup name of power supply cell (ICD)

Synopsis
string icd_routcellname(
                              // Returns cell name
      int [0,[;               // Cell index
      );
Description
The icd_routcellname function returns the name of a power supply cell defined in the BAE IC setup file. The index can be in the range of 0 to icd_routcellcnt()-1.

icd_ruleerr - Rule System error status query (ICD)

Synopsis
void icd_ruleerr(
      & int;              // Error item code
      & string;           // Error item string
      );
Description
The icd_ruleerr function provides information on the current Rule System error state, and thus can be used to determine the error reason after an unsuccessful call to one of the Rule System management functions.
Diagnosis

The Rule System error state can be determined by evaluating the parameters returned with the icd_ruleerr function. The returned error item string identifies the error-causing element if needed. The possible error code values correspond with Rule System error conditions according to the following table:

Error CodeMeaning
0Rule System operation completed without errors
1Rule System out of memory
2Rule System internal error <e>
3Rule System function parameter invalid
128Rule System DB file create error
129Rule System DB file read/write error
130Rule System DB file wrong type
131Rule System DB file structure bad
132Rule System DB file not found
133Rule System DB file other error (internal error)
134Rule System rule <r> not found in rule database
135Rule System rule bad DB format (internal error <e>)
136Rule System object not found
137Rule System object double defined (internal error)
138Rule System incompatible variable <v> definition
139Rule System Rule <r> compiled with incompatible RULECOMP version

Depending on the error condition the error item string can describe a rule <r>, a variable <v> or an (internal) error status <e>. DB file errors refer to problems accessing the Rule System database file brules.vdb in the BAE programs directory. Internal errors usually refer to Rule System implementation gaps and should be reported to Bartels.

See also
Functions icd_getrulecnt, icd_getrulename, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulefigatt - Attach rule(s) to figure list element (ICD)

Synopsis
int icd_rulefigatt(           // Returns nonzero on error
      index I_FIGURE;         // Figure list element index
      void;                   // Rule name string or rule name list array
      );
Description
The icd_rulefigatt function is used to attach a new set of name-specified rules to the figure list element specified with the first function parameter. Either a single rule name (i.e., a value of type string) or a set of rule names (i.e., an array of type string) can be specified with the second function parameter. Note that any rules previously attached to the figure list element are detached before attaching the new rule set. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_rulefigatt function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulefigdet - Detach rules from figure list element (ICD)

Synopsis
int icd_rulefigdet(           // Returns nonzero on error
      index I_FIGURE;         // Figure list element index
      );
Description
The icd_rulefigdet function is used to detach all currently attached rules from the figure list element specified with the function parameter. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_rulefigdet function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_ruleplanatt. icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_ruleplanatt - Attach rule(s) to currently loaded element (ICD)

Synopsis
int icd_ruleplanatt(          // Returns nonzero on error
      void;                   // Rule name string or rule name list array
      );
Description
The icd_ruleplanatt function is used to attach a new set of name-specified rules to the currently loaded element. Either a single rule name (i.e., a value of type string) or a set of rule names (i.e., an array of type string) can be specified with the function parameter. Note that any rules previously attached to the current element are detached before the new rule set is attached. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_ruleplanatt function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplandet, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_ruleplandet - Detach rules from currently loaded element (ICD)

Synopsis
int icd_ruleplandet(          // Returns nonzero on error
      );
Description
The icd_ruleplandet function to detach all currently attached rules from the currently loaded element. The function returns zero on success or nonzero on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_ruleplandet function.
See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_rulequery; Neural Rule System and Rule System Compiler..

icd_rulequery - Perform rule query on specific object (ICD)

Synopsis
int icd_rulequery(            // Returns hit count or (-1) on error
      int;                    // Object class code
      int;                    // Object ident code (int or index type)
      string;                 // Subject name
      string;                 // Predicate name
      string;                 // Query command string
      & void;                 // Query result
      []                      // Optional query parameters of requested type
      );
Description
The icd_rulequery function is used to perform a rule query on a specific object. The object can be the currently loaded element (object class code 0 with int value 0 passed for the object ident code), a figure list element of the currently loaded element (object class code 1 with valid I_FIGURE index type value passed for the object ident code), or a pool list element (object class code 2 with valid I_POOL index type value passed for the object ident code). The rule query function requires a rule subject, a rule predicate and a query command string to be specified with the corresponding function parameters. The query command string can contain one query operator and a series of value definition operators. The following query operators are implemented:

?dfor querying int values
?ffor querying double values
?sfor querying string values

The query operator can optionally be preceded with one of the following selection operators:

+for selecting the maximum of all matching values
-for selecting the minimum of all matching values

The + operator is used on default (e.g., when omitting the selection operator). The rule query resulting value is passed back to the caller with the query result parameter. This means that the query result parameter data type must comply with the query operator (int for ?d, double for ?f, string for ?s). The query command string can also contain a series of value definition operators such as:

%dfor specifying int values
%ffor specifying double values
%sfor specifying string values

Each value definition parameter is considered a placeholder for specific data to be passed with optional parameters. Note that these optional parameters must comply with the query command in terms of specified sequence and data types. The icd_rulequery function returns a (non-negative) hit count denoting the number of value set entries matched by the query. The function returns (-1) on error. The icd_ruleerr function can be used to determine the error reason after an unsuccessful call of the icd_rulequery function.

Examples
With the rule
rule somerule
{
    subject subj
    {
        pred := ("A", 2);
        pred := ("A", 4);
        pred := ("B", 1);
        pred := ("C", 3);
        pred := ("B", 6);
        pred := ("D", 5);
        pred := ("D", 6);
        pred := ("A", 3);
    }
}

defined and attached to the currently loaded element, the icd_rulequery call

    hitcount = icd_rulequery(0,0,"subj","pred","%s ?d",intresult,"A") ;

sets the int variable hitcount to 3 and the int variable intresult to 4, whilst a call such as

    hitcount = icd_rulequery(0,0,"subj","pred","-?s %d",strresult,6) ;

sets hitcount to 2 and string variable strresult to B.

See also
Functions icd_getrulecnt, icd_getrulename, icd_ruleerr, icd_rulefigatt, icd_rulefigdet, icd_ruleplanatt, icd_ruleplandet; Neural Rule System and Rule System Compiler..

icd_scanall - Scan all IC Design figure list elements (ICD)

Synopsis
int icd_scanall(              // Returns scan status
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanall function scans all figure list elements placed on the currently loaded IC Design element with all hierarchy levels. User-defined callback functions are activated automatically according to the currently scanned element type. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword NULL. The return value of icd_scanall is nonzero on invalid parameter specifications, or if one of the referenced user functions has returned a scan error status.
Macro callback function
int macrofuncname(
      index I_MACRO macro,    // Macro index
      index I_POOL pool,      // Pool element index
      int macinws,            // Macro in workspace flag (STD10)
      string refname,         // Macro Reference name
      index I_LEVEL level,    // Macro signal level
      int stkcnt              // Macro stack depth
      )
{
      // Macro callback function statements
      :
      return(contscan);
}

The icd_maccoords function can be used for determining the macro placement coordinates. The return value of the macro callback function must be 1 for continue scan, 0 for stop scan or (-1) on error.

Polygon callback function
int polyfuncname(
      index I_POLY poly,      // Polygon index
      int layer,              // Polygon layer (ICD1)
      int polyinws,           // Polygon in workspace flag (STD10)
      int tree,               // Polygon tree number or (-1)
      index I_LEVEL level     // Polygon signal level
      )
{
      // Polygon callback function statements
      :
      return(errstat);
}

The return value of the polygon callback function must be zero if scan ok or nonzero on error.

Path callback function
int pathfuncname(
      index I_LINE path,      // Path index
      int layer,              // Path layer (ICD1)
      int pathinws,           // Path in workspace flag (STD10)
      index I_LEVEL level     // Path signal level
      )
{
      // Path callback function statements
      :
      return(errstat);
}

The return value of the path callback function must be zero if scan ok or nonzero on error.

Text callback function
int textfuncname(
      index I_TEXT text,      // Text index
      double x,               // Text X coordinate (STD2)
      double y,               // Text Y coordinate (STD2)
      double angle,           // Text rotation angle (STD3)
      int mirr,               // Text mirror mode (STD14)
      int layer,              // Text layer (ICD1)
      double size,            // Text size (STD2)
      string textstr,         // Text string
      int textinws            // Text in workspace flag (STD10)
      )
{
      // Text callback function statements
      :
      return(errstat);
}

The return value of the text callback function must be zero if scan ok or nonzero on error.

Layer check function
int laycheckfuncname(
      int layer,              // Scanned layer (ICD1)
      int class               // Element class (STD1)
      )
{
      // Layer check function statements
      :
      return(contscan);
}

The return value of the layer check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to the interesting layers with this function.

Level check function
int levcheckfuncname(
      index I_LEVEL level     // Scanned signal level
      )
{
      // Level check function statements
      :
      return(contscan);
}

The return value of the level check function must be 1 for continue scan, 0 for stop scan or (-1) on error. The scan process can be accelerated considerably if restricted to interesting signal levels with this function.

See also
Functions icd_maccoords, icd_scanfelem, icd_scanpool.

icd_scanfelem - Scan IC Design figure list element (ICD)

Synopsis
int icd_scanfelem(            // Returns scan status
      index I_FIGURE;         // Figure list element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanfelem function scans the specified IC Design figure list element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword NULL. The return value of icd_scanfelem is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See icd_scanall for the scan function definitions.
See also
Functions icd_maccoords, icd_scanall, icd_scanpool.

icd_scanpool - Scan IC Design pool element (ICD)

Synopsis
int icd_scanpool(             // Returns scan status
      void;                   // Pool element index
      double;                 // Scan X offset (STD2)
      double;                 // Scan Y offset (STD2)
      double;                 // Scan rotation angle (STD3)
      int [0,1];              // Element in workspace flag (STD10)
      int [0,1];              // Connectivity scan allowed flag:
                              //    0 = no scan allowed
                              //    1 = scan allowed
      * int;                  // Macro callback function
      * int;                  // Polygon callback function
      * int;                  // Path callback function
      * int;                  // Text callback function
      * int;                  // Drill callback function
      * int;                  // Layer check function
      * int;                  // Level check function
      );
Description
The icd_scanpool function scans the specified IC Design pool element with all hierarchy levels. User-defined callback functions for the currently scanned element type are automatically activated. If a certain callback function should not be referenced, then the corresponding parameter must be set to the keyword NULL. The return value of icd_scanpool is nonzero on invalid parameter specifications or if one of the referenced user functions has returned a scan error status. See icd_scanall for the callback function definitions.
See also
Functions icd_maccoords, icd_scanall, icd_scanfelem.

icd_stdlayname - IC Design setup standard layer name (ICD)

Synopsis
string icd_stdlayname(        // Returns layer name
      int [0,99];             // Layer number (ICD1)
      );
Description
The icd_stdlayname function returns the layer name defined for the given layer number (ICD1) in the BAE IC setup file.

icd_stdpinlay - IC Design setup standard pin layer (ICD)

Synopsis
int icd_stdpinlay(            // Returns layer number (ICD1)
      );
Description
The icd_stdpinlay function returns the standard pin layer number defined in the BAE IC setup file for GDS input.

icd_vecttext - Vectorize IC Design text (ICD)

Synopsis
int icd_vecttext(             // Returns status
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      int [0,1];              // Text mirror mode (STD14)
      double ]0.0,[;          // Text size (STD2)
      int [0,1];              // Text physical flag:
                              //    0 = logical
                              //    1 = physical
      int [0,2];              // Layer mirror mode:
                              //    0 = mirror off
                              //    1 = mirror X
                              //    2 = mirror Y
      int [0,[;               // Text style
      string;                 // Text string
      * int;                  // Text vectorize function
      );
Description
The icd_vecttext function vectorizes the specified text using the currently loaded text font. The text vectorize user function is automatically called for each text segment. The function returns nonzero if invalid parameters have been specified or if the referenced user function returns nonzero.
Text vectorize function
int vecfuncname(
      double x1,              // Start point X coordinate (STD2)
      double y1,              // Start point Y coordinate (STD2)
      double x2,              // End point X coordinate (STD2)
      double y2               // End point Y coordinate (STD2)
      )
{
      // Text vectorize function statements
      :
      return(errstat);
}

The return value of the text vectorize function must be zero if scan ok or nonzero on error.

 

C.5.2 Chip Editor Functions

The following User Language system functions are assigned to caller type CED; i.e., they can be called from the Chip Editor interpreter environment of the Bartels AutoEngineer:


ced_asklayer - CED layer selection (CED)

Synopsis
int ced_asklayer(             // Returns status
      & int;                  // Returns selected layer (ICD1)
      );
Description
The ced_asklayer function activates a Chip Editor layer selection menu. The function returns zero if a valid layer has been selected or (-1) if the layer selection has been aborted.

ced_delelem - Delete CED figure list element (CED)

Synopsis
int ced_delelem(              // Returns status
      & index I_FIGURE;       // Element
      );
Description
The ced_delelem function deletes the given figure list element from the figure list. The function returns zero if the element was successfully deleted or nonzero on error.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
See also
Function ced_drawelem.

ced_drawelem - Redraw CED figure list element (CED)

Synopsis
void ced_drawelem(
      index I_FIGURE;         // Element
      int [0, 4];             // Drawing mode (STD19)
      );
Description
The ced_drawelem function updates the display of the given figure list element using the specified drawing mode.
See also
Function ced_delelem.

ced_elemangchg - Change CED figure list element rotation angle (CED)

Synopsis
int ced_elemangchg(           // Returns status
      & index I_FIGURE;       // Element
      double;                 // New rotation angle (STD3)
      );
Description
The ced_elemangchg function changes the rotation angle of the given figure list element. The rotation angle must be in radians. The function returns zero if the element has been successfully rotated, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be rotated.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemfixchg - Change CED figure list element fixed flag (CED)

Synopsis
int ced_elemfixchg(           // Returns status
      & index I_FIGURE;       // Element
      int [0,1];              // New fixed flag (STD11)
      );
Description
The ced_elemfixchg function changes the fixed flag of the given figure list element. A fixed flag value of 0 resets the element fixed flag, a fixed flag value of 1 sets the element fixed flag. The function returns zero if the element fixed flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be fixed.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemgrpchg - Change CED figure list element group flag (CED)

Synopsis
int ced_elemgrpchg(           // Returns status
      index I_FIGURE;         // Element
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_elemgrpchg function changes the group flag of the given figure list element. A group flag value of 0 deselects the element, a group flag value of 1 selects the element. The function returns zero if the element group flag has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element cannot be selected to a group.

ced_elemlaychg - Change CED figure list element layer (CED)

Synopsis
int ced_elemlaychg(           // Returns status
      & index I_FIGURE;       // Element
      int;                    // New layer (ICD1)
      );
Description
The ced_elemlaychg function changes the layer of the given figure list element. The layer can be set for polygons, traces and texts. The function returns zero if the element layer has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element layer cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemmirrchg - Change CED figure list element mirror mode (CED)

Synopsis
int ced_elemmirrchg(          // Returns status
      & index I_FIGURE;       // Element
      int [0,2];              // New mirror mode (STD14|ICD3)
      );
Description
The ced_elemmirrchg function changes the mirror mode of the given figure list element. The mirror mode can be set for polygons, texts, named and unnamed references. The function returns zero if the element mirror mode has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element mirror mode cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemposchg - Change CED figure list element position (CED)

Synopsis
int ced_elemposchg(           // Returns status
      & index I_FIGURE;       // Element
      double;                 // New X coordinate (STD2)
      double;                 // New Y coordinate (STD2)
      );
Description
The ced_elemposchg function changes the position of the given figure list element. Polygons and/or traces are replaced to set the first point of the polygon/trace to the specified position. The function returns zero if the element has been successfully repositioned, (-1) if the figure list element is invalid or (-2) if the figure list element position cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_elemsizechg - Change CED figure list element size (CED)

Synopsis
int ced_elemsizechg(          // Returns status
      & index I_FIGURE;       // Element
      double;                 // New size (STD2)
      );
Description
The ced_elemsizechg function changes the size of the given figure list element. The size can be changed for texts, traces, named and unnamed references. For traces, a trace width change is performed. For named and unnamed references, the size specifies the scaling factor. The function returns zero if the element size has been successfully changed, (-1) if the figure list element is invalid or (-2) if the figure list element size cannot be set.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_getlaydispmode - Get CED layer display mode (CED)

Synopsis
int ced_getlaydispmode(       // Returns display mode (ICD9)
      int [0,99];             // Layer (ICD1)
      );
Description
The ced_getlaydispmode function returns the layer display mode for the given layer in the Chip Editor or (-1) on error.

ced_getmincon - Get CED Mincon function type (CED)

Synopsis
int ced_getmincon(            // Returns Mincon function type (ICD10)
      );
Description
The ced_getmincon function returns the currently active Chip Editor Mincon function type, i.e., the airline display mode (ICD10).

ced_getpathwidth - Get CED path standard widths (CED)

Synopsis
void ced_getpathwidth(
      & double;               // Returns small standard width (STD2)
      & double;               // Returns wide standard width (STD2)
      );
Description
The ced_getpathwidth function returns with its parameters the currently active Chip Editor standard widths for small and wide traces.

ced_getpickpreflay - Get CED pick preference layer (CED)

Synopsis
int ced_getpickpreflay(       // Returns pick preference layer (ICD1)
      );
Description
The ced_getpickpreflay function returns the currently active Chip Editor pick preference layer for element selection (ICD1).

ced_getwidedraw - Get CED wide line display start width (CED)

Synopsis
double ced_getwidedraw(       // Returns width value (STD2)
      );
Description
The ced_getwidedraw function returns the current Chip Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons.

ced_groupselect - CED group selection (CED)

Synopsis
int ced_groupselect(          // Number of changes or (-1) on error
      int [0,3];              // Element selection type:
                              //    0 = select by element type
                              //    1 = select by element layer
                              //    2 = select by element fixed flag
                              //    3 = select by element visibility
      int;                    // Element selection value according to type:
                              //    element type (0|ICD5) for selection type 0
                              //    element layer (ICD1) for select. type 1
                              //    element fixed flag (STD11) for select. type 2
                              //    element visible flag (0|1) for selection type 3
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_groupselect function changes the group flag of all elements of the specified type and/or value. The function returns the number of elements (de)selected or (-1) on error (i.e., on invalid and/or incompatible parameter specifications). Element selection value zero for element type selection is used for selecting elements of any type.
Warning
Internal IC Design element types such as the standard via definition(s) are excluded from group (de)selections with ced_groupselect to prevent from unintentionally modifying and/or deleting such elements and/or definitions when subsequently using other group functions.

ced_highlnet - Set CED net highlight mode (CED)

Synopsis
int ced_highlnet(             // Returns status
      int [0,[;               // Net tree number
      int [0,1];              // Highlight mode (0 = off, 1 = on)
      );
Description
The ced_highlnet function sets the highlight mode of the net specified by the given net tree number. A highlight mode value of 1 highlight the net, a highlight mode value of 0 de-highlights the net. The function returns nonzero if an invalid net tree number and/or highlight mode value has been specified.

ced_layergrpchg - Select CED group by layer (CED)

Synopsis
int ced_layergrpchg(          // Number of elements
      int [0,[;               // Layer number (ICD1)
      int [0,2];              // New group flag (STD13)
      );
Description
The ced_layergrpchg function changes the group flag of all elements placed on the specified layer. The function returns the number of elements (de)selected or (-1) on error.

ced_partaltmacro - Change CED net list part cell type (CED)

Synopsis
int ced_partaltmacro(         // Returns status
      string;                 // Part name
      string;                 // New part cell type name
      );
Description
The ced_partaltmacro function changes the cell type of the given net list part. The function returns nonzero if the part cell type has been successfully changed, (-1) for invalid input parameters, (-2) if the specified package does not contain all pins referenced by the part in the net list (cell is changed anyway), (-3) if the specified part does not exist in the net list, (-4) if the new cell type isn't allowed for this part, (-5) if the new cell macro couldn't be loaded, (-6) if the new cell couldn't be copied to the job file or (-7) on multiple cell change requests (e.g., a to b and then b to c) in one program run.
Warning
It is strongly recommended not to use this function in I_CPART index loops since the current I_CPART index variables are invalid after calling ced_partaltmacro.

ced_partnamechg - Change CED net list part name (CED)

Synopsis
int ced_partnamechg(          // Returns status
      string;                 // Old part name
      string;                 // New part name
      );
Description
The ced_partnamechg function changes the name of a net list part. The function returns nonzero if the part name has been successfully changed, (-1) for invalid input parameters, (-2) if the specified part is not yet placed, (-3) if the specified part does not exist in the net list, (-4) if the new name exists already or (-5) on multiple name change requests (e.g., a to b and then b to c) in one program run.
Warning
This function changes the net list and therefore requires a Backannotation It is strongly recommended not to use this function in I_CPART index loops since the current I_CPART index variables are invalid after calling ced_partnamechg.

ced_pickelem - Pick CED figure list element (CED)

Synopsis
int ced_pickelem(             // Returns status
      & index I_FIGURE;       // Returns picked element
      int [1,8];              // Pick element type (ICD5 except 6)
      );
Description
The ced_pickelem function activates an interactive figure list element pick request (with mouse). The required pick element type is specified with the second parameter. The picked figure list element index is returned with the first parameter. The function returns zero if an element has been picked or (-1) if no element of the required type has been found at the pick position.

ced_setlaydispmode - Set CED layer display mode (CED)

Synopsis
int ced_setlaydispmode(       // Returns status
      int [0,99];             // Layer (ICD1)
      int [0,127];            // Display mode (ICD9)
      );
Description
The ced_setlaydispmode function sets the layer display mode for the given layer in the Chip Editor. The function returns nonzero if the display mode couldn't be set.

ced_setmincon - Set CED Mincon function type (CED)

Synopsis
int ced_setmincon(            // Returns status
      int [0,8];              // Required Mincon function type (ICD10)
      );
Description
The ced_setmincon function sets the currently active Chip Editor Mincon function type, i.e., the airline display mode (ICD10). The function returns nonzero if an invalid Mincon function type value has been specified.

ced_setpathwidth - Set CED path standard width (CED)

Synopsis
int ced_setpathwidth(         // Returns status
      double ]0.0,[;          // Required small path width (STD2)
      double ]0.0,[;          // Required wide path width (STD2)
      );
Description
The ced_setpathwidth function sets the currently active Chip Editor standard widths for small and wide traces. The function returns nonzero if invalid an invalid width value has been specified.

ced_setpickpreflay - Set CED pick preference layer (CED)

Synopsis
int ced_setpickpreflay(       // Returns status
      int;                    // Required pick preference layer (ICD1)
      );
Description
The ced_setpickpreflay function sets the currently active Layout Editor pick preference layer for element selection (ICD1). The function returns nonzero if an invalid pick preference layer has been specified.

ced_setwidedraw - Set CED wide line display start width (CED)

Synopsis
int ced_setwidedraw(          // Returns status
      double ]0.0,[;          // Required width value (STD2)
      );
Description
The ced_setwidedraw function sets the current Chip Editor wide line display start width, i.e., the minimum trace width for displaying traces like filled polygons. The function returns nonzero if an invalid width value is specified.

ced_storepart - Place CED part or pin (CED)

Synopsis
int ced_storepart(            // Returns status
      string;                 // Reference name
      string;                 // Library symbol name
      double;                 // X coordinate (STD2)
      double;                 // Y coordinate (STD2)
      double;                 // Rotation angle (STD3)
      double;                 // Scaling factor
      int [0,1];              // Mirror mode (STD14)
      );
Description
The ced_storepart function stores a cell (or pin) with the given placement parameters to the currently loaded IC design (or cell) element. The next unplaced net list part is used if an empty string is passed for the reference name. The function returns zero if the part has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if all parts are placed already, (-3) if the specified part is placed already, (-4) if the part cannot be loaded, (-5) if the part pins do not match the net list specifications or (-6) if the part data could not be copied to the current job file.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storepath - Place CED internal polygon as path (CED)

Synopsis
int ced_storepath(            // Returns status
      int [0,99];             // Path layer (ICD1)
      double ]0.0,[;          // Path width (STD2)
      );
Description
The ced_storepath function generates a trace on the currently loaded IC Design using the specified placement parameters. The trace polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the trace has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is invalid.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storepoly - Place CED internal polygon (CED)

Synopsis
int ced_storepoly(            // Returns status
      int;                    // Polygon layer (ICD1)
      int [1,4];              // Polygon type (ICD4)
      int [0,2];              // Mirror mode (ICD3)
      );
Description
The ced_storepoly function generates a polygon on the currently loaded IC Design element using the specified placement parameters. The polygon points are taken from the internal polygon point list previously stored with bae_storepoint. The function returns zero if the polygon has been successfully generated, (-1) on invalid environment, (-2) on missing and/or invalid parameters or (-3) if the point list is not valid for the specified polygon type.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.

ced_storetext - Place CED text (CED)

Synopsis
int ced_storetext(            // Returns status
      string;                 // Text string
      double;                 // Text X coordinate (STD2)
      double;                 // Text Y coordinate (STD2)
      double;                 // Text rotation angle (STD3)
      double ]0.0,[;          // Text size (STD2)
      int;                    // Text layer (ICD1)
      int [0,1];              // Text mirror mode (STD14)
      );
Description
The ced_storetext function generates a text on the currently loaded IC Design element using the specified placement parameters. The function returns nonzero on wrong environment or missing/invalid parameters.
Warning
This function changes the current figure list and should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops. The input text string can be stored to a maximum of up to 40 characters; longer strings cause the function to return with an invalid parameter error code.

ced_storeuref - Place CED unnamed reference (via or subpart) (CED)

Synopsis
int ced_storeuref(            // Returns status
      string;                 // Library symbol name
      double;                 // Reference X coordinate (STD2)
      double;                 // Reference Y coordinate (STD2)
      double;                 // Reference rotation angle (STD3)
      double;                 // Reference scaling factor
      int [0,1];              // Reference mirror (STD14)
      );
Description
The ced_storeuref function stores an unnamed reference (via or subpart) with the given placement parameters to the currently loaded layout element (layout or part). For vias, the reference mirror mode, the reference scaling factor, and the rotation angle are ignored. The function returns zero if the reference has been successfully placed, (-1) on wrong environment or missing/invalid parameters, (-2) if the reference cannot be loaded or (-3) if the reference data could not be copied to the current job file.
Warning
This function changes the current figure list and thus should be used carefully in forall loops for iterating I_FIGURE index variables to avoid unpredictable results on figure list access and prevent from running into endless loops.
Bartels :: Bartels AutoEngineer :: BAE Documentation :: User Language Programmer's Guide :: System Functions :: IC Design System Functions

IC Design System Functions
© 1985-2024 Oliver Bartels F+E • Updated: 30 July 2009, 10:06 [UTC]

© 1985-2024 Oliver Bartels F+E Bartels Homepage Contact and Corporate Info

Web Development by Baumeister Mediasoft Engineering

IC-Design-Systemfunktionen - Deutsche Version IC Design System Functions - English Version