GDS-Render v1.2.1
|
Implementation of the GDS-Parser. More...
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <cairo.h>
#include <glib/gi18n.h>
#include <gds-render/gds-utils/gds-parser.h>
Go to the source code of this file.
Data Structures | |
struct | gds_cell_array_instance |
Struct representing an array instantiation. More... | |
Macros | |
#define | GDS_DEFAULT_UNITS (10E-9) |
Default units assumed for library. More... | |
#define | GDS_ERROR(fmt, ...) printf("[PARSE_ERROR] " fmt "\n", ##__VA_ARGS__) |
Print GDS error. More... | |
#define | GDS_WARN(fmt, ...) printf("[PARSE_WARNING] " fmt "\n", ##__VA_ARGS__) |
Print GDS warning. More... | |
#define | GDS_INF(fmt, ...) |
Enumerations | |
enum | gds_record { INVALID = 0x0000 , HEADER = 0x0002 , BGNLIB = 0x0102 , LIBNAME = 0x0206 , UNITS = 0x0305 , ENDLIB = 0x0400 , BGNSTR = 0x0502 , STRNAME = 0x0606 , ENDSTR = 0x0700 , BOUNDARY = 0x0800 , PATH = 0x0900 , SREF = 0x0A00 , ENDEL = 0x1100 , XY = 0x1003 , MAG = 0x1B05 , ANGLE = 0x1C05 , SNAME = 0x1206 , STRANS = 0x1A01 , BOX = 0x2D00 , LAYER = 0x0D02 , DATATYPE = 0x0E02 , WIDTH = 0x0F03 , PATHTYPE = 0x2102 , COLROW = 0x1302 , AREF = 0x0B00 } |
Functions | |
static int | name_cell_ref (struct gds_cell_instance *cell_inst, unsigned int bytes, char *data) |
Name cell reference. More... | |
static int | name_array_cell_ref (struct gds_cell_array_instance *cell_inst, unsigned int bytes, char *data) |
Name cell reference. More... | |
static double | gds_convert_double (const char *data) |
Convert GDS 8-byte real to double. More... | |
static signed int | gds_convert_signed_int (const char *data) |
Convert GDS INT32 to int. More... | |
static int16_t | gds_convert_signed_int16 (const char *data) |
Convert GDS INT16 to int16. More... | |
static uint16_t | gds_convert_unsigned_int16 (const char *data) |
Convert GDS UINT16 String to uint16. More... | |
static GList * | append_library (GList *curr_list, struct gds_library **library_ptr) |
Append library to list. More... | |
static GList * | prepend_graphics (GList *curr_list, enum graphics_type type, struct gds_graphics **graphics_ptr) |
Prepend graphics to list. More... | |
static GList * | append_vertex (GList *curr_list, int x, int y) |
Appends vertext List. More... | |
static GList * | append_cell (GList *curr_list, struct gds_cell **cell_ptr) |
append_cell Append a gds_cell to a list More... | |
static GList * | append_cell_ref (GList *curr_list, struct gds_cell_instance **instance_ptr) |
Append a cell reference to the reference GList. More... | |
static int | name_library (struct gds_library *current_library, unsigned int bytes, char *data) |
Name a gds_library. More... | |
static int | name_cell (struct gds_cell *cell, unsigned int bytes, char *data, struct gds_library *lib) |
Names a gds_cell. More... | |
static void | parse_reference_list (gpointer gcell_ref, gpointer glibrary) |
Search for cell reference gcell_ref in glibrary . More... | |
static void | scan_cell_reference_dependencies (gpointer gcell, gpointer library) |
Scans cell references inside cell This function searches all the references in gcell and updates the gds_cell_instance::cell_ref field in each instance. More... | |
static void | scan_library_references (gpointer library_list_item, gpointer user) |
Scans library's cell references. More... | |
static void | gds_parse_date (const char *buffer, int length, struct gds_time_field *mod_date, struct gds_time_field *access_date) |
gds_parse_date More... | |
static void | convert_aref_to_sref (struct gds_cell_array_instance *aref, struct gds_cell *container_cell) |
Convert AREF to a bunch of SREFs and append them to container_cell . More... | |
int | parse_gds_from_file (const char *filename, GList **library_array) |
Parse a GDS file. More... | |
static void | delete_cell_inst_element (struct gds_cell_instance *cell_inst) |
delete_cell_inst_element More... | |
static void | delete_vertex (struct gds_point *vertex) |
delete_vertex More... | |
static void | delete_graphics_obj (struct gds_graphics *gfx) |
delete_graphics_obj More... | |
static void | delete_cell_element (struct gds_cell *cell) |
delete_cell_element More... | |
static void | delete_library_element (struct gds_library *lib) |
delete_library_element More... | |
int | clear_lib_list (GList **library_list) |
Deletes all libraries including cells, references etc. More... | |
Implementation of the GDS-Parser.
What's missing? - A lot: Support for 4 Byte real Support for pathtypes Support for datatypes (only layer so far) etc...
Definition in file gds-parser.c.