Dynamic Scripting Language Translation(DSLT)

This page is dedicated to translating one scripting language to another such as Perl, Python, Tcl or even C/C++. With any EDA tool which has a simple scripting capability, you can turn its scripting code(e.g. Scheme, Skill or even Tcl) into your favorite programming language, use the same API names and your familiar data structures.


  1. Speeding up productivity
    Boost your scripting productivity by 10X, and forget all about crazy parentheses matching.
  2. Tool integration
    You can integrate even different EDA vendors' tools under one single scripting language, or you can have your own dedicated algorithm to affect the tool's behavior. Also, You can control one EDA tool from anther one even if they are from two different vendors.
  3. Command line editing and history
    You can even use an interactive shell which allows you to edit your command and scroll back command history.
  4. Requiring minimum support from the original scripting language
    This approach just need the original scripting language has the ability to read/write a file, and evaluate a text command. This is quite common to any scriptable EDA tool.
  5. Supporting rich data structures in the target scripting language
    You can use a well-supported hash or list in your target language, and forget all about
     (set! bBox (car (cdr (car (cdr lst))))). 


Original Language: Scheme
The following code shows a subroutine that prints out a cell instance with its ports and the port's net connection.
define findAllPortsInCellInst (lambda (cellId instanceName)
       (cellInst (dbGetCellInstByName cellId instanceName))
     (db-foreach cellId cellInst "portInst" portInstId
         (portName (dbFetchObjectField cellId portInstId "portName"))
         (netId (dbFetchObjectField cellId portInstId "netId"))
         (netName (dbFetchObjectField cellId netId "netName"))
        (display portName)(display " is connected to net ")
        (display netName)(newline)

With dynamic scripting language translation, we can write it in

  1. Perl
    sub findAllPortsInCellInst{
       my ($cellId,$instanceName)=@_;
       my ($cellInst,$portInstId,$netId,$netName);
       for $portInstId (@{&db_foreach($cellId,$cellInst,"portInst")}){
          print "$portName is connected to net $netName\n";
  2. Python
    def findAllPortsInCellInst(cellId,instanceName):
       for portInstId in db_foreach(cellId,cellInst,"portInst"):
          print portName,"is connected to net",netName
  3. Tcl
    proc findAllPortsInCellInst {cellId instanceName} {
       set cellInst [dbGetCellInstByName $cellId $instanceName]
       foreach portInstId [db_foreach $cellId $cellInst portInst] {
          set portName [dbFetchObjectField $cellId $portInstId "portName"]
          set netId [dbFetchObjectField $cellId $portInstId "netId"]
          set netName [dbFetchObjectField $cellId $netId "netName"]
          puts "$portName is connected to net $netName"


    A demo version is available.

    Send an email to me if you got any question.