GDSSCALE is a utility program that can be used to scale or transform GDSII data. It is useful when one has to match units of different GDSII files to be combined or when one needs to center or rotate or mirror GDSII data.
The output is the same GDSII file with all cell names and hierarchy and layers/datatypes preserved.
Occasionally an engineer needs to convert a GDSII file from one unit to another. For example, an incoming file may be in MM and it is needed in UM to work with some other tools.
In that case the user need only run GDSSCALE with a -outunit:UM on the command line and the input file will be converted to an output file with new units (and resolution) Any scaling of data needed to support the new unit/grid is automatically performed.
There are other times when an incoming GDSII file needs to be physically transformed. Examples of this are offset (to center the data) or rotation or mirroring or even scaling.
All of these transformations are available using the -xform: directive on the command line.
Command Line Syntax
The gdsscale uses the following command line syntax:
gdsscale64.exe input_file output_file -xform:parameters -output_unit:UNIT where gdsscale64.exe path/name of the executable input_file path/name of the gdsii input file output_file path/name of the new gdsii file to create -xform:list physical transform directive -outunit:UNIT units of output file: UM, MM, MIL, INCH -outgrid:0.0001 Specify grid of output file to be 10000
The Transform Parameter List
If the -xform: directive is used it must be followed by a list of parameters in this order:
-xform:anchor_x, anchor_y, rotation(ccw), mirror_x, mirror_y, scale_x, scale_y, offset_x, offset_y
The order of transformation is as follows:
Any scaling due to the outunit: directive is done last.
We start with a simple GDSII file called: test_pattern_for_transform.gds that you can see below. We then run it through GDSSCALE with different parameters in the -xform directive.
Now we will run this file through gdsscale with different transformations.
gdsscale64.exe "%CD%\test_pattern_for_transform.gds" "%CD%\mirrorX.gds" -xform:0,0,0,1,0,1,1,0,0
gdsscale64.exe "%CD%\test_pattern_for_transform.gds" "%CD%\mirrorY.gds" -xform:0,0,0,0,1,1,1,0,0
gdsscale64.exe "%CD%\test_pattern_for_transform.gds" "%CD%\rotate270.gds" -xform:0,0,270,0,0,1,1,0,0
Rotate 270 + MirrorX
gdsscale64.exe "%CD%\test_pattern_for_transform.gds" "%CD%\rotate270_mirrorX.gds" -xform:0,0,270,1,0,1,1,0,0