RF-GDS is a MATLAB library to enable RF analog integrated-circuit designers to convert and manipulate GDS structures and then export them to Cadence layout without DRC errors. I needed a tool during my PhD to move designs from HFSS to Cadence layout without drawing the designs manually again in Cadence. Refere to the RF-GDS.pdf file for a quick overview. Although, I made this library for this specific application, I have created many general functions for GDS files that you might find useful.
Note: This library depends on the work of Ulf Griesmann in his gdsii-toolbox. This repository includes his source code together with any copyright notice therein.
Disclaimer: The library is not professionally written. I wrote it along the way as I needed. So always be aware if I missed anything in my descriptions. Make sure that it is doing what you intend and don't count on me taking care of everything for you !
Clone or download the library.
- Install mex compiler by running the file
mingw.mlpkginstall
here or google it for other methods if you dont have that file. - Set path in Matlab to
include all subfolders
in your location of the library. You can do that fromHOME --> Set Path
. - Compile the library by running
makemex.m
here. You need to do this only once.
Set path in Matlab to include all subfolders
in your location of the library. You can do that from HOME --> Set Path
.
General use:
- Import GDS files from HFSS, Cadence or create your own GDS elements/structures
- Perform operations such as Merge, Split, Mosaic, find intersections, Math operations (and, or, diff)...etc (List of functions).
- plot and visualize the designs in Matlab before exporting.
- Assign layer and datatype numbers to your elements - layer mapping.
- Rename your structures and gds libraries or change properties.
- Export GDS files.
- Check also gdsii-toolbox.
Specific use:
- Discretize a structure so that all vertices fit in the minimum assigned grid (minGrid) as specified in the PDK.
- Make all transitions with horizontal and vertical angles comply with the DRC of your technology.
- Fix/Distort your structures for minimum width and minimum spacing as needed. This works for RF passives since minor chanages won't affect the EM performance of the design if the distortion is much smaller than your minimum wavelength.
- Generate vias between metal structures.
- Fill empty spaces in your design by any basic grid block you want so that it can pass density requirements in DRC. Otherwise, leave it open for auto generated fillings in Cadence later on.
I included my latest project codes as a demo. I cannot include full details nor GDS
files. However, you can see the procedure flow and corrosponding images in RF-GDS.pdf file.
- Some of my functions can lose the identifier values for
layer number
anddatatype
number. It is a good practice to callGDS_reset
to remap before exporting. - Most functions deal with boundry data type only rather than path, text or others.
- Some of my functions do not deal with elements that have more than one boundry.
- Call
help
for details about the functions. Check out my codes for how to use them. - I kept the Graveyard which contains my previous and failed codes. It can help if you want to develop new codes.
- I did not optimise the codes for the fastest simulation time but I prioritize usability since I dont have very complicated desings.