|
NAMEGDS2 - GDS2 stream moduleSYNOPSISThis is GDS2, a module for creating programs to read and/or write GDS2 files.Send feedback/suggestions to perl -le '$_=q(Zpbhgnpe@pvnt.uxa);$_=~tr/n-sa-gt-zh-mZ/a-zS/;print;' COPYRIGHTAuthor: Ken Schumack (c) 1999-2017. All rights reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. ( see http://www.perl.com/pub/a/language/misc/Artistic.html ) Have fun, KenSchumack@cpan.org DESCRIPTIONGDS2 allows you to read and write GDS2 files record by record in a stream fashion which inherently uses little memory. It is capable but not fast. If you have large files you may be happier using the C/C++ http://sourceforge.net/projects/gds2/ which can easily be used by Perl.ExamplesLayer change: here's a bare bones script to change all layer 59 to 66 given a file to read and a new file to create. #!/usr/bin/perl -w use strict; use GDS2; my $fileName1 = $ARGV[0]; my $fileName2 = $ARGV[1]; my $gds2File1 = new GDS2(-fileName => $fileName1); my $gds2File2 = new GDS2(-fileName => ">$fileName2"); while (my $record = $gds2File1 -> readGds2Record) { if ($gds2File1 -> returnLayer == 59) { $gds2File2 -> printLayer(-num=>66); } else { $gds2File2 -> printRecord(-data=>$record); } } Gds2 dump: here's a complete program to dump the contents of a stream file. #!/usr/bin/perl -w use GDS2; $\="\n"; my $gds2File = new GDS2(-fileName=>$ARGV[0]); while ($gds2File -> readGds2Record) { print $gds2File -> returnRecordAsString; } Gds2 dump in GDT format: which is smaller and easier to parse - http://sourceforge.net/projects/gds2/ #!/usr/bin/perl -w use GDS2; my $gds2File = new GDS2(-fileName=>$ARGV[0]); while ($gds2File -> readGds2Record) { print $gds2File -> returnRecordAsString(-compact=>1); } Dump from the command line of a bzip2 compressed file: perl -MGDS2 -MFileHandle -MIPC::Open3 -e '$f1=new FileHandle;$f0=new FileHandle;open3($f0,$f1,$f1,"bzcat test.gds.bz2");$gds=new GDS2(-fileHandle=>$f1);while($gds->readGds2Record){print $gds->returnRecordAsString(-compact=>1)}' Create a complete GDS2 stream file from scratch: #!/usr/bin/perl -w use GDS2; my $gds2File = new GDS2(-fileName=>'>test.gds'); $gds2File -> printInitLib(-name=>'testlib'); $gds2File -> printBgnstr(-name=>'test'); $gds2File -> printPath( -layer=>6, -pathType=>0, -width=>2.4, -xy=>[0,0, 10.5,0, 10.5,3.3], ); $gds2File -> printSref( -name=>'contact', -xy=>[4,5.5], ); $gds2File -> printAref( -name=>'contact', -columns=>2, -rows=>3, -xy=>[0,0, 10,0, 0,15], ); $gds2File -> printEndstr; $gds2File -> printBgnstr(-name => 'contact'); $gds2File -> printBoundary( -layer=>10, -xy=>[0,0, 1,0, 1,1, 0,1], ); $gds2File -> printEndstr; $gds2File -> printEndlib(); ################################################################################ METHODSnew - open gds2 fileusage: my $gds2File = new GDS2(-fileName => "filename.gds2"); ## to read my $gds2File2 = new GDS2(-fileName => ">filename.gds2"); ## to write -or- provide your own fileHandle: my $gds2File = new GDS2(-fileHandle => $fh); ## e.g. to attach to a compression/decompression pipe fileNum - file number...usage: close - close gds2 fileusage: $gds2File -> close; -or- $gds2File -> close(-markEnd=>1); ## -- some systems have trouble closing files $gds2File -> close(-pad=>2048); ## -- pad end with \0's till file size is a ## multiple of number. Note: old reel to reel tapes on Calma ## systems used 2048 byte blocks High Level Write MethodsprintInitLib() - Does all the things needed to start a library, writes HEADER,BGNLIB,LIBNAME,and UNITS recordsThe default is to create a library with a default unit of 1 micron that has a resolution of 1000. To get this set uUnit to 0.001 (1/1000) and the dbUnit to 1/1000th of a micron (1e-9). usage: $gds2File -> printInitLib(-name => "testlib", ## required -isoDate => 0|1 ## (optional) use ISO 4 digit date 2001 vs 101 -uUnit => real number ## (optional) default is 0.001 -dbUnit => real number ## (optional) default is 1e-9 );## defaults to current date for library date note: remember to close library with printEndlib() printBgnstr - Does all the things needed to start a structure definitionusage: $gds2File -> printBgnstr(-name => "nand3" ## writes BGNSTR and STRNAME records -isoDate => 1|0 ## (optional) use ISO 4 digit date 2001 vs 101 ); note: remember to close with printEndstr() printPath - prints a gds2 pathusage: $gds2File -> printPath( -layer=>#, -dataType=>#, ##optional -pathType=>#, -width=>#.#, -unitWidth=>#, ## (optional) directly specify width in data base units (vs -width which is multipled by resolution) -xy=>\@array, ## array of reals # -or- -xyInt=>\@array, ## array of internal ints (optional -wks better if you are modifying an existing GDS2 file) ); note: layer defaults to 0 if -layer not used pathType defaults to 0 if -pathType not used pathType 0 = square end 1 = round end 2 = square - extended 1/2 width 4 = custom plus variable path extension... width defaults to 0.0 if -width not used printBoundary - prints a gds2 boundaryusage: $gds2File -> printBoundary( -layer=>#, -dataType=>#, -xy=>\@array, ## ref to array of reals # -or- -xyInt=>\@array, ## ref to array of internal ints (optional -wks better if you are modifying an existing GDS2 file) ); note: layer defaults to 0 if -layer not used dataType defaults to 0 if -dataType not used printSref - prints a gds2 Structure REFerenceusage: $gds2File -> printSref( -name=>string, ## Name of structure -xy=>\@array, ## ref to array of reals # -or- -xyInt=>\@array, ## ref to array of internal ints (optional -wks better than -xy if you are modifying an existing GDS2 file) -angle=>#.#, ## (optional) Default is 0.0 -mag=>#.#, ## (optional) Default is 1.0 -reflect=>0|1 ## (optional) ); note: best not to specify angle or mag if not needed printAref - prints a gds2 Array REFerenceusage: $gds2File -> printAref( -name=>string, ## Name of structure -columns=>#, ## Default is 1 -rows=>#, ## Default is 1 -xy=>\@array, ## ref to array of reals # -or- -xyInt=>\@array, ## ref to array of internal ints (optional -wks better if you are modifying an existing GDS2 file) -angle=>#.#, ## (optional) Default is 0.0 -mag=>#.#, ## (optional) Default is 1.0 -reflect=>0|1 ## (optional) ); note: best not to specify angle or mag if not needed xyList: 1st coord: origin, 2nd coord: X of col * xSpacing + origin, 3rd coord: Y of row * ySpacing + origin printText - prints a gds2 Textusage: $gds2File -> printText( -string=>string, -layer=>#, ## Default is 0 -textType=>#, ## Default is 0 -font=>#, ## 0-3 -top, or -middle, -bottom, ##optional vertical presentation -left, or -center, or -right, ##optional horizontal presentation -xy=>\@array, ## ref to array of reals # -or- -xyInt=>\@array, ## ref to array of internal ints (optional -wks better if you are modifying an existing GDS2 file) -x=>#.#, ## optional way of passing in x value -y=>#.#, ## optional way of passing in y value -angle=>#.#, ## (optional) Default is 0.0 -mag=>#.#, ## (optional) Default is 1.0 -reflect=>#, ## (optional) Default is 0 ); note: best not to specify reflect, angle or mag if not needed Low Level Generic Write MethodssaveGds2Record() - low level method to create a gds2 record given record type and data (if required). Data of more than one item should be given as a list.NOTE: THIS ONLY USES GDS2 OBJECT TO GET RESOLUTION usage: saveGds2Record( -type=>string, -data=>data_If_Needed, ##optional for some types -scale=>#.#, ##optional number to scale data to. I.E -scale=>0.5 #default is NOT to scale -snap=>#.#, ##optional number to snap data to I.E. -snap=>0.005 #default is 1 resolution unit, typically 0.001 ); examples: my $gds2File = new GDS2(-fileName => ">$fileName"); my $record = $gds2File -> saveGds2Record(-type=>'header',-data=>3); $gds2FileOut -> printGds2Record(-type=>'record',-data=>$record); printGds2Record() - low level method to print a gds2 record given record type and data (if required). Data of more than one item should be given as a list.usage: printGds2Record( -type=>string, -data=>data_If_Needed, ##optional for some types -scale=>#.#, ##optional number to scale data to. I.E -scale=>0.5 #default is NOT to scale -snap=>#.#, ##optional number to snap data to I.E. -snap=>0.005 #default is 1 resolution unit, typically 0.001 ); examples: my $gds2File = new GDS2(-fileName => ">$fileName"); $gds2File -> printGds2Record(-type=>'header',-data=>3); $gds2File -> printGds2Record(-type=>'bgnlib',-data=>[99,12,1,22,33,0,99,12,1,22,33,9]); $gds2File -> printGds2Record(-type=>'libname',-data=>"testlib"); $gds2File -> printGds2Record(-type=>'units',-data=>[0.001, 1e-9]); $gds2File -> printGds2Record(-type=>'bgnstr',-data=>[99,12,1,22,33,0,99,12,1,22,33,9]); ... $gds2File -> printGds2Record(-type=>'endstr'); $gds2File -> printGds2Record(-type=>'endlib'); Note: the special record type of 'record' can be used to copy a complete record just read in: while (my $record = $gds2FileIn -> readGds2Record()) { $gds2FileOut -> printGds2Record(-type=>'record',-data=>$record); } printRecord - prints a record just readusage: $gds2File -> printRecord( -data => $record ); Low Level Generic Read MethodsreadGds2Record - reads record header and data sectionusage: while ($gds2File -> readGds2Record) { if ($gds2File -> returnRecordTypeString eq 'LAYER') { $layersFound[$gds2File -> layer] = 1; } } readGds2RecordHeader - only reads gds2 record header section (2 bytes)slightly faster if you just want a certain thing... usage: while ($gds2File -> readGds2RecordHeader) { if ($gds2File -> returnRecordTypeString eq 'LAYER') { $gds2File -> readGds2RecordData; $layersFound[$gds2File -> returnLayer] = 1; } } readGds2RecordData - only reads record data sectionslightly faster if you just want a certain thing... usage: while ($gds2File -> readGds2RecordHeader) { if ($gds2File -> returnRecordTypeString eq 'LAYER') { $gds2File -> readGds2RecordData; $layersFound[$gds2File -> returnLayer] = 1; } } Low Level Generic Evaluation MethodsreturnRecordType - returns current (read) record type as integerusage: if ($gds2File -> returnRecordType == 6) { print "found STRNAME"; } returnRecordTypeString - returns current (read) record type as stringusage: if ($gds2File -> returnRecordTypeString eq 'LAYER') { code goes here... } returnRecordAsString - returns current (read) record as a stringusage: while ($gds2File -> readGds2Record) { print $gds2File -> returnRecordAsString(-compact=>1); } returnXyAsArray - returns current (read) XY record as an arrayusage: $gds2File -> returnXyAsArray( -asInteger => 0|1 ## (optional) default is true. Return integer ## array or if false return array of reals. -withClosure => 0|1 ## (optional) default is true. Whether to ##return a rectangle with 5 or 4 points. ); example: while ($gds2File -> readGds2Record) { my @xy = $gds2File -> returnXyAsArray if ($gds2File -> isXy); } returnRecordAsPerl - returns current (read) record as a perl command to facilitate the creation of parameterized gds2 data with perl.usage: #!/usr/local/bin/perl use GDS2; my $gds2File = new GDS2(-fileName=>"test.gds"); while ($gds2File -> readGds2Record) { print $gds2File -> returnRecordAsPerl; } Low Level Specific Write MethodsprintAngle - prints ANGLE recordusage: $gds2File -> printAngle(-num=>#.#); printAttrtable - prints ATTRTABLE recordusage: $gds2File -> printAttrtable(-string=>$string); printBgnextn - prints BGNEXTN recordusage: $gds2File -> printBgnextn(-num=>#.#); printBgnlib - prints BGNLIB recordusage: $gds2File -> printBgnlib( -isoDate => 0|1 ## (optional) use ISO 4 digit date 2001 vs 101 ); printBox - prints BOX recordusage: $gds2File -> printBox; printBoxtype - prints BOXTYPE recordusage: $gds2File -> printBoxtype(-num=>#); printColrow - prints COLROW recordusage: $gds2File -> printBoxtype(-columns=>#, -rows=>#); printDatatype - prints DATATYPE recordusage: $gds2File -> printDatatype(-num=>#); printElkey - prints ELKEY recordusage: $gds2File -> printElkey(-num=>#); printEndel - closes an element definitionprintEndextn - prints path end extension recordusage: $gds2File printEndextn -> (-num=>#.#); printEndlib - closes a library definitionprintEndstr - closes a structure definitionprintEndmasks - prints a ENDMASKSprintFonts - prints a FONTS recordusage: $gds2File -> printFonts(-string=>'names_of_font_files'); printHeader - Prints a rev 3 headerusage: $gds2File -> printHeader( -num => # ## optional, defaults to 3. valid revs are 0,3,4,5,and 600 ); printLayer - prints a LAYER numberusage: $gds2File -> printLayer( -num => # ## optional, defaults to 0. ); printLibname - Prints library nameusage: printLibname(-name=>$name); printPathtype - prints a PATHTYPE numberusage: $gds2File -> printPathtype( -num => # ## optional, defaults to 0. ); printMag - prints a MAG numberusage: $gds2File -> printMag( -num => #.# ## optional, defaults to 0.0 ); printNodetype - prints a NODETYPE numberusage: $gds2File -> printNodetype( -num => # ); printPresentation - prints a text presentation recordusage: $gds2File -> printPresentation( -font => #, ##optional, defaults to 0, valid numbers are 0-3 -top, ||-middle, || -bottom, ## vertical justification -left, ||-center, || -right, ## horizontal justification ); example: gds2File -> printPresentation(-font=>0,-top,-left); printPropattr - prints a property id numberusage: $gds2File -> printPropattr( -num => # ); printPropvalue - prints a property value stringusage: $gds2File -> printPropvalue( -string => $string ); printSname - prints a SNAME stringusage: $gds2File -> printSname( -name => $cellName ); printStrans - prints a STRANS recordusage: $gds2File -> printStrans( -reflect ); printString - prints a STRING recordusage: $gds2File -> printSname( -string => $text ); printStrname - prints a structure name stringusage: $gds2File -> printStrname( -name => $cellName ); printTexttype - prints a text type numberusage: $gds2File -> printTexttype( -num => # ); printUnits - Prints units record.options: -uUnit => real number ## (optional) default is 0.001 -dbUnit => real number ## (optional) default is 1e-9 printWidth - prints a width numberusage: $gds2File -> printWidth( -num => # ); printXy - prints an XY arrayusage: $gds2File -> printXy( -xyInt => \@arrayGds2Ints ); -or- $gds2File -> printXy( -xy => \@arrayReals ); -xyInt most useful if reading and modifying... -xy if creating from scratch Low Level Specific Evaluation MethodsreturnFilePosition - return current byte position (NOT zero based)usage: my $position = $gds2File -> returnFilePosition; returnBgnextn - returns bgnextn if record is BGNEXTN else returns 0usage: returnDatatype - returns datatype # if record is DATATYPE else returns -1usage: $dataTypesFound[$gds2File -> returnDatatype] = 1; returnEndextn- returns endextn if record is ENDEXTN else returns 0usage: returnLayer - returns layer # if record is LAYER else returns -1usage: $layersFound[$gds2File -> returnLayer] = 1; returnPathtype - returns pathtype # if record is PATHTYPE else returns -1usage: returnPropattr - returns propattr # if record is PROPATTR else returns -1usage: returnPropvalue - returns propvalue string if record is PROPVALUE else returns ''usage: returnSname - return string if record type is SNAME else ''returnString - return string if record type is STRING else ''returnStrname - return string if record type is STRNAME else ''returnTexttype - returns texttype # if record is TEXTTYPE else returns -1usage: $TextTypesFound[$gds2File -> returnTexttype] = 1; returnWidth - returns width # if record is WIDTH else returns -1usage: Low Level Specific Boolean MethodsisAref - return 0 or 1 depending on whether current record is an arefisBgnlib - return 0 or 1 depending on whether current record is a bgnlibisBgnstr - return 0 or 1 depending on whether current record is a bgnstrisBoundary - return 0 or 1 depending on whether current record is a boundaryisDatatype - return 0 or 1 depending on whether current record is datatypeisEndlib - return 0 or 1 depending on whether current record is endlibisEndel - return 0 or 1 depending on whether current record is endelisEndstr - return 0 or 1 depending on whether current record is endstrisHeader - return 0 or 1 depending on whether current record is a headerisLibname - return 0 or 1 depending on whether current record is a libnameisPath - return 0 or 1 depending on whether current record is a pathisSref - return 0 or 1 depending on whether current record is an srefisSrfname - return 0 or 1 depending on whether current record is an srfnameisText - return 0 or 1 depending on whether current record is a textisUnits - return 0 or 1 depending on whether current record is unitsisLayer - return 0 or 1 depending on whether current record is layerisStrname - return 0 or 1 depending on whether current record is strnameisWidth - return 0 or 1 depending on whether current record is widthisXy - return 0 or 1 depending on whether current record is xyisSname - return 0 or 1 depending on whether current record is snameisColrow - return 0 or 1 depending on whether current record is colrowisTextnode - return 0 or 1 depending on whether current record is a textnodeisNode - return 0 or 1 depending on whether current record is a nodeisTexttype - return 0 or 1 depending on whether current record is a texttypeisPresentation - return 0 or 1 depending on whether current record is a presentationisSpacing - return 0 or 1 depending on whether current record is a spacingisString - return 0 or 1 depending on whether current record is a stringisStrans - return 0 or 1 depending on whether current record is a stransisMag - return 0 or 1 depending on whether current record is a magisAngle - return 0 or 1 depending on whether current record is a angleisUinteger - return 0 or 1 depending on whether current record is a uintegerisUstring - return 0 or 1 depending on whether current record is a ustringisReflibs - return 0 or 1 depending on whether current record is a reflibsisFonts - return 0 or 1 depending on whether current record is a fontsisPathtype - return 0 or 1 depending on whether current record is a pathtypeisGenerations - return 0 or 1 depending on whether current record is a generationsisAttrtable - return 0 or 1 depending on whether current record is a attrtableisStyptable - return 0 or 1 depending on whether current record is a styptableisStrtype - return 0 or 1 depending on whether current record is a strtypeisEflags - return 0 or 1 depending on whether current record is a eflagsisElkey - return 0 or 1 depending on whether current record is a elkeyisLinktype - return 0 or 1 depending on whether current record is a linktypeisLinkkeys - return 0 or 1 depending on whether current record is a linkkeysisNodetype - return 0 or 1 depending on whether current record is a nodetypeisPropattr - return 0 or 1 depending on whether current record is a propattrisPropvalue - return 0 or 1 depending on whether current record is a propvalueisBox - return 0 or 1 depending on whether current record is a boxisBoxtype - return 0 or 1 depending on whether current record is a boxtypeisPlex - return 0 or 1 depending on whether current record is a plexisBgnextn - return 0 or 1 depending on whether current record is a bgnextnisEndextn - return 0 or 1 depending on whether current record is a endextnisTapenum - return 0 or 1 depending on whether current record is a tapenumisTapecode - return 0 or 1 depending on whether current record is a tapecodeisStrclass - return 0 or 1 depending on whether current record is a strclassisReserved - return 0 or 1 depending on whether current record is a reservedisFormat - return 0 or 1 depending on whether current record is a formatisMask - return 0 or 1 depending on whether current record is a maskisEndmasks - return 0 or 1 depending on whether current record is a endmasksisLibdirsize - return 0 or 1 depending on whether current record is a libdirsizeisLibsecur - return 0 or 1 depending on whether current record is a libsecurrecordSize - return current record sizeusage: my $len = $gds2File -> recordSize; dataSize - return current record size - 4 (length of data)usage: my $dataLen = $gds2File -> dataSize; returnUnitsAsArray - return user units and database units as a 2 element arrayusage: my ($uu,$dbu) = $gds2File -> returnUnitsAsArray; version - return GDS2 module version stringversion - return GDS2 module revision stringGDS2 Stream Format######################################################################################### # # Gds2 stream format is composed of variable length records. The mininum # length record is 4 bytes. The 1st 2 bytes of a record contain a count (in 8 bit # bytes) of the total record length. The 3rd byte of the header is the record # type. The 4th byte describes the type of data contained w/in the record. The # 5th through last bytes are data. # # If the output file is a mag tape, then the records of the library are written # out in 2048-byte physical blocks. Records may overlap block boundaries. # For this reason I think gds2 is often padded with null bytes so that the # file size ends up being a multiple of 2048. # # A null word consists of 2 consecutive zero bytes. Use null words to fill the # space between: # o the last record of a library and the end of its block # o the last record of a tape in a mult-reel stream file. # # DATA TYPE VALUE RECORD # --------- ----- ----------------------- # no data present 0 4 byte header + 0 # # Bit Array 1 4 byte header + 2 bytes data # # 2byte Signed Int 2 SMMMMMMM MMMMMMMM -> S - sign ; M - magnitude. # Twos complement format, with the most significant byte first. # I.E. # 0x0001 = 1 # 0x0002 = 2 # 0x0089 = 137 # 0xffff = -1 # 0xfffe = -2 # 0xff77 = -137 # # 4byte Signed Int 3 SMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM # # 8byte Real 5 SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM E-expon in excess-64 # MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM representation # # Mantissa == pos fraction >=1/16 && <1 bit 8==1/2, 9==1/4 etc... # The first bit is the sign (1 = negative), the next 7 bits # are the exponent, you have to subtract 64 from this number to # get the real value. The next seven bytes are the mantissa in # 4 word floating point representation. # # # string 6 odd length strings must be padded w/ null character and # byte count++ # ######################################################################################### Backus-naur representation of GDS2 Stream Syntax################################################################################ # <STREAM FORMAT>::= HEADER BGNLIB [LIBDIRSIZE] [SRFNAME] [LIBSECR] # # LIBNAME [REFLIBS] [FONTS] [ATTRTABLE] [GENERATIONS] # # [<FormatType>] UNITS {<structure>}* ENDLIB # # # # <FormatType>::= FORMAT | FORMAT {MASK}+ ENDMASKS # # # # <structure>::= BGNSTR STRNAME [STRCLASS] {<element>}* ENDSTR # # # # <element>::= {<boundary> | <path> | <SREF> | <AREF> | <text> | # # <node> | <box} {<property>}* ENDEL # # # # <boundary>::= BOUNDARY [ELFLAGS] [PLEX] LAYER DATATYPE XY # # # # <path>::= PATH [ELFLAGS] [PLEX] LAYER DATATYPE [PATHTYPE] # # [WIDTH] [BGNEXTN] [ENDEXTN] [XY] # # # # <SREF>::= SREF [ELFLAGS] [PLEX] SNAME [<strans>] XY # # # # <AREF>::= AREF [ELFLAGS] [PLEX] SNAME [<strans>] COLROW XY # # # # <text>::= TEXT [ELFLAGS] [PLEX] LAYER <textbody> # # # # <textbody>::= TEXTTYPE [PRESENTATION] [PATHTYPE] [WIDTH] [<strans>] XY # # STRING # # # # <strans>::= STRANS [MAG] [ANGLE] # # # # <node>::= NODE [ELFLAGS] [PLEX] LAYER NODETYPE XY # # # # <box>::= BOX [ELFLAGS] [PLEX] LAYER BOXTYPE XY # # # # <property>::= PROPATTR PROPVALUE # ################################################################################ GDS2 Stream Record Datatypes################################################################################ NO_REC_DATA = 0; BIT_ARRAY = 1; INTEGER_2 = 2; INTEGER_4 = 3; REAL_4 = 4; ## NOT supported, never really used REAL_8 = 5; ACSII_STRING = 6; ################################################################################ GDS2 Stream Record Types################################################################################ HEADER = 0; ## 2-byte Signed Integer BGNLIB = 1; ## 2-byte Signed Integer LIBNAME = 2; ## ASCII String UNITS = 3; ## 8-byte Real ENDLIB = 4; ## no data present BGNSTR = 5; ## 2-byte Signed Integer STRNAME = 6; ## ASCII String ENDSTR = 7; ## no data present BOUNDARY = 8; ## no data present PATH = 9; ## no data present SREF = 10; ## no data present AREF = 11; ## no data present TEXT = 12; ## no data present LAYER = 13; ## 2-byte Signed Integer DATATYPE = 14; ## 2-byte Signed Integer WIDTH = 15; ## 4-byte Signed Integer XY = 16; ## 4-byte Signed Integer ENDEL = 17; ## no data present SNAME = 18; ## ASCII String COLROW = 19; ## 2 2-byte Signed Integer <= 32767 TEXTNODE = 20; ## no data present NODE = 21; ## no data present TEXTTYPE = 22; ## 2-byte Signed Integer PRESENTATION = 23; ## Bit Array. One word (2 bytes) of bit flags. Bits 11 and ## 12 together specify the font 00->font 0 11->font 3. ## Bits 13 and 14 specify the vertical presentation, 15 ## and 16 the horizontal presentation. 00->'top/left' 01-> ## middle/center 10->bottom/right bits 1-10 were reserved ## for future use and should be 0. SPACING = 24; ## discontinued STRING = 25; ## ASCII String <= 512 characters STRANS = 26; ## Bit Array: 2 bytes of bit flags for graphic presentation ## The 1st (high order or leftmost) bit specifies ## reflection. If set then reflection across the X-axis ## is applied before rotation. The 14th bit flags ## absolute mag, the 15th absolute angle, the other bits ## were reserved for future use and should be 0. MAG = 27; ## 8-byte Real ANGLE = 28; ## 8-byte Real UINTEGER = 29; ## UNKNOWN User int, used only in Calma V2.0 USTRING = 30; ## UNKNOWN User string, used only in Calma V2.0 REFLIBS = 31; ## ASCII String FONTS = 32; ## ASCII String PATHTYPE = 33; ## 2-byte Signed Integer GENERATIONS = 34; ## 2-byte Signed Integer ATTRTABLE = 35; ## ASCII String STYPTABLE = 36; ## ASCII String "Unreleased feature" STRTYPE = 37; ## 2-byte Signed Integer "Unreleased feature" EFLAGS = 38; ## BIT_ARRAY Flags for template and exterior data. ## bits 15 to 0, l to r 0=template, 1=external data, others unused ELKEY = 39; ## INTEGER_4 "Unreleased feature" LINKTYPE = 40; ## UNKNOWN "Unreleased feature" LINKKEYS = 41; ## UNKNOWN "Unreleased feature" NODETYPE = 42; ## INTEGER_2 Nodetype specification. On Calma this could be 0 to 63, ## GDSII allows 0 to 255. Of course a 16 bit integer allows up to 65535... PROPATTR = 43; ## INTEGER_2 Property number. PROPVALUE = 44; ## STRING Property value. On GDSII, 128 characters max, unless an ## SREF, AREF, or NODE, which may have 512 characters. BOX = 45; ## NO_DATA The beginning of a BOX element. BOXTYPE = 46; ## INTEGER_2 Boxtype specification. PLEX = 47; ## INTEGER_4 Plex number and plexhead flag. The least significant bit of ## the most significant byte is the plexhead flag. BGNEXTN = 48; ## INTEGER_4 Path extension beginning for pathtype 4 in Calma CustomPlus. ## In database units, may be negative. ENDEXTN = 49; ## INTEGER_4 Path extension end for pathtype 4 in Calma CustomPlus. In ## database units, may be negative. TAPENUM = 50; ## INTEGER_2 Tape number for multi-reel stream file. TAPECODE = 51; ## INTEGER_2 Tape code to verify that the reel is from the proper set. ## 12 bytes that are supposed to form a unique tape code. STRCLASS = 52; ## BIT_ARRAY Calma use only. RESERVED = 53; ## INTEGER_4 Used to be NUMTYPES per Calma GDSII Stream Format Manual, v6.0. FORMAT = 54; ## INTEGER_2 Archive or Filtered flag. 0: Archive 1: filtered MASK = 55; ## STRING Only in filtered streams. Layers and datatypes used for mask ## in a filtered stream file. A string giving ranges of layers and datatypes ## separated by a semicolon. There may be more than one mask in a stream file. ENDMASKS = 56; ## NO_DATA The end of mask descriptions. LIBDIRSIZE = 57; ## INTEGER_2 Number of pages in library director, a GDSII thing, it seems ## to have only been used when Calma INFORM was creating a new library. SRFNAME = 58; ## STRING Calma "Sticks"(c) rule file name. LIBSECUR = 59; ## INTEGER_2 Access control list stuff for CalmaDOS, ancient. INFORM used ## this when creating a new library. Had 1 to 32 entries with group ## numbers, user numbers and access rights.
Visit the GSP FreeBSD Man Page Interface. |