Get from Ico-github-logo

Highlights from

  • AddOptions(structure, var...
    ADDOPTIONS is a general function that reads the varargin standard matlab format of
  • AddRefsToLib(gdslib, refs...
    ADDREFSOLIB inserts GDS reference cells into a gds library object
  • BraggFromParameters(len, ...
    BRAGGFROMPARAMETERS Create a bragg grating information structure
  • BraggFromProfile(spatialV...
    BRAGGFROMPROFILE Create a bragg structure
  • CastDefineMap(mapName, ma...
    CASTDEFINEMAP Define the maps for the layers and datatypes for use in CastLayerMap.
  • CastLayerMap(filename, ma...
    CASTLAYERMAP Read a .gds and export its layers to another layermap in a new .gds.
  • CastPostProcessing(st, ma...
    CASTPOSTPROCESSING Layer copying and/or boolean operations for specific layer maps.
  • CastStructureLayer(st, ma...
    CASTSTRUCTURELAYER Cast the layers from a structure to other layers.
  • CheckForDirectory(cellname)
    CHECKFORDIRECTORY Ensure that the Cells directory and following hierarchy exists.
  • CheckParallelAndNormal(in...
    CHECKPARALLELANDNORMAL Return an info structure with the positions sorted according
  • ConstrainAngle(varargin)
    CONSTRAINANGLE Force an angle in degrees to be between -180 and 180 in value.
  • ConvertToTime(sec)
    CONVERTTOTIME Convert a duration in seconds and sends it back divided in hours,
  • CorrectStransFields(strans)
    CORRECTSTRANSFIELD Adds the required fields to an strans struct if they do not
  • CreateFolderRefsFloorplan()
    CREATEFOLDERREFSFLOORPLAN Create the floorplan info for all .gds in the current folder.
  • CreateRefsFloorplan(filen...
    CREATEREFSFLOORPLAN Create a .mat file associated to the reference .gds file
  • CursorInfo(pos, ori, neff...
    CURSORINFO Create a cursor information structure.
  • Equal(varargin)
    EQUAL Verify independently for each array if all their elements have the same value
  • FiberArray(fiberSpacing, ...
    FIBERARRAY Create a fiber array information structure
  • FinalizeCell(cad, cellnam...
    FINALIZECELL Receive the mandatory elements to create a GDS and write it.
  • GetCellInfo(cad)
    GETCELLINFO Read all the .mat files associated with the children cells and GDS
  • GetRefsFloorplan(refs)
    GETREFSFLOORPLAN Look into the .mat files associated to the library .gds files to
  • GetStructureSize(st, refs...
    GETSTRUCTURESIZE Find the rectangular area occupied by a gds_structure.
  • InitializeCell()
    INITIALIZECELL This function initializes the tools and objects needed to make a gds cell
  • InvertInfo(info)
    INVERTINFO Invert the orientation of all the cursors and reset the lengths
  • MakeRect(xy, rectsize, va...
    MAKERECT Create a 5-points closed polygon from a position xy and a
  • MergeGDS(cad, log)
    MERGEGDS runs through the Cells folder and puts all the .gds files together in a
  • MergeInfo(varargin)
    MERGEINFO Merge any number of cursor information structures together into one.
  • Microring(gap, layer, dty...
    MICRORING Create a microring information structure
  • NonNegative(varargin)
    NONNEGATIVE Ensure that no element of any arrays sent as input arguments have a
  • NumberOfColumns(cols, var...
    NUMBEROFCOLUMNS makes sure that each array sent in as arguments has the number of
  • NumberOfRows(rows, vararg...
    NUMBEROFROWS makes sure that each array sent in as arguments has the number of
  • PlaceArc(structure, info,...
    PLACEARC places arc polygons in a gds structure
  • PlaceCouplerArray.m
  • PlaceMicroring(structure,...
    PLACEMICRORING Place a microring in a information structure
  • PlaceRect(structure, info...
    PLACERECT places rectangular polygons in a gds structure
  • PlaceRef(struct, info, re...
  • PlaceSBend(structure, inf...
    PlaceSBend places s-bend polygons in a gds structure
  • PlaceStructure(struct, in...
    PlaceStructure places polygons from a structure array
  • PlaceTaper(structure, inf...
    PLACETAPER places taper polygons in a gds structure
  • ProjectDefinition(log)
    PROJECT DEFINITION Contains the information for the current project
  • PutCell(topcell, cad, cel...
    PUTCELL Create a cell positioning information in the master .gds
  • ReadLayerMap(fab, log)
    READLAYERMAP Load the layer map for a specific fabrication facility/process
  • ReadOptions(structure, va...
    READOPTIONS is a general function that reads the varargin standard matlab format of
  • RotTransXY(xy, pos, ori)
    ROTTRANSXY rotates a set of 2D coordinates then translates them
  • SetupLog(varargin)
    SETUPLOG Define a log object that is helpful in writing execution comments to the
  • SplitInfo(info, indices)
    SPLITINFO Separates certain indices from a cursor information structure.
  • StransInfo(info, pos, str...
    STRANSINFO Reflects and rotates cursor information.
  • StransXY(xy, pos, strans)
    STRANSXY Transform a set of 2D coordinates then translate them
  • Taper(varargin)
    TAPER Create a taper information structure
  • Waveguide(w, layerInfo, r...
    WAVEGUIDE Create a waveguide information structure
  • WidthInfo(info, waveguide)
    WIDTHINFO Returns the total width of the waveguides.
  • adjmatrix(S)
  • curvedwgloss(struct, info...
    Creates spiral WG
  • funSolve(fun, xmin, xmax,...
    This function returns the first zero of the fun entered in it
  • gds_file_exists(fname)
    % checks if a file exists in the current directory
  • gds_initialize(fname, uun...
    function [gf] = gds_initialize(fname, uunit, dbunit, lname, reflibs, fonts);
  • gds_read_struct(gf, uunit...
    % read all elements contained in a structure and return
  • gdscat(inpfil, outfil, in...
    function gdscat(inpfil, outfil, inptop, outtop, libnam, uunit, dbunit))
  • gdsii_arc(arc, layer, dty...
  • gdsii_bitmap(bmap, pixel,...
  • gdsii_cdfeature(layer, mi...
    function [cd] = gdsii_cdfeature(layer, mincd, uunit);
  • gdsii_checky(tname, N, mi...
  • gdsii_datamatrix(str, hei...
    function [dms] = gdsii_datamatrix(str, height, sname, layer);
  • gdsii_grating(name, pos, ...
  • gdsii_multref(name, struc...
    function [astruc] = gdsii_multref(name, struct, xy, strans)
  • gdsii_pattern(sname, xy, ...
  • gdsii_ptext(str, pos, hei...
  • gdsii_replicate(name, xy,...
  • gdsii_sierpinski(tname, m...
  • gdsii_units(uunit, dbunit);
    function gdsii_units(uunit, dbunit);
  • gdsii_version;
    function [tb_ver, sw_ver] = gdsii_version;
  • gdspeek(gdsfil, bel)
    function gdspeek(gdsfil, bel)
  • isGDSStructure(structure)
    ISGDSSRUCTURE Verify that a struct possesses certain fields.
  • isWaveguide(structure)
    ISWAVEGUIDE Verify that a struct possesses certain fields.
  • layerinfo(glib);
  • read_gds_library(gdsname,...
    function [glib] = read_gds_library(gdsname, verbose, hdronly);
  • spiralrect(struct, infoin...
    Creates spiral WG
  • topstruct(cas, bcell);
  • wglosscar(struct, infoin,...
    Creates Waveguide arrays for loss caracterization
  • gds_element(etype, vararg...
    function gelm = gds_element(etype, varargin);
  • gds_library(lname, vararg...
    function glib = gds_library(lname, varargin);
  • gds_structure(sname, vara...
    function gstruc = gds_structure(sname, varargin);
  • CellA_StraightWG.m
  • CellB_Microrings.m
  • CellC_CompactIBGs.m
  • CellD_RidgeIBGs.m
  • CellE_CustomIBGs.m
    Custom profile Integrated Bragg Gratings
  • CellF_RoutingWG.m
  • CellNew.m
  • Contents.m
    Classes and Methods for GDS II
  • Contents.m
    Functions that Return gds_element Objects
  • Contents.m
    Octave & MATLAB Toolbox for GDS II libraries
  • Contents.m
    Functions that Return gds_structure Objects
  • DeviceFunction.m
  • ExportMap.m
  • Main.m
  • MergeCells.m
  • makemex.m
  • makemex.m
    Compiling the mex files
  • makemex.m
  • omakemex.m
    % script to make .mex files on Octave/Windows
  • View all files


5.0 | 2 ratings Rate this file 22 Downloads (last 30 days) File Size: 1.99 MB File ID: #46827
image thumbnail




02 Jun 2014 (Updated )

A library of functions to facilitate the design of Photonics Integrated Circuits GDS layouts

| Watch this File

File Information

This is a Matlab library of functions to facilitate the design of Photonics Integrated Circuits GDS layouts that I have developped with Alexandre D. Simard during my PhD.
This is oriented towards intuitive and adaptable creation of GDS layout files for fabrication in different facilities across the world. The toolbox creates a GDS based on a custom general layer map, but can be set up to export to any other layer map once the design is done.

Nicolas Ayotte and Alexandre D. Simard have used this library to create multiple layouts (quickly) for different fabrication facilities across the world with successful results.


- Fast and intuitive waveguide routing including group turns and group s-bends and the possibility to customize inter-waveguide distance at any point.
- Access to the travelled distance (physical or optical) of any waveguide offering a quick way to measure your devices
Possibility of referencing premade structures (fiber couplers, directional couplers, detectors, etc.)
- Premade functions for microrings and Bragg gratings..
- Tutorial project with many cells showcasing the features.
- A PDF presentation presenting the library's purpose.
- Intuitive cell placement in the master floorplan for easy teamwork.
- Includes functions to export to other layer, possibly including boolean operations on the layers.

It is strongly encouraged to get the free software KLayout to look at your GDS files:

Suggested first steps

- Open the Functions - GDSII Library Folder
- Run makemex (and possibly mex -setup before that) to compile the base library from Ulf.
- Open Project - New Project
- Run the Main.m, read ProjectDefinition.m
- Go through the code of the cells and look at the resulting .gds files
- Duplicate the Project folder and make your own!

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Other requirements C compiler.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
23 Oct 2014 Nicolas Ayotte

PlaceSBend has been updated and now features a flag that automatically finds the shortest length required for the structure.

06 Jun 2014 Alexandre D. Simard

From the user standpoint, this library reduces significantly the time required to produce a complex and multi-layer layout (both for active and passive photonic circuit). This code allows producing a flexible layout than can be easily adjusted and modified to match improved simulation results.

06 Jun 2014 Alexandre D. Simard  

Contact us