Copyright 2013-2017 , Artwork Conversion Software, Inc.
updated: August 17, 2017 for v2.42
updated: March 17, 2020
SFGEN is a preprocessor which reads either GDSII stream files or ODB++ printed circuit board manufacturing data files. It is designed to be used to produce an optimized GDSII file for Artwork's Real Time Correction RIP (RTCR). In order to get maximum throughput out of the RIP we rely on the fact that large panels or LCDs contain repetitive data.
The SFGEN program identifies such repetitive data and separates it from the background (or frame) data that is not repetitive. This enables the RIP to effectively place a large number of pixels using bitmap copy as opposed to rasterizing the entire panel by brute force. As the bitmap copy is much faster than re-rasterizing the same input data over and over again, the net result is faster rasterization.
The output of the SFGEN program is a GDSII stream file (no matter whether the input is GDSII or ODB++) and it has a limited hierarchy optimized so that the RIP need do as little rasterization as needed.
Start up SFGEN
The main dialog will appear:
Use the Open button to select (open) either:
File - Select either a GDSII stream file or an ODB++ .tgz file.
Directory - Select the top level directory of an ODB++ hierarchy.
Read Only - if checked, SFGEN does not modify the contents of the input directory (for ODB++) and makes a copy. This may take more time if the ODB++ data is large.
Once you have selected the file, SFGEN will scan it, verify it is OK and will provide a list of Steps/Layers (for ODB++) or Cells/Layers (for GDSII) for you to select when running the conversion.
Output File/Base Name
Use the Browse button to select the location of the output stream file and its name.
Select the layer you want your data to appear on for the output GDSII file. If you don't select any particular layer it will defaul to layer 0. (Only applies for ODB++ input; for GDSII input it matches the selected input layer.)
Select the name of the top cell (structure) in your output GDSII file. If you do not make an entry it will default to TOP. (Only applies to ODB++ input; for GDSII input, the output cell matches the cell selected from the input.)
Once a file has been converted this button will go from gray text to black indicating it is active. Clicking on it will launch a GDSII viewer (specified in Advanced -> Settings) to display the output.
This list box will show the available steps in the ODB++ file or the available structures in the GDSII file. You must select one of the steps/structures - typically the user will select the top level Step (often named panel or array) which contains references to arrays of circuit steps.
ODB++ and GDSII files generally contain many layers; however it is normal to rasterize only one of these layers per image. Therefore one should select the layer to process. If the user selects more than one layer:
a) for ODB++ input, only a single layer may be selected.
b) for GDSII input, the selected layers will be merged into a single output layer.
Clicking on the Convert button will start the conversion.
Clicking on the Advanced button will open a tabbed dialog enabling the user to control Settings, Transformation, Annotation and Distortion.
In the example below the user opened the ODB++ file called: 226.tgz and selected the step called "array" and selected the layer named "top".
The advanced configuration is a tabbed dialog that enables the user to control the conversion settings, to define transformation, to define text annotations that will be dropped into the raster output and to load a distortion data file that can be used to compensate for distortion in the substrate.
There are three data flows supported by SFGEN:
GDSII Input: LCD and GDSCompact
ODB++ Input: Panel
So if you open an ODB++ file, you are, by default, in Panel mode.
This flow was designed for large printed circuit board panels where one (or a few) circuits are repeated and where these circuits are fairly independent of the frame or background data. The program identifies these cells, separates them from the background frame and creates a semi-flat GDSII file - the background data at the "top" level of the GDSII and the cell or cells in the second level.
A rasterizer (such as Artwork's RTCR) can then use bitmap copy operations on the repeating cells to very quickly rasterize the panel.
Panel is the default flow. It expects that the data matches a typical PCB panel - a single (or several) circuits arrayed onto a panel. (There is no checkbox for panel flow.)
Settings Tab (Panel Flow)
If you have loaded an ODB++ file the only available flow is PANEL. The check box to select LCD or GDSCompact is grayed out.
The directory where temporary files are stored on disk.
The number of concurrent threads to use during processing. Do not exceed the number of CPU cores. Do not count virtual cores created by hyperthreading.
Optimizes step repeat, where the software combines SR child steps together when possible. This is the default behavior. There is an option to turn it off because sometimes child steps overlap each other and combining it might produce an error with scratch data.
Append Log File
Does this checkbox turn on logging or does it direct the program to append to the existing log file after each run instead of overwriting the previous log file?
If checked, a progress window/bar is displayed as the program runs. For large and complex files, showing progress may slow down the overall conversion time.
If checked, temporary files in the working directory are not erased after completion. Useful when debugging. Also, if this option is checked, the user will find a script file in the working directory that can be used to run SFGEN from a command line. As the script is quite complex, this is the recommended way to obtain a prototype batch file.
Special arguments passed to the engine responsible for opening the input data. Only used for debugging.
Arc Resolution and Chord Error
When converting from ODB++ to GDSII this controls how arcs and circles are broken into segments.
When converting from ODB++ to GDSII this controls how arcs and circles are broken into segments. [This parameter was once called arcsag.]
sets the grid for the output GDSII. Typical values are 0.001 or 0.01. Coarser grids may result in a loss of precision. Output GDSII file is always in units of microns no matter whether the input file is in inches or mm.
a small tolerance (in um) used when testing whether output cells are identical or not. This is useful because the various explosions and union operations can create cell data that might be very slightly different - and in order not to generate a large number of almost identical cell definitions, the jitter parameter allows the program to treat all of them as a single cell.
The maximum number of vertices per boundary in the output GDSII file. If a polygon will exceed this number it will be broken into two (or more) polygons so that the max vertex count is not exceeded.
Instructs the program to use cut-lines instead of "butting" slices for polygons with islands. Do not use this option if you are also using the distortion function as it may result in illegal polygons in the output. This option is only present for testing purposes.
LCD mode makes certain assumptions about LCD layouts -- that the layout contains large structures and arrays. The program tries to re-factor these arrays to make them easier for a rasterizer to digest. The "span length" limits the dimensional size of the new cells that will be arrayed. If there is nested hierarchy inside the array, it is flattened and a new no-hierarchy cell is built for arraying - however the program makes sure that the flattened new cells do not exceed a maximum vertex count.
GDSCompact Flow and Parameters
The GDSCompact flow does not attempt to build a semi-flat file. Instead it focuses on reducing the nesting of the GDSII data to make it faster to process by certain rasterizers (not Artwork's rasterizer). It also breaks the polygons into quadrilaterals which are, by their nature, convex. Do not select this option if you have not consulted previously with Artwork concerning the type of rasterizer that will be used.
Command line arguments for the conversion engine are entered here. Normally this is left blank; the only time such arguments are needed is during testing and debugging.
Enter the path and executable of a GDSII viewer. When clicking the View Output button, SFGEN will call this program passing the name of the GDSII output file.
Enter the buffer size (this value is used in conjunction with the DPI) that the RIP will use to hold the repetitive data. This is not the raster buffer size but a separate buffer dedicated to holding the bitmap masters.
Offset (Edge Bias)
Order of TransformationThe transformations are performed in the following order:
all units are in microns except rotation which is in degrees
This tab enables the user to load an annotation file. The annotation file contains one or more annotation entries that instruct SFGEN to generate text (or to "annotate" the mask.) This text is usually some sort of an identification, lot stamp or date stamp associated with the actual writing of the mask.
If the Add Text check box is selected, the user should also select an annotation file by using the Browse button. (Checking the box and failing to select a legal annotation file will cause a conversion failure ...)
The annotation file can be created by hand, by an application or by a Qckvu3 plug-in.
The syntax and details of the annotation file are here.
Distortion refers to a correction applied to the CAD data in order to warp the CAD data so that it "fits" on a substrate that may have been subject to some physical distortion due to either temperature or possibly processing (such as etching one side). Distortion can be corrected either in the SFGEN program or it can be corrected in the RTCR.
The correction works by reading the coordinates in a table of common points from both the CAD data and the measured on the substrate. These points drive a correction engine that attempts to match the distortion found on the substrate. Of course, there is no guarantee that the distortion can be exactly matched from only a relatively small number of data points.
See the reference section for details and examples.
Use Correction File
If checked, SFGEN will read the user specified correction file and apply corrections to the output file. Use the browse button to select the appropriate text file containing the coordinates.
A value (in microns) used to determine whether an instance of a cell is equivalent to other instances. If this value is set too small, each bitmap placement will require its own definition and the RIP will not run very quickly. See the reference section on distortion to understand how the tolerance affects repetition and RIP throughput.
Reserved for use by the developers during debugging.