• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. Introduction to SKILL

Stats

  • Replies 3
  • Subscribers 20
  • Views 9743
  • Members are here 0
More Content

Introduction to SKILL

PCBTech
PCBTech over 1 year ago

Cadence SKILL is a high-level, interactive programing language based on Lisp. There are various flavors of SKILLs available, depending on the tool. For example, Allegro SKILL is supported in Allegro PCB Editor, which is a PCB design tool, while Virtuoso SKILL caters specifically to IC (Integrated Circuit) design tasks. APIs for the tool are usually prefixed according to the tool name or feature name. Despite variations in their APIs, all flavors of SKILLs are built over a common core SKILL engine.

Because this post is about Allegro SKILL, we will mainly be talking about Allegro SKILL here.

Allegro SKILL APIs provide access to the database for Allegro PCB Editor and Advanced Package Designer+ (APD+). Allegro SKILL APIs have a prefix, axl, in their names, which stands for Allegro Extended Language. AXL functions are classified into families that typically have similar calling sequences and share a common part of their names, for example, the axlDBCreate family with members such as axlDBCreateShape and axlDBCreateSymbol.

You can use SKILL to write custom commands and extend the functionality of Allegro PCB Editor to meet your company’s specific needs.

How to run Allegro SKILL

Because SKILL is an interpretive language, no compiling is needed. There is no IDE for Allegro SKILL, but you can highlight the code in Notepad++ and Visual.

You can run AXL-SKILL by typing skill on the Allegro PCB Editor command line. The AXLSKILL interpreter appears with a skill> prompt in place of the Allegro PCB Editor command line.

You can also run AXL-SKILL functions from the Allegro PCB Editor command line with the following syntax:

skill <function-name> <arguments> 

Type exit to close the AXL-SKILL interpreter and return to the Allegro PCB Editor command line.

You can get a larger SKILL-only window by setting the Allegro PCB Editor environment variable, telskill. 

command > set telskill

Licenses required for Allegro SKILL

Allegro PCB/Packaging tools do not need a separate license to run SKILL or Allegro SKILL. By default, SKILL and Allegro SKILL come with all necessary licenses.

Types of Allegro SKILL APIs

Allegro SKILL has APIs for the following objects:  

  • Allegro PCB Editor database objects: Reading database, creating objects, interactive Allegro PCB Editor commands like Delete Objects and Show Objects
  • Allegro PCB Editor database parameter objects: Read/Write access.
  • Using PCB Editor command window: Setting Allegro variables, running commands on the Allegro PCB Editor command window
  • GUI or user interface functions: Creating new forms with fields like buttons, TreeView, tabs, and so on; predefined forms for prompting and getting confirmation from the user, displaying text files, ASCII files.
  • Command control functions: Registering and unregistering SKILL commands with the command interpreter, getting and setting controls for the line lock, active layer, defining popups, getting user data.
  • Constraint Management: Getting and setting current DRC modes and values for design constraints and ECSet members.
  • Polygon operation functions: A polygon is a set of points linked such that the start and endpoint are same. A poly is always non-intersecting and may contain holes. A hole is a non-intersecting closed loop enclosed within a poly. You can perform geometric operations like Logical AND (the intersection of two polys) or query operations like the area or holes of the polygon.
  • Utility functions, Math utility functions: Utility functions to access files and Math utility functions.

Refer to the Allegro SKILL User Guide to learn about these APIs in detail.

Allegro SKILL database

Allegro PCB Editor stores design data as various types of objects in a proprietary database format, which can create a complete representation of an electronic layout. You can create, operate on, and extract information from this database by using AXLSKILL APIs or functions.

Each Allegro database object has an associated type and a set of attributes that describe the object. The AXL-SKILL database stores both physical and logical information about the design.

  • Physical information such as geometrical shapes (for example, connecting etch)
  • Logical information such as nets and logical components

Accessing information from the database object

You can use the SKILL special attributes (? and ??) to see all attributes and all attribute/value pairs of an object. You can use an AXL-SKILL function with -> (the access operator) to access any object attribute. If the attribute does not exist for an object, the function returns nil.

Following is an example of using ->??

To flatten attributes in lists, use the ~> reference. For example, to get names of all nets in the design, you can do the following:

netNames = axlDBGetDesign()->nets~>name

Constraint Manager SKILL

Constraint Manager SKILL is a programable interface that provides access to the Constraint Manager data, including object information, relationships, and properties. Constraint Manager SKILL programs can be used in both Allegro PCB Editor and DE-HDL, offering flexibility and consistency across different design stages. Constraint manager SKILL API’s start with cm. APIs for Allegro PCB Editor start with cmxl.

To use Constraint Manager SKILL in Allegro tools, you need to use axlCMDBInit to initialize the Constraint Manager SKILL database.

There are many APIs in Allegro SKILL and DE-HDL SKILL to access the constraints such as axlCNSGetSpacing and axlCNSSetSpacing to get and set the Spacing Constraint Set. Following is an example to access actual values of the constraints like Relative Delay:

axlCMDBInit(); This function initializes the Constraint Manager database server.

dsn = cmxlFindObject(ACNS_DESIGN); This function queries the Constraint Manager database and returns an object if it exists.

ec1=cmxlFindObject(ACNS_ECSET, "Cadence", dsn); Cadence is the name of the ECSet.

cmxlDBSkillInit(dsn); This function initializes the Constraint Manager database for SKILL access.

cmxlGetPropertyNames(ACNS_ECSET, ACNS_NULL_ATTR_KIND ACNS_NULL_CATEGORY ACNS_ANY_ATTR_DOMAIN); This function is used to find the property name.

pc1 = cmxlGetAttribute(ec1 "TOPOLOGY_TEMPLATE_MAPPING_MODE"); This function queries an object for an attribute and returns the value as requested.

 

Feel free to comment if you want to know more about any other topic in SKILL!!

  • Sign in to reply
  • Cancel
  • BRC7
    BRC7 over 1 year ago

    Is there a way to access SKILL API without opening PCB editor? For example, a batch script that takes in a pcb as input and generates a net length report. This would save time in opening the design for simple tasks like extracting data

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mahimag
    mahimag over 1 year ago in reply to BRC7

    HI BRC7, you can actually achieve this using a batch file and scripts. 

    The contents of the batch file might be only two lines as follows: 

    set noconfirm=t

    for %%f IN (*.dra) DO start /wait allegro -<LicenseName> -s test.scr %%f

    The scr file is the script file which you can record in Allegro PCB Editor to write a net lenght report.

    Let me know if you want to know about this in detail. You can record loading your skill files in script as well.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 1 year ago in reply to mahimag

    BRC7,

    the majority of the allegro reports are available from the auxiliary 'report' command, which does not require a license

    for example, below I generate a 'Etch Length by Net' report for a board file

    D:\SPB_Data\Teraspeed\FQSFP_TestCard\Layout>report -v eln FQSFP_TestCard_2024080801.brd
    Report written to D:/SPB_Data/Teraspeed/FQSFP_TestCard/Layout/eln_rep.rpt

    D:\SPB_Data\Teraspeed\FQSFP_TestCard\Layout>head eln_rep.rpt
    Trace Length Report
    D:/SPB_Data/Teraspeed/FQSFP_TestCard/Layout/FQSFP_TestCard_2024080801.brd
    Fri Aug 9 16:22:19 2024

    Net Name,Etch Length (mils),Manhattan Length (mils),Percent Manhattan (mils)
    2GND,1658.284,10739.866,15.440
    2RX1_N,1187.907,1249.288,95.087
    2RX1_P,1187.154,1375.291,86.320
    2RX2_N,1323.592,1535.036,86.225
    2RX2_P,1323.615,1661.040,79.686

    D:\SPB_Data\Teraspeed\FQSFP_TestCard\Layout>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information