EDA Solutions logo

Choosing a programming/automation language

Published by Henry Frankland – Latest update on 11/10/2021

ID: TN020
Relevant product(s): L-Edit; S-Edit
Operating systems: Linux RHEL 6 and above; windows 10
Versions affected: 2020.2u3
Relevant area(s): Automation


The amount of scripting support for S-edit and L-edit is driven by the complexity of automation, speed and usability. S-edit uses Tcl as its sole programming language as it’s a easy to understand and build powerful automation/design manipulation scripts that are not frequently run. L-edit uses Tcl, Python and C/C++; choosing a language for L-edit depends on individual requirements and programming experience.


Brief overview of supported languages

Tcl – Tcl is a high-level string based dynamically typed runtime language which makes it easy to learn and quickly develop scripts.

Python – a high-level string based dynamically typed runtime language which makes it easy to learn and quickly develop scripts. Advantage of Python over Tcl is the extensive library repositories enabling the programmer to leverage powerful functionality with little development effort.

C/C++ – lower-level languages that are statically typed languages that need to be compiled before running. Provides the fastest operation, memory overhead and management.


S-edit is the simplest tool for programming considerations, only supporting the Tcl scripting language. The Tcl engine is highly integrated into the S-edit tool and enables the user to execute many of the operations in the GUI from the menus/command console or at opening of the design/tools. For more details, see the User’s Reference Manual for S-Edit shown in the references section below.

The Tcl engine enables users to create new behaviours or workaround problems that might hinder a project’s productivity within S-edit.

Typical uses for the S-edit Tcl engine:

  • Mass search and manipulate objects and properties within the project. However, please consider using the “Find” function before doing this in S-Edit as it could save time
    • Useful when importing data from other tools and database cleanup
  • Automating simulation execution and custom netlist export
  • Creating custom integrations
  • Creating custom user tool bar and hotkey that combines existing features to implement a more complex custom functionality.

Scripts can be executed in four different scenarios. On tool open, on design open, during runtime of the tools via “File > Execute Script… ”, drag and dropping into the command window, or by using the source command in the Tcl command window.



L-edit provides access to the C/C++ language which is used for two purposes, creating parameterised cells, and automatization scripts, commonly called User Programable Interface (UPI) Macros, or commonly UPI Macros. The UPI Macro interface exposes users and foundries to the same set functions required to build fully parameterised cells and control different aspects of the Layout tools. The C/C++ UPI interface provides the fastest layout construction/manipulation/automisation performance, consuming less memory, operating faster and providing memory management techniques. C/C++ macro may consume a few MB where tcl and python balloon in memory usage.

Fast runtimeSteeper learning curve for user not from a software background as it is a strong-typed language
Thorough control over aspects of your projects and their contentsModerate development time
Expandable; your codes can be easily updated and expanded. Plays well with other languages 
Highly supported by L-Edit natively and also throught the T-Cell Builder 


The Tcl has been part of the L-edit interface for a long time and offers additional functions in regards to automation of the environment. In versions 2019.2 update 0 and above siemens added access to the C/C++ Macro functions to allow the Tcl interface to manipulate, analyse and manipulate the layout view (versions between 2019.2-update-0 and 2020.3-update-1 require “enableUPI” to enable the functionality).

An advantage of the Tcl UPI is that the command window is a runtime Tcl command console that will run any single line Tcl command passed to it. Executing commands in this manner provides a quick method draft a function, experiment, test functions in Tcl for adding to a larger Tcl script, or before using the UPI Macro variant in a C script.

Simple to use and learnHigh Memory usage is very high
Tcl Command window realtime executionMemory not released at the exit of script
Additional functionality to control the GUI interface 
Can edit the layout view through the C/C++ UPI functions 


Python language support was introduced in v2020.1 update 3 and provides a language alternative for using the functions only available to C/C++. To run a python script users need to use the “pyscript -name {C:\path\to\script.py}“. Python interface provides functions that access the C/C++ functions and as such provides great control over the layout. A differentiator of the python language is that it has access to a few more functions that access the photonics related functions.

Active extensive internet knowledge baseHigh Memory usage is very high
Access to photonics featuresMemory not released at the exit of script
Dynamic language for UPI functions 

Comparison summary

The below table summarises a comparison between langauges. 3 is “best-in-category” and 1 is “limited”.

Code run speed312
Design complexity/Performance322
Development time233
ToolL-EditL-Edit & S-EditL-Edit
CommentsHigh performance and support, but steeper learning curve. Fast development language, slower performance due to RAM caching. Fast development language, but suffers same issues as TCL.

Please note that S-Edit TCL functions can be different to L-Edit.

Useful references

[1]         Siemens EDA, Tanner TM S-Edit TM User’s and Reference Manual, 1st ed. Siemens EDA, 2021. Accessed: Sep. 03, 2021. [Online]. Available: https://docs.sw.siemens.com/en-US/product/862138555/doc/DC202103016.docs.sedit_user.en_us/pdf?dest=M8.newlink.manualtitle

[2]         Siemens EDA, Tanner TM L-Edit TM Reference Manual, 1st ed. Siemens EDA, 2021. [Online]. Available: http://www.plm.automation.siemens.com/global/en/legal/online-terms/index.html