Fully integrated system to convert GDSII format files, such as the ones exported from Cadence Virtuoso, into SVG graphics for printing or display.
Prerequisites:
Should work on Windows, Linux, and Mac. Theoretically big-endian platforms are also supported (untested).
- Export your layout as GDSII format from the CAD software you're using. (see below)
- Run this utility in info mode to determine layers, by running
GDStoSVG.exe <myfile.gds> -info - Using the layer list the tool outputs and the generated SVG file (same name as the input GDS), determine what each layer ID corresponds to in your PDK's stackup
- If your SVG file is too large to open, you may want to export only a sub-unit to start, by using the
-unit <UNIT>parameter, with one of the units listed from step 2
- If your SVG file is too large to open, you may want to export only a sub-unit to start, by using the
- Create a CSV file with your layer IDs, names, colours, and opacities in the required format:
<Name>,<ID in range -32768 to 32767>,<Colour, RRGGBB hex>,<Opacity in range 0.0 to 1.0>- Example:
M1,50,3333CC,0.8
- Test your CSV file by running
GDStoSVG.exe <myfile.gds> -csv <layers.csv> -info - Repeat until you are happy with the layer assignments, and there are no unassigned layers remaining (unless you don't care about those layers)
- The CSV can be reused for any further exports using the same PDK. In the future, simply run
GDStoSVG.exe <myfile.gds> -csv <layer.csv> [-svg output.svg] - You can optionally export with
-optimizeto attempt to simplify the resulting geometry into as few shapes as possible. This will make the process take much longer, but is still several orders of magnitude faster than a union operation in Inkscape
There are some additional options available as well. Check GDStoSVG.exe -help for explanations.
- From the main Virtuoso window, go to File -> Export -> Stream
- Type in a file name, and select your library and top-level cell
- Make sure "Translate entire hierarchy" is checked on the "General" tab
- Other default configuration should be OK
- Use the exported GDS file as directed above
- This is still unfinished. Expect bugs.
- Text is not fully working yet.
- Arrays are not yet implemented.
The below tests were conducted on v0.2.0.13, on a 5800X3D system with 32GB of 3600MHz DDR4:
| Design | GDS Size | Mode | Time Taken | SVG Size |
|---|---|---|---|---|
| 13x16b Custom-designed register file (hierarchical) | 174 KB | (default) | 180ms | 5.75 MB |
| 13x16b Custom-designed register file (hierarchical) | 174 KB | -ignoretext |
150ms | 5.05 MB |
| 13x16b Custom-designed register file (hierarchical) | 174 KB | -optimize |
520ms | 3.51 MB |
| 13x16b Custom-designed register file (hierarchical) | 174 KB | -ignoretext -optimize |
510ms | 2.81 MB |
| Medium-size SAPRed DSP system (mostly flat) | 151 MB | (default) | 65s | 3.50 GB |
| Medium-size SAPRed DSP system (mostly flat) | 151 MB | -ignoretext |
43s | 2.23 GB |
| Medium-size SAPRed DSP system (mostly flat) | 151 MB | -optimize |
40m 21s | 2.75 GB |
| Medium-size SAPRed DSP system (mostly flat) | 151 MB | -ignoretext -optimize |
38m 55s | 1.48 GB |
There are still significant optimizations that could be done, I'd estimate runtime could be reduced by an order of magnitude. Maybe one day :)