SFGEN Command Line Syntax

The SFGEN program can be run from the command line. This enables a user to create scripts to run multiple layers or to have custom settings for different layers.

Displaying the Syntax

To see the syntax and options type at a command prompt:

sfgen64.exe -h

Syntax Details

sfgen64.exe -job:<input_path> -workdir:<working_dir> [OPT_ARGUMENTS]

where

sfgen64.exe                   name and path to the executable

-job:input_path               for GDSII input:
                              a path/name of the GDSII file
						  
                              for ODB++ input either:
                              a path to the top level of the ODB file hierarchy
                              or
                              a path/filename to a .tgz file
                              
-workdir:<working_dir>        where temp files will be stored during conversion



[OPT ARGUMENTS]

-outdir:<out_dir>             for ODB++ input
                              an output directory
                              
                              for GDSII input
                              an output directory/file

-log:<logpath>                path and name of the log file

-thrnum:<num_threads>         max number of concurrent threads

-arcres:<res_dbl_value>       arc resolution in degrees

-arcsag:<sag_dbl_value>       arc sag (in um)

-usergrid:<val>               Set the usergrid

-maxpts:<val>                 Maximum polygon vertex count

-jitter:<val>                 Specify jitter in classifying structures 

-cutline                      if specified gdsii islands are formed as cut lines
                              if omitted, butting polygons are used
                              
-nosropt                      Disable Step-Repeat optimization 

-silent                       Disable pop-ups (even on error)

-keep                         Keep temporary files; Default is to erase
                              temp files when program completes.

  

-gds_layer:<layer_int_value> output GDSII file layer

-gds_struct:<struct_name>    output GDSII top structure name


For GDSII Input Only
====================

-struct:<cellname>           input file structure to process
-layers:<+0+1+2>             list of layers to convert (datatype selection yes)
-lcd                         if present, turns on LCD algorithms
-gdscmponly                  Use GdsComp flow only
-fullunion                   Do full union

-preservetree                Preserve GDSII tree (GdsComp flow only)
-ignorecells:<fname>         Ignore cells listed in the specified file
-no_ignore_children          Ignore specified cells only, not their children 
                             (used with -ignorecells and -preservetree)
                             
-prescale:<val>              Convex prescale  
-spanlength:<span length>    size of aggregation cell in um(see reference)
-structvertcnt:<max count>   max number of vertices in aggregated cell (see reference)
-minlen:<val>                Set minimum structure dimension (length)
-arcrecovery:<val,val>       Recover arcs [input chorderr,output chorderr]
-convex                      Std convex partitioning
-straddle                    Straddle arc recovery
-quad[:<d|x,y>]              Quad convex partitioning [quad length] 
-quad_array:<val,val>        Specify quad array length and cell size
-quad_algo:<1|2|1,2>         Quad algorithm used
-quad_direction:<x|y>        Quad preferred direction (use instead of -quad_algo)
-xrunlength                  Run length in X direction
-quad_area:<val>             Quad area criteria
-quad_angle:<val,val>        Quad angle error limits (soft,hard)
-quad_aratio:<val,val>       Quad aspect ratio error limits (soft,hard)
-quad_weight:<w,w,w,w>       Quad criteria weights (quad count,angle,aspectratio,area)
-quad_error                  Output Quad error data
-fanout_tile_size:<val>      Fan Out tile size (must be greater than 0.0)
-fanout_array                Fan Out array used with -fanout_tile_size
-allowed_db                  Allowed DBU error
-equivstructs                Prune equivalent structures 
-extendedcomparison          Extended comparison used with -equivstructs 
-sliver                      Equivalent structures tolerance
-lcdarg:<polyhier arguments> Special arguments for LCD mode


For ODB++ Input Only
====================
-dbg[:[log_fname]]          :Enable debugging
-step:[step[,lyr1,lyr2,..]  :Convert a specific step(/layers) NOT optional
-deemb_surf:[0 or 1]        :Set de-embbed surface mode (1 on, 0 off)
-nocopyin                   :Load ODB++ input w/out copying (directory only)
-exclude:[stepnames]        :Set steps to be excluded
-excludel:[layernames]      :Set layers to be excluded
-show_progress              :Enable progress dialog
-not_semiflat               :Attempt to preserve hierarchy
-nhargs [args]              :Pass args to new hierarchy
-pnhargs [args]             :Pass args to postnh
   -angle:Degrees,X,Y   -mirrorx:X,Y     -mirrory:X,Y
   -scale:Sx,Sy,X,Y     -translate:Tx,Ty
   -offset:Mode,Offxy   -offset:Mode,Offx,Offy
   -fivept

-path_recovery_args [args]  :Pass args to path_recovery
   -singlets            -pads            -participating
   -termination_rule:N   N is 0, 1, 2
   -tolerance_um:V      -sliver:V
   -min_width_um:V      -max_width_um:V  -nominal_width_um:V
   -cutlines            -butting
   -arcres
   -output_source_path_data:L[:D]
   -layer:B[,L[,P]]      B, L and P are L[:D] corresponding 
                         to boundaries, paths and pads
   -retain_ref_file
   -angle:Degrees,X,Y   -mirrorx:X,Y     -mirrory:X,Y
   -scale:Sx,Sy,X,Y     -translate:Tx,Ty
   -offset:Mode,Offxy   -offset:Mode,Offx,Offy
   
-engargs:<args>              special arguments for odb2gdx (rarely used)


Transformation Arguments
=========================
-dpi:[dpi_val]                   :Set dpi
-buffer:[buffer_val]             :Set buffer
-rotate:[rot[,xanchor,yanchor]]  :Set rotation
-mirror:x[,xanchor,yanchor]      :Set mirror x
-mirror:y[,xanchor,yanchor]      :Set mirror y
-scale:[x,y[,xanchor,yanchor]]   :Set scale
-shift:[x,y]                     :Set shift
-offset:[type,x,y]               :Set offset
-fivept                          :Set five point sizing
-manh                            :Set manhattan sizing
-randomsizing:[val]              :Set type of random sizing


Annotation Options
====================
-annotate:[filename]             :Set annotation file
-annoarg:[args]                  :Set annotation args
-correction:[filename]           :Set correction file
-corrarg:[args]                  :Set correction args
-tolerance:[corr_tolerance]      :Set correction tolerance


Correction Options
===================
-correction:<correction_file>     turns on correction and defines file to read
-corrarg:<corection_arguments>    special arguments for correction engine
-tolerance:<correction_tolerance> tolerance for correction (in um)

Example 1

Assume we have an ODB++ file called input.tgz and we want to create 4 GDSII files using the ODB++ layers: l1, l2p, l3p and l4. The ODB++ step to process is called panel. Our DPI is 5080. No correction or annotation. The command line could look like this: (I've put in returns to make it fit on the page ...)

c:\wcad\sfgen64\sfgen64.exe -job:"E:\cad_files\input.tgz"
   -step:panel,l1 -outdir:"E:\cad_files\l1"
     -gds_layer:1 -gds_struct:TOP
       -workdir:"E:\cad_files\temp" 
        -thrnum:4 -arcres:45 -arcscag:2 -dpi:5080 -buffer:2048
		  
c:\wcad\sfgen64\sfgen64.exe -job:"E:\cad_files\input.tgz"
   -step:panel,l2p -outdir:"E:\cad_files\l2p"
     -gds_layer:1 -gds_struct:TOP
       -workdir:"E:\cad_files\temp" 
        -thrnum:4 -arcres:45 -arcscag:2 -dpi:5080 -buffer:2048 

c:\wcad\sfgen64\sfgen64.exe -job:"E:\cad_files\input.tgz"
    -step:panel,l3p -outdir:"E:\cad_files\l3p"
      -gds_layer:1 -gds_struct:TOP
        -workdir:"E:\cad_files\temp" 
         -thrnum:4 -arcres:45 -arcscag:2 -dpi:5080 -buffer:2048 	

c:\wcad\sfgen64\sfgen64.exe -job:"E:\cad_files\input.tgz"
   -step:panel,l4 -outdir:"E:\cad_files\l4"
    -gds_layer:1 -gds_struct:TOP
      -workdir:"E:\cad_files\temp" 
        -thrnum:4 -arcres:45 -arcscag:2 -dpi:5080 -buffer:2048  
		  

Each GDSII file would be in its own directory with data on GDSII layer 1 and a top structure named TOP.



Example 2 - Running SFGEN command line with Transformation

Assume we have a GDSII file called D001406_B_PRDL1_29_MP1433.003.gds and we want to run it from the command line with some transformation but no corrections on layer 29:20.
In this example, we are converting the input file an applying a transformation - Mirror along X. No correction is used with this example. We use the -keep option to keep the log file and some other work related files. What we just did is creating a master GDSII file with the transformation you are interested in. You can next run all your corrections on this file with out wasting time running sfgen64.exe again.

C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\D001406_B_PRDL1_29_MP1433.003.gds 
 -outdir:%CD%\out\first.gds -workdir:%CD%\work -log:%CD%\out\first.log
  -struct:TOP -layers:+29:20  
   -thrnum:4 -arcres:3 -arcsag:0.2 
    -jitter:1 -dpi:25400 -buffer:1024 
     -rotate:0,0,0 -mirror:x,0,0 -scale:1,1,0,0 
      -shift:0,0 -keep
	  


Example 3 - Running the Correction Engine by itself

After running the input file through the transformation process using sfgen64.exe, we can now perform corrections on the file we mirrored in the previous step. The correction process is much faster than the first step. You should use this approach if you need to perform multiple corrections on the transformed file.

c:\wcad\SFGEN64\sffcorrection64.exe %CD%\out\first.gds  
 %CD%\cor.txt 
  %CD%\out\corrected.GDS 
    -tolerance:2 
     -log:%CD%\work\corrected.LOG 
      -silent


Example 4 - Running SFGEN64 with Transformation and Correction in One Command

You can also run the sfgen64.exe with both transformation and correction in one command. Use this approach if you only need to do one type of correction.

C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\D001406_B_PRDL1_29_MP1433.003.gds 
 -outdir:%CD%\out\correction.GDS -workdir:%CD%\work  -log:%CD%\out\correction.log
  -struct:TOP -layers:+29:20  
   -thrnum:4 -arcres:3 -arcsag:0.2
   -jitter:1 -dpi:25400 -buffer:1024
    -rotate:0,0,0 -mirror:x,0,0 -scale:1,1,0,0 -shift:0,0 
      -correction:%CD%\cor.txt -tolerance:2 


Example 5 - Running SFGEN64 with Transformation and Path Recovery in One Command

You can also run the sfgen64.exe with both transformation and Path Recovery in one command. While transformation is supported with Path Recovery, Sizing is not supportd.
If Sizing is present, path recovery flow will be defeated and a message to that effect will be issued and transformations and sizing will be handled by the post new hierarchy (POSTNH) engine.

# options to SFGEN

AUXSFGEN="-rotate:90,111000,222000 -scale:1.1,1.2,-30000,-45000 -mirror:x,120000,130000 -mirror:y,150000,160000 -shift:250000,300000"
AUXSFGEN=

# options to the path recovery engine

PRARGS="-angle:90.0,1110000.0,2220000.0 -mirrorx:1200000.0,1300000.0 -mirrory:1500000.0,1600000.0 -scale:1.1,1.2,-300000.0,-450000.0 -translate:2500000.0,3000000.0"
PRARGS=

# PNHARGS - option to SFGEN to be passed downstream to the POSTNH engine

PNHARGS="-pnhargs -angle:90.0,1110000.0,222000.0 -mirrorx:120000.0,130000.0 -mirrory:150000.0,1600000.0 -scale:1.1,1.2,-300000.0,-450000.0 -translate:2500000.0,3000000.0"
PNHARGS=

C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\226_array.tgz 
 -outdir:%CD%\out\pr -workdir:%CD%\work  -log:%CD%\out\pr.log
  -step:array,top -thrnum:4 $PNHARGS $AUXSFGEN $* -path_recovery_args 
  -thrnum:16 -retain_ref_file -singlets -pads -output_source_path_data:4 -nominal_width_um:auto -layer:1,2,3 $PRARGS

  
Here is the command line when the transformation options are added to the standard sfgen ($AUXSFGEN) command line:
C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\226_array.tgz 
 -outdir:%CD%\out\pr -workdir:%CD%\work  -log:%CD%\out\pr.log
  -step:array,top -thrnum:4 -rotate:90,111000,222000 -scale:1.1,1.2,-30000,-45000 -mirror:x,120000,130000 -mirror:y,150000,160000 -shift:250000,300000 
  -path_recovery_args -thrnum:16 -retain_ref_file -singlets -pads -output_source_path_data:4 -nominal_width_um:auto -layer:1,2,3


Here is the command line when the transformation options are added to the post new hierarchy ($PNHARGS) additional arguments:
C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\226_array.tgz 
 -outdir:%CD%\out\pr -workdir:%CD%\work  -log:%CD%\out\pr.log
  -step:array,top -thrnum:4 -pnhargs -angle:90.0,1110000.0,222000.0 -mirrorx:120000.0,130000.0 -mirrory:150000.0,1600000.0 -scale:1.1,1.2,-300000.0,-450000.0 -translate:2500000.0,3000000.0 $* 
  -path_recovery_args -thrnum:16 -retain_ref_file -singlets -pads -output_source_path_data:4 -nominal_width_um:auto -layer:1,2,3


Here is the command line when the transformation options are added to the path recovery ($PRARGS) additional arguments:
C:\wcad\SFGEN64\sfgen64.exe -job:%CD%\226_array.tgz 
 -outdir:%CD%\out\pr -workdir:%CD%\work  -log:%CD%\out\pr.log
  -step:array,top -thrnum:4 -path_recovery_args 
  -thrnum:16 -retain_ref_file -singlets -pads -output_source_path_data:4 -nominal_width_um:auto -layer:1,2,3 
  -angle:90.0,1110000.0,2220000.0 -mirrorx:1200000.0,1300000.0 -mirrory:1500000.0,1600000.0 -scale:1.1,1.2,-300000.0,-450000.0 -translate:2500000.0,3000000.0



Back to Manual