Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "GDS2 3" | |
132 | .TH GDS2 3 "2003-03-28" "perl v5.8.0" "User Contributed Perl Documentation" | |
133 | \&\s-1GDS2\s0 \- \s-1GDS2\s0 stream module | |
134 | .SH "Description" | |
135 | .IX Header "Description" | |
136 | This is \s-1GDS2\s0, a module for quickly creating programs to read and/or write \s-1GDS2\s0 files. | |
137 | .PP | |
138 | Send feedback/suggestions to | |
139 | schumack@cpan.org | |
140 | .SH "Create Method" | |
141 | .IX Header "Create Method" | |
142 | .Sh "new \- open gds2 file" | |
143 | .IX Subsection "new - open gds2 file" | |
144 | .Vb 3 | |
145 | \& usage: | |
146 | \& my $gds2File = new GDS2(-fileName => "filename.gds2"); ## to read | |
147 | \& my $gds2File2 = new GDS2(-fileName => ">filename.gds2"); ## to write | |
148 | .Ve | |
149 | .Sh "close \- close gds2 file" | |
150 | .IX Subsection "close - close gds2 file" | |
151 | .Vb 7 | |
152 | \& usage: | |
153 | \& $gds2File -> close; | |
154 | \& -or- | |
155 | \& $gds2File -> close(-markEnd=>1); ## experimental -- some systems have trouble closing files | |
156 | \& $gds2File -> close(-pad=>2048); ## experimental -- pad end with \e0's till file size is a | |
157 | \& ## multiple of number. Note: old reel to reel tapes on Calma | |
158 | \& ## systems used 2048 byte blocks | |
159 | .Ve | |
160 | .SH "High Level Write Methods" | |
161 | .IX Header "High Level Write Methods" | |
162 | .Sh "\fIprintInitLib()\fP \- Does all the things needed to start a library" | |
163 | .IX Subsection "printInitLib() - Does all the things needed to start a library" | |
164 | .Vb 5 | |
165 | \& usage: | |
166 | \& $gds2File -> printInitLib(-name => "testlib", ##writes HEADER,BGNLIB,LIBNAME,and UNITS records | |
167 | \& -isoDate => 0|1 ## (optional) use ISO 4 digit date 2001 vs 101 | |
168 | \& ); | |
169 | \& ## defaults to current date for library date and 1e-3 and 1e-9 for units | |
170 | .Ve | |
171 | .PP | |
172 | .Vb 2 | |
173 | \& note: | |
174 | \& remember to close library with printEndlib() | |
175 | .Ve | |
176 | .Sh "printBgnstr \- Does all the things needed to start a structure definition" | |
177 | .IX Subsection "printBgnstr - Does all the things needed to start a structure definition" | |
178 | .Vb 4 | |
179 | \& usage: | |
180 | \& $gds2File -> printBgnstr(-name => "nand3" ## writes BGNSTR and STRNAME records | |
181 | \& -isoDate => 1|0 ## (optional) use ISO 4 digit date 2001 vs 101 | |
182 | \& ); | |
183 | .Ve | |
184 | .PP | |
185 | .Vb 2 | |
186 | \& note: | |
187 | \& remember to close with printEndstr() | |
188 | .Ve | |
189 | .Sh "printPath \- prints a gds2 path" | |
190 | .IX Subsection "printPath - prints a gds2 path" | |
191 | .Vb 10 | |
192 | \& usage: | |
193 | \& $gds2File -> printPath( | |
194 | \& -layer=>#, | |
195 | \& -dataType=>#, ##optional | |
196 | \& -pathType=>#, | |
197 | \& -width=>#.#, | |
198 | \& -unitWidth=>#, ## (optional) directly specify width in data base units (vs -width which is multipled by resolution) | |
199 | \& -xy=>\e@array, ## array of reals | |
200 | \& -xyInt=>\e@array, ## array of internal ints (optional -wks better if you are modifying an existing GDS2 file) | |
201 | \& ); | |
202 | .Ve | |
203 | .PP | |
204 | .Vb 8 | |
205 | \& note: | |
206 | \& layer defaults to 0 if -layer not used | |
207 | \& pathType defaults to 0 if -pathType not used | |
208 | \& pathType 0 = square end | |
209 | \& 1 = round end | |
210 | \& 2 = square - extended 1/2 width | |
211 | \& 4 = custom plus variable path extension... | |
212 | \& width defaults to 0.0 if -width not used | |
213 | .Ve | |
214 | .Sh "printBoundary \- prints a gds2 boundary" | |
215 | .IX Subsection "printBoundary - prints a gds2 boundary" | |
216 | .Vb 7 | |
217 | \& usage: | |
218 | \& $gds2File -> printBoundary( | |
219 | \& -layer=>#, | |
220 | \& -dataType=>#, | |
221 | \& -xy=>\e@array, ## array of reals | |
222 | \& -xyInt=>\e@array, ## array of internal ints (optional -wks better if you are modifying an existing GDS2 file) | |
223 | \& ); | |
224 | .Ve | |
225 | .PP | |
226 | .Vb 3 | |
227 | \& note: | |
228 | \& layer defaults to 0 if -layer not used | |
229 | \& dataType defaults to 0 if -dataType not used | |
230 | .Ve | |
231 | .Sh "printSref \- prints a gds2 Structure REFerence" | |
232 | .IX Subsection "printSref - prints a gds2 Structure REFerence" | |
233 | .Vb 9 | |
234 | \& usage: | |
235 | \& $gds2File -> printSref( | |
236 | \& -name=>string, ## Name of structure | |
237 | \& -xy=>\e@array, ## array of reals | |
238 | \& -xyInt=>\e@array, ## array of internal ints (optional -wks better than -xy if you are modifying an existing GDS2 file) | |
239 | \& -angle=>#.#, ## (optional) Default is 0.0 | |
240 | \& -mag=>#.#, ## (optional) Default is 1.0 | |
241 | \& -reflect=>0|1 ## (optional) | |
242 | \& ); | |
243 | .Ve | |
244 | .PP | |
245 | .Vb 2 | |
246 | \& note: | |
247 | \& best not to specify angle or mag if not needed | |
248 | .Ve | |
249 | .Sh "printAref \- prints a gds2 Array REFerence" | |
250 | .IX Subsection "printAref - prints a gds2 Array REFerence" | |
251 | .Vb 11 | |
252 | \& usage: | |
253 | \& $gds2File -> printAref( | |
254 | \& -name=>string, ## Name of structure | |
255 | \& -columns=>#, ## Default is 1 | |
256 | \& -rows=>#, ## Default is 1 | |
257 | \& -xy=>\e@array, ## array of reals | |
258 | \& -xyInt=>\e@array, ## array of internal ints (optional -wks better if you are modifying an existing GDS2 file) | |
259 | \& -angle=>#.#, ## (optional) Default is 0.0 | |
260 | \& -mag=>#.#, ## (optional) Default is 1.0 | |
261 | \& -reflect=>0|1 ## (optional) | |
262 | \& ); | |
263 | .Ve | |
264 | .PP | |
265 | .Vb 2 | |
266 | \& note: | |
267 | \& best not to specify angle or mag if not needed | |
268 | .Ve | |
269 | .Sh "printText \- prints a gds2 Text" | |
270 | .IX Subsection "printText - prints a gds2 Text" | |
271 | .Vb 16 | |
272 | \& usage: | |
273 | \& $gds2File -> printText( | |
274 | \& -string=>string, | |
275 | \& -layer=>#, ## Default is 0 | |
276 | \& -textType=>#, ## Default is 0 | |
277 | \& -font=>#, ## 0-3 | |
278 | \& -top, or -middle, -bottom, ##optional vertical presentation | |
279 | \& -left, or -center, or -right, ##optional horizontal presentation | |
280 | \& -xy=>\e@array, ## array of reals | |
281 | \& -xyInt=>\e@array, ## array of internal ints (optional -wks better if you are modifying an existing GDS2 file) | |
282 | \& -x=>#.#, ## optional way of passing in x value | |
283 | \& -y=>#.#, ## optional way of passing in y value | |
284 | \& -angle=>#.#, ## (optional) Default is 0.0 | |
285 | \& -mag=>#.#, ## (optional) Default is 1.0 | |
286 | \& -reflect=>#, ## (optional) Default is 0 | |
287 | \& ); | |
288 | .Ve | |
289 | .PP | |
290 | .Vb 2 | |
291 | \& note: | |
292 | \& best not to specify reflect, angle or mag if not needed | |
293 | .Ve | |
294 | .SH "Low Level Generic Write Methods" | |
295 | .IX Header "Low Level Generic Write Methods" | |
296 | .Sh "\fIsaveGds2Record()\fP \- 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." | |
297 | .IX Subsection "saveGds2Record() - 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." | |
298 | .Vb 1 | |
299 | \& NOTE: THIS ONLY USES GDS2 OBJECT TO GET RESOLUTION | |
300 | .Ve | |
301 | .PP | |
302 | .Vb 7 | |
303 | \& usage: | |
304 | \& saveGds2Record( | |
305 | \& -type=>string, | |
306 | \& -data=>data_If_Needed, ##optional for some types | |
307 | \& -scale=>#.#, ##optional number to scale data to. I.E -scale=>0.5 #default is NOT to scale | |
308 | \& -snap=>#.#, ##optional number to snap data to I.E. -snap=>0.005 #default is 1 resolution unit, typically 0.001 | |
309 | \& ); | |
310 | .Ve | |
311 | .PP | |
312 | .Vb 4 | |
313 | \& examples: | |
314 | \& my $gds2File = new GDS2(-fileName => ">$fileName"); | |
315 | \& my $record = $gds2File -> saveGds2Record(-type=>'header',-data=>3); | |
316 | \& $gds2FileOut -> printGds2Record(-type=>'record',-data=>$record); | |
317 | .Ve | |
318 | .Sh "\fIprintGds2Record()\fP \- 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." | |
319 | .IX Subsection "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." | |
320 | .Vb 7 | |
321 | \& usage: | |
322 | \& printGds2Record( | |
323 | \& -type=>string, | |
324 | \& -data=>data_If_Needed, ##optional for some types | |
325 | \& -scale=>#.#, ##optional number to scale data to. I.E -scale=>0.5 #default is NOT to scale | |
326 | \& -snap=>#.#, ##optional number to snap data to I.E. -snap=>0.005 #default is 1 resolution unit, typically 0.001 | |
327 | \& ); | |
328 | .Ve | |
329 | .PP | |
330 | .Vb 2 | |
331 | \& examples: | |
332 | \& my $gds2File = new GDS2(-fileName => ">$fileName"); | |
333 | .Ve | |
334 | .PP | |
335 | .Vb 8 | |
336 | \& $gds2File -> printGds2Record(-type=>'header',-data=>3); | |
337 | \& $gds2File -> printGds2Record(-type=>'bgnlib',-data=>[99,12,1,22,33,0,99,12,1,22,33,9]); | |
338 | \& $gds2File -> printGds2Record(-type=>'libname',-data=>"testlib"); | |
339 | \& $gds2File -> printGds2Record(-type=>'units',-data=>[0.001, 1e-9]); | |
340 | \& $gds2File -> printGds2Record(-type=>'bgnstr',-data=>[99,12,1,22,33,0,99,12,1,22,33,9]); | |
341 | \& ... | |
342 | \& $gds2File -> printGds2Record(-type=>'endstr'); | |
343 | \& $gds2File -> printGds2Record(-type=>'endlib'); | |
344 | .Ve | |
345 | .PP | |
346 | .Vb 6 | |
347 | \& Note: the special record type of 'record' can be used to copy a complete record | |
348 | \& just read in: | |
349 | \& while (my $record = $gds2FileIn -> readGds2Record()) | |
350 | \& { | |
351 | \& $gds2FileOut -> printGds2Record(-type=>'record',-data=>$record); | |
352 | \& } | |
353 | .Ve | |
354 | .Sh "printRecord \- prints a record just read" | |
355 | .IX Subsection "printRecord - prints a record just read" | |
356 | .Vb 4 | |
357 | \& usage: | |
358 | \& $gds2File -> printRecord( | |
359 | \& -data => $record | |
360 | \& ); | |
361 | .Ve | |
362 | .SH "Low Level Generic Read Methods" | |
363 | .IX Header "Low Level Generic Read Methods" | |
364 | .Sh "readGds2Record \- reads record header and data section" | |
365 | .IX Subsection "readGds2Record - reads record header and data section" | |
366 | .Vb 8 | |
367 | \& usage: | |
368 | \& while ($gds2File -> readGds2Record) | |
369 | \& { | |
370 | \& if ($gds2File -> returnRecordTypeString eq 'LAYER') | |
371 | \& { | |
372 | \& $layersFound[$gds2File -> layer] = 1; | |
373 | \& } | |
374 | \& } | |
375 | .Ve | |
376 | .Sh "readGds2RecordHeader \- only reads gds2 record header section (2 bytes)" | |
377 | .IX Subsection "readGds2RecordHeader - only reads gds2 record header section (2 bytes)" | |
378 | .Sh "readGds2RecordData \- only reads record data section" | |
379 | .IX Subsection "readGds2RecordData - only reads record data section" | |
380 | .Vb 10 | |
381 | \& slightly faster if you just want a certain thing... | |
382 | \& usage: | |
383 | \& while ($gds2File -> readGds2RecordHeader) | |
384 | \& { | |
385 | \& if ($gds2File -> returnRecordTypeString eq 'LAYER') | |
386 | \& { | |
387 | \& $gds2File -> readGds2RecordData; | |
388 | \& $layersFound[$gds2File -> returnLayer] = 1; | |
389 | \& } | |
390 | \& } | |
391 | .Ve | |
392 | .SH "Low Level Generic Evaluation Methods" | |
393 | .IX Header "Low Level Generic Evaluation Methods" | |
394 | .Sh "returnRecordType \- returns current (read) record type as integer" | |
395 | .IX Subsection "returnRecordType - returns current (read) record type as integer" | |
396 | .Vb 5 | |
397 | \& usage: | |
398 | \& if ($gds2File -> returnRecordType == 6) | |
399 | \& { | |
400 | \& print "found STRNAME"; | |
401 | \& } | |
402 | .Ve | |
403 | .Sh "returnRecordTypeString \- returns current (read) record type as string" | |
404 | .IX Subsection "returnRecordTypeString - returns current (read) record type as string" | |
405 | .Vb 5 | |
406 | \& usage: | |
407 | \& if ($gds2File -> returnRecordTypeString eq 'LAYER') | |
408 | \& { | |
409 | \& code goes here... | |
410 | \& } | |
411 | .Ve | |
412 | .Sh "returnRecordAsString \- returns current (read) record as a string" | |
413 | .IX Subsection "returnRecordAsString - returns current (read) record as a string" | |
414 | .Vb 5 | |
415 | \& usage: | |
416 | \& while ($gds2File -> readGds2Record) | |
417 | \& { | |
418 | \& print $gds2File -> returnRecordAsString; | |
419 | \& } | |
420 | .Ve | |
421 | .Sh "returnXyAsArray \- returns current (read) \s-1XY\s0 record as an array" | |
422 | .IX Subsection "returnXyAsArray - returns current (read) XY record as an array" | |
423 | .Vb 7 | |
424 | \& usage: | |
425 | \& $gds2File -> returnXyAsArray( | |
426 | \& -asInteger => 0|1 ## (optional) default is true. Return integer | |
427 | \& ## array or if false return array of reals. | |
428 | \& -withClosure => 0|1 ## (optional) default is true. Whether to | |
429 | \& ##return a rectangle with 5 or 4 points. | |
430 | \& ); | |
431 | .Ve | |
432 | .PP | |
433 | .Vb 5 | |
434 | \& example: | |
435 | \& while ($gds2File -> readGds2Record) | |
436 | \& { | |
437 | \& my @xy = $gds2File -> returnXyAsArray if ($gds2File -> isXy); | |
438 | \& } | |
439 | .Ve | |
440 | .Sh "returnRecordAsPerl \- returns current (read) record as a perl command to facilitate the creation of parameterized gds2 data with perl." | |
441 | .IX Subsection "returnRecordAsPerl - returns current (read) record as a perl command to facilitate the creation of parameterized gds2 data with perl." | |
442 | .Vb 8 | |
443 | \& usage: | |
444 | \& #!/usr/local/bin/perl | |
445 | \& use GDS2; | |
446 | \& my $gds2File = new GDS2(-fileName=>"test.gds"); | |
447 | \& while ($gds2File -> readGds2Record) | |
448 | \& { | |
449 | \& print $gds2File -> returnRecordAsPerl; | |
450 | \& } | |
451 | .Ve | |
452 | .SH "Low Level Specific Write Methods" | |
453 | .IX Header "Low Level Specific Write Methods" | |
454 | .Sh "printAngle \- prints \s-1ANGLE\s0 record" | |
455 | .IX Subsection "printAngle - prints ANGLE record" | |
456 | .Vb 2 | |
457 | \& usage: | |
458 | \& $gds2File -> printAngle(-num=>#.#); | |
459 | .Ve | |
460 | .Sh "printAttrtable \- prints \s-1ATTRTABLE\s0 record" | |
461 | .IX Subsection "printAttrtable - prints ATTRTABLE record" | |
462 | .Vb 2 | |
463 | \& usage: | |
464 | \& $gds2File -> printAttrtable(-string=>$string); | |
465 | .Ve | |
466 | .Sh "printBgnextn \- prints \s-1BGNEXTN\s0 record" | |
467 | .IX Subsection "printBgnextn - prints BGNEXTN record" | |
468 | .Vb 2 | |
469 | \& usage: | |
470 | \& $gds2File -> printBgnextn(-num=>#.#); | |
471 | .Ve | |
472 | .Sh "printBgnlib \- prints \s-1BGNLIB\s0 record" | |
473 | .IX Subsection "printBgnlib - prints BGNLIB record" | |
474 | .Vb 4 | |
475 | \& usage: | |
476 | \& $gds2File -> printBgnlib( | |
477 | \& -isoDate => 0|1 ## (optional) use ISO 4 digit date 2001 vs 101 | |
478 | \& ); | |
479 | .Ve | |
480 | .Sh "printBox \- prints \s-1BOX\s0 record" | |
481 | .IX Subsection "printBox - prints BOX record" | |
482 | .Vb 2 | |
483 | \& usage: | |
484 | \& $gds2File -> printBox; | |
485 | .Ve | |
486 | .Sh "printBoxtype \- prints \s-1BOXTYPE\s0 record" | |
487 | .IX Subsection "printBoxtype - prints BOXTYPE record" | |
488 | .Vb 2 | |
489 | \& usage: | |
490 | \& $gds2File -> printBoxtype(-num=>#); | |
491 | .Ve | |
492 | .Sh "printColrow \- prints \s-1COLROW\s0 record" | |
493 | .IX Subsection "printColrow - prints COLROW record" | |
494 | .Vb 2 | |
495 | \& usage: | |
496 | \& $gds2File -> printBoxtype(-columns=>#, -rows=>#); | |
497 | .Ve | |
498 | .Sh "printDatatype \- prints \s-1DATATYPE\s0 record" | |
499 | .IX Subsection "printDatatype - prints DATATYPE record" | |
500 | .Vb 2 | |
501 | \& usage: | |
502 | \& $gds2File -> printDatatype(-num=>#); | |
503 | .Ve | |
504 | .Sh "printElkey \- prints \s-1ELKEY\s0 record" | |
505 | .IX Subsection "printElkey - prints ELKEY record" | |
506 | .Vb 2 | |
507 | \& usage: | |
508 | \& $gds2File -> printElkey(-num=>#); | |
509 | .Ve | |
510 | .Sh "printEndel \- closes an element definition" | |
511 | .IX Subsection "printEndel - closes an element definition" | |
512 | .Sh "printEndextn \- prints path end extension record" | |
513 | .IX Subsection "printEndextn - prints path end extension record" | |
514 | .Vb 2 | |
515 | \& usage: | |
516 | \& $gds2File printEndextn -> (-num=>#.#); | |
517 | .Ve | |
518 | .Sh "printEndlib \- closes a library definition" | |
519 | .IX Subsection "printEndlib - closes a library definition" | |
520 | .Sh "printEndstr \- closes a structure definition" | |
521 | .IX Subsection "printEndstr - closes a structure definition" | |
522 | .Sh "printEndmasks \- prints a \s-1ENDMASKS\s0" | |
523 | .IX Subsection "printEndmasks - prints a ENDMASKS" | |
524 | .Sh "printFonts \- prints a \s-1FONTS\s0 record" | |
525 | .IX Subsection "printFonts - prints a FONTS record" | |
526 | .Vb 2 | |
527 | \& usage: | |
528 | \& $gds2File -> printFonts(-string=>'names_of_font_files'); | |
529 | .Ve | |
530 | .Sh "printHeader \- Prints a rev 3 header" | |
531 | .IX Subsection "printHeader - Prints a rev 3 header" | |
532 | .Vb 4 | |
533 | \& usage: | |
534 | \& $gds2File -> printHeader( | |
535 | \& -num => # ## optional, defaults to 3. valid revs are 0,3,4,5,and 600 | |
536 | \& ); | |
537 | .Ve | |
538 | .Sh "printLayer \- prints a \s-1LAYER\s0 number" | |
539 | .IX Subsection "printLayer - prints a LAYER number" | |
540 | .Vb 4 | |
541 | \& usage: | |
542 | \& $gds2File -> printLayer( | |
543 | \& -num => # ## optional, defaults to 0. | |
544 | \& ); | |
545 | .Ve | |
546 | .Sh "printLibname \- Prints library name" | |
547 | .IX Subsection "printLibname - Prints library name" | |
548 | .Vb 2 | |
549 | \& usage: | |
550 | \& printLibname(-name=>$name); | |
551 | .Ve | |
552 | .Sh "printPathtype \- prints a \s-1PATHTYPE\s0 number" | |
553 | .IX Subsection "printPathtype - prints a PATHTYPE number" | |
554 | .Vb 4 | |
555 | \& usage: | |
556 | \& $gds2File -> printPathtype( | |
557 | \& -num => # ## optional, defaults to 0. | |
558 | \& ); | |
559 | .Ve | |
560 | .Sh "printMag \- prints a \s-1MAG\s0 number" | |
561 | .IX Subsection "printMag - prints a MAG number" | |
562 | .Vb 4 | |
563 | \& usage: | |
564 | \& $gds2File -> printMag( | |
565 | \& -num => #.# ## optional, defaults to 0.0 | |
566 | \& ); | |
567 | .Ve | |
568 | .Sh "printNodetype \- prints a \s-1NODETYPE\s0 number" | |
569 | .IX Subsection "printNodetype - prints a NODETYPE number" | |
570 | .Vb 4 | |
571 | \& usage: | |
572 | \& $gds2File -> printNodetype( | |
573 | \& -num => # | |
574 | \& ); | |
575 | .Ve | |
576 | .Sh "printPresentation \- prints a text presentation record" | |
577 | .IX Subsection "printPresentation - prints a text presentation record" | |
578 | .Vb 6 | |
579 | \& usage: | |
580 | \& $gds2File -> printPresentation( | |
581 | \& -font => #, ##optional, defaults to 0, valid numbers are 0-3 | |
582 | \& -top, ||-middle, || -bottom, ## vertical justification | |
583 | \& -left, ||-center, || -right, ## horizontal justification | |
584 | \& ); | |
585 | .Ve | |
586 | .PP | |
587 | .Vb 2 | |
588 | \& example: | |
589 | \& gds2File -> printPresentation(-font=>0,-top,-left); | |
590 | .Ve | |
591 | .Sh "printPropattr \- prints a property id number" | |
592 | .IX Subsection "printPropattr - prints a property id number" | |
593 | .Vb 2 | |
594 | \& usage: | |
595 | \& $gds2File -> printPropattr( -num => # ); | |
596 | .Ve | |
597 | .Sh "printPropvalue \- prints a property value string" | |
598 | .IX Subsection "printPropvalue - prints a property value string" | |
599 | .Vb 2 | |
600 | \& usage: | |
601 | \& $gds2File -> printPropvalue( -string => $string ); | |
602 | .Ve | |
603 | .Sh "printSname \- prints a \s-1SNAME\s0 string" | |
604 | .IX Subsection "printSname - prints a SNAME string" | |
605 | .Vb 2 | |
606 | \& usage: | |
607 | \& $gds2File -> printSname( -name => $cellName ); | |
608 | .Ve | |
609 | .Sh "printStrans \- prints a \s-1STRANS\s0 record" | |
610 | .IX Subsection "printStrans - prints a STRANS record" | |
611 | .Vb 2 | |
612 | \& usage: | |
613 | \& $gds2File -> printStrans( -reflect ); | |
614 | .Ve | |
615 | .Sh "printString \- prints a \s-1STRING\s0 record" | |
616 | .IX Subsection "printString - prints a STRING record" | |
617 | .Vb 2 | |
618 | \& usage: | |
619 | \& $gds2File -> printSname( -string => $text ); | |
620 | .Ve | |
621 | .Sh "printStrname \- prints a structure name string" | |
622 | .IX Subsection "printStrname - prints a structure name string" | |
623 | .Vb 2 | |
624 | \& usage: | |
625 | \& $gds2File -> printStrname( -name => $cellName ); | |
626 | .Ve | |
627 | .Sh "printTexttype \- prints a text type number" | |
628 | .IX Subsection "printTexttype - prints a text type number" | |
629 | .Vb 2 | |
630 | \& usage: | |
631 | \& $gds2File -> printTexttype( -num => # ); | |
632 | .Ve | |
633 | .Sh "printUnits \- Prints units record." | |
634 | .IX Subsection "printUnits - Prints units record." | |
635 | .Vb 1 | |
636 | \& Defaults to 1e-3 and 1e-9 | |
637 | .Ve | |
638 | .Sh "printPropattr \- prints a width number" | |
639 | .IX Subsection "printPropattr - prints a width number" | |
640 | .Vb 2 | |
641 | \& usage: | |
642 | \& $gds2File -> printWidth( -num => # ); | |
643 | .Ve | |
644 | .Sh "printXy \- prints an \s-1XY\s0 array" | |
645 | .IX Subsection "printXy - prints an XY array" | |
646 | .Vb 2 | |
647 | \& usage: | |
648 | \& $gds2File -> printXy( -xy => \e@array ); | |
649 | .Ve | |
650 | .SH "Low Level Specific Evaluation Methods" | |
651 | .IX Header "Low Level Specific Evaluation Methods" | |
652 | .Sh "returnDatatype \- returns datatype # if record is \s-1DATATYPE\s0 else returns \-1" | |
653 | .IX Subsection "returnDatatype - returns datatype # if record is DATATYPE else returns -1" | |
654 | .Vb 2 | |
655 | \& usage: | |
656 | \& $dataTypesFound[$gds2File -> returnDatatype] = 1; | |
657 | .Ve | |
658 | .Sh "returnPathtype \- returns pathtype # if record is \s-1PATHTYPE\s0 else returns \-1" | |
659 | .IX Subsection "returnPathtype - returns pathtype # if record is PATHTYPE else returns -1" | |
660 | .Vb 1 | |
661 | \& usage: | |
662 | .Ve | |
663 | .Sh "returnTexttype \- returns texttype # if record is \s-1TEXTTYPE\s0 else returns \-1" | |
664 | .IX Subsection "returnTexttype - returns texttype # if record is TEXTTYPE else returns -1" | |
665 | .Vb 2 | |
666 | \& usage: | |
667 | \& $TextTypesFound[$gds2File -> returnTexttype] = 1; | |
668 | .Ve | |
669 | .Sh "returnWidth \- returns width # if record is \s-1WIDTH\s0 else returns \-1" | |
670 | .IX Subsection "returnWidth - returns width # if record is WIDTH else returns -1" | |
671 | .Vb 1 | |
672 | \& usage: | |
673 | .Ve | |
674 | .Sh "returnLayer \- returns layer # if record is \s-1LAYER\s0 else returns \-1" | |
675 | .IX Subsection "returnLayer - returns layer # if record is LAYER else returns -1" | |
676 | .Vb 2 | |
677 | \& usage: | |
678 | \& $layersFound[$gds2File -> returnLayer] = 1; | |
679 | .Ve | |
680 | .Sh "returnBgnextn \- returns bgnextn if record is \s-1BGNEXTN\s0 else returns 0" | |
681 | .IX Subsection "returnBgnextn - returns bgnextn if record is BGNEXTN else returns 0" | |
682 | .Vb 1 | |
683 | \& usage: | |
684 | .Ve | |
685 | .Sh "returnEndextn\- returns endextn if record is \s-1ENDEXTN\s0 else returns 0" | |
686 | .IX Subsection "returnEndextn- returns endextn if record is ENDEXTN else returns 0" | |
687 | .Vb 1 | |
688 | \& usage: | |
689 | .Ve | |
690 | .Sh "returnString \- return string if record type is \s-1STRING\s0 else ''" | |
691 | .IX Subsection "returnString - return string if record type is STRING else ''" | |
692 | .Sh "returnSname \- return string if record type is \s-1SNAME\s0 else ''" | |
693 | .IX Subsection "returnSname - return string if record type is SNAME else ''" | |
694 | .Sh "returnStrname \- return string if record type is \s-1STRNAME\s0 else ''" | |
695 | .IX Subsection "returnStrname - return string if record type is STRNAME else ''" | |
696 | .SH "Low Level Specific Boolean Methods" | |
697 | .IX Header "Low Level Specific Boolean Methods" | |
698 | .Sh "isAref \- return 0 or 1 depending on whether current record is an aref" | |
699 | .IX Subsection "isAref - return 0 or 1 depending on whether current record is an aref" | |
700 | .Sh "isBgnlib \- return 0 or 1 depending on whether current record is a bgnlib" | |
701 | .IX Subsection "isBgnlib - return 0 or 1 depending on whether current record is a bgnlib" | |
702 | .Sh "isBgnstr \- return 0 or 1 depending on whether current record is a bgnstr" | |
703 | .IX Subsection "isBgnstr - return 0 or 1 depending on whether current record is a bgnstr" | |
704 | .Sh "isBoundary \- return 0 or 1 depending on whether current record is a boundary" | |
705 | .IX Subsection "isBoundary - return 0 or 1 depending on whether current record is a boundary" | |
706 | .Sh "isDatatype \- return 0 or 1 depending on whether current record is datatype" | |
707 | .IX Subsection "isDatatype - return 0 or 1 depending on whether current record is datatype" | |
708 | .Sh "isEndlib \- return 0 or 1 depending on whether current record is endlib" | |
709 | .IX Subsection "isEndlib - return 0 or 1 depending on whether current record is endlib" | |
710 | .Sh "isEndel \- return 0 or 1 depending on whether current record is endel" | |
711 | .IX Subsection "isEndel - return 0 or 1 depending on whether current record is endel" | |
712 | .Sh "isEndstr \- return 0 or 1 depending on whether current record is endstr" | |
713 | .IX Subsection "isEndstr - return 0 or 1 depending on whether current record is endstr" | |
714 | .Sh "isHeader \- return 0 or 1 depending on whether current record is a header" | |
715 | .IX Subsection "isHeader - return 0 or 1 depending on whether current record is a header" | |
716 | .Sh "isLibname \- return 0 or 1 depending on whether current record is a libname" | |
717 | .IX Subsection "isLibname - return 0 or 1 depending on whether current record is a libname" | |
718 | .Sh "isPath \- return 0 or 1 depending on whether current record is a path" | |
719 | .IX Subsection "isPath - return 0 or 1 depending on whether current record is a path" | |
720 | .Sh "isSref \- return 0 or 1 depending on whether current record is an sref" | |
721 | .IX Subsection "isSref - return 0 or 1 depending on whether current record is an sref" | |
722 | .Sh "isSrfname \- return 0 or 1 depending on whether current record is an srfname" | |
723 | .IX Subsection "isSrfname - return 0 or 1 depending on whether current record is an srfname" | |
724 | .Sh "isText \- return 0 or 1 depending on whether current record is a text" | |
725 | .IX Subsection "isText - return 0 or 1 depending on whether current record is a text" | |
726 | .Sh "isUnits \- return 0 or 1 depending on whether current record is units" | |
727 | .IX Subsection "isUnits - return 0 or 1 depending on whether current record is units" | |
728 | .Sh "isLayer \- return 0 or 1 depending on whether current record is layer" | |
729 | .IX Subsection "isLayer - return 0 or 1 depending on whether current record is layer" | |
730 | .Sh "isStrname \- return 0 or 1 depending on whether current record is strname" | |
731 | .IX Subsection "isStrname - return 0 or 1 depending on whether current record is strname" | |
732 | .Sh "isWidth \- return 0 or 1 depending on whether current record is width" | |
733 | .IX Subsection "isWidth - return 0 or 1 depending on whether current record is width" | |
734 | .Sh "isXy \- return 0 or 1 depending on whether current record is xy" | |
735 | .IX Subsection "isXy - return 0 or 1 depending on whether current record is xy" | |
736 | .Sh "isSname \- return 0 or 1 depending on whether current record is sname" | |
737 | .IX Subsection "isSname - return 0 or 1 depending on whether current record is sname" | |
738 | .Sh "isColrow \- return 0 or 1 depending on whether current record is colrow" | |
739 | .IX Subsection "isColrow - return 0 or 1 depending on whether current record is colrow" | |
740 | .Sh "isTextnode \- return 0 or 1 depending on whether current record is a textnode" | |
741 | .IX Subsection "isTextnode - return 0 or 1 depending on whether current record is a textnode" | |
742 | .Sh "isNode \- return 0 or 1 depending on whether current record is a node" | |
743 | .IX Subsection "isNode - return 0 or 1 depending on whether current record is a node" | |
744 | .Sh "isTexttype \- return 0 or 1 depending on whether current record is a texttype" | |
745 | .IX Subsection "isTexttype - return 0 or 1 depending on whether current record is a texttype" | |
746 | .Sh "isPresentation \- return 0 or 1 depending on whether current record is a presentation" | |
747 | .IX Subsection "isPresentation - return 0 or 1 depending on whether current record is a presentation" | |
748 | .Sh "isSpacing \- return 0 or 1 depending on whether current record is a spacing" | |
749 | .IX Subsection "isSpacing - return 0 or 1 depending on whether current record is a spacing" | |
750 | .Sh "isString \- return 0 or 1 depending on whether current record is a string" | |
751 | .IX Subsection "isString - return 0 or 1 depending on whether current record is a string" | |
752 | .Sh "isStrans \- return 0 or 1 depending on whether current record is a strans" | |
753 | .IX Subsection "isStrans - return 0 or 1 depending on whether current record is a strans" | |
754 | .Sh "isMag \- return 0 or 1 depending on whether current record is a mag" | |
755 | .IX Subsection "isMag - return 0 or 1 depending on whether current record is a mag" | |
756 | .Sh "isAngle \- return 0 or 1 depending on whether current record is a angle" | |
757 | .IX Subsection "isAngle - return 0 or 1 depending on whether current record is a angle" | |
758 | .Sh "isUinteger \- return 0 or 1 depending on whether current record is a uinteger" | |
759 | .IX Subsection "isUinteger - return 0 or 1 depending on whether current record is a uinteger" | |
760 | .Sh "isUstring \- return 0 or 1 depending on whether current record is a ustring" | |
761 | .IX Subsection "isUstring - return 0 or 1 depending on whether current record is a ustring" | |
762 | .Sh "isReflibs \- return 0 or 1 depending on whether current record is a reflibs" | |
763 | .IX Subsection "isReflibs - return 0 or 1 depending on whether current record is a reflibs" | |
764 | .Sh "isFonts \- return 0 or 1 depending on whether current record is a fonts" | |
765 | .IX Subsection "isFonts - return 0 or 1 depending on whether current record is a fonts" | |
766 | .Sh "isPathtype \- return 0 or 1 depending on whether current record is a pathtype" | |
767 | .IX Subsection "isPathtype - return 0 or 1 depending on whether current record is a pathtype" | |
768 | .Sh "isGenerations \- return 0 or 1 depending on whether current record is a generations" | |
769 | .IX Subsection "isGenerations - return 0 or 1 depending on whether current record is a generations" | |
770 | .Sh "isAttrtable \- return 0 or 1 depending on whether current record is a attrtable" | |
771 | .IX Subsection "isAttrtable - return 0 or 1 depending on whether current record is a attrtable" | |
772 | .Sh "isStyptable \- return 0 or 1 depending on whether current record is a styptable" | |
773 | .IX Subsection "isStyptable - return 0 or 1 depending on whether current record is a styptable" | |
774 | .Sh "isStrtype \- return 0 or 1 depending on whether current record is a strtype" | |
775 | .IX Subsection "isStrtype - return 0 or 1 depending on whether current record is a strtype" | |
776 | .Sh "isEflags \- return 0 or 1 depending on whether current record is a eflags" | |
777 | .IX Subsection "isEflags - return 0 or 1 depending on whether current record is a eflags" | |
778 | .Sh "isElkey \- return 0 or 1 depending on whether current record is a elkey" | |
779 | .IX Subsection "isElkey - return 0 or 1 depending on whether current record is a elkey" | |
780 | .Sh "isLinktype \- return 0 or 1 depending on whether current record is a linktype" | |
781 | .IX Subsection "isLinktype - return 0 or 1 depending on whether current record is a linktype" | |
782 | .Sh "isLinkkeys \- return 0 or 1 depending on whether current record is a linkkeys" | |
783 | .IX Subsection "isLinkkeys - return 0 or 1 depending on whether current record is a linkkeys" | |
784 | .Sh "isNodetype \- return 0 or 1 depending on whether current record is a nodetype" | |
785 | .IX Subsection "isNodetype - return 0 or 1 depending on whether current record is a nodetype" | |
786 | .Sh "isPropattr \- return 0 or 1 depending on whether current record is a propattr" | |
787 | .IX Subsection "isPropattr - return 0 or 1 depending on whether current record is a propattr" | |
788 | .Sh "isPropvalue \- return 0 or 1 depending on whether current record is a propvalue" | |
789 | .IX Subsection "isPropvalue - return 0 or 1 depending on whether current record is a propvalue" | |
790 | .Sh "isBox \- return 0 or 1 depending on whether current record is a box" | |
791 | .IX Subsection "isBox - return 0 or 1 depending on whether current record is a box" | |
792 | .Sh "isBoxtype \- return 0 or 1 depending on whether current record is a boxtype" | |
793 | .IX Subsection "isBoxtype - return 0 or 1 depending on whether current record is a boxtype" | |
794 | .Sh "isPlex \- return 0 or 1 depending on whether current record is a plex" | |
795 | .IX Subsection "isPlex - return 0 or 1 depending on whether current record is a plex" | |
796 | .Sh "isBgnextn \- return 0 or 1 depending on whether current record is a bgnextn" | |
797 | .IX Subsection "isBgnextn - return 0 or 1 depending on whether current record is a bgnextn" | |
798 | .Sh "isEndextn \- return 0 or 1 depending on whether current record is a endextn" | |
799 | .IX Subsection "isEndextn - return 0 or 1 depending on whether current record is a endextn" | |
800 | .Sh "isTapenum \- return 0 or 1 depending on whether current record is a tapenum" | |
801 | .IX Subsection "isTapenum - return 0 or 1 depending on whether current record is a tapenum" | |
802 | .Sh "isTapecode \- return 0 or 1 depending on whether current record is a tapecode" | |
803 | .IX Subsection "isTapecode - return 0 or 1 depending on whether current record is a tapecode" | |
804 | .Sh "isStrclass \- return 0 or 1 depending on whether current record is a strclass" | |
805 | .IX Subsection "isStrclass - return 0 or 1 depending on whether current record is a strclass" | |
806 | .Sh "isReserved \- return 0 or 1 depending on whether current record is a reserved" | |
807 | .IX Subsection "isReserved - return 0 or 1 depending on whether current record is a reserved" | |
808 | .Sh "isFormat \- return 0 or 1 depending on whether current record is a format" | |
809 | .IX Subsection "isFormat - return 0 or 1 depending on whether current record is a format" | |
810 | .Sh "isMask \- return 0 or 1 depending on whether current record is a mask" | |
811 | .IX Subsection "isMask - return 0 or 1 depending on whether current record is a mask" | |
812 | .Sh "isEndmasks \- return 0 or 1 depending on whether current record is a endmasks" | |
813 | .IX Subsection "isEndmasks - return 0 or 1 depending on whether current record is a endmasks" | |
814 | .Sh "isLibdirsize \- return 0 or 1 depending on whether current record is a libdirsize" | |
815 | .IX Subsection "isLibdirsize - return 0 or 1 depending on whether current record is a libdirsize" | |
816 | .Sh "isLibsecur \- return 0 or 1 depending on whether current record is a libsecur" | |
817 | .IX Subsection "isLibsecur - return 0 or 1 depending on whether current record is a libsecur" | |
818 | .Sh "tellSize \- return current byte position (\s-1NOT\s0 zero based)" | |
819 | .IX Subsection "tellSize - return current byte position (NOT zero based)" | |
820 | .Vb 2 | |
821 | \& usage: | |
822 | \& my $position = $gds2File -> tellSize; | |
823 | .Ve | |
824 | .SH "Examples" | |
825 | .IX Header "Examples" | |
826 | .Vb 8 | |
827 | \& Layer change: | |
828 | \& here's a bare bones script to change all layer 59 to 66 given a file to | |
829 | \& read and a new file to create. | |
830 | \& #!/usr/local/bin/perl -w | |
831 | \& use strict; | |
832 | \& use GDS2; | |
833 | \& my $fileName1 = $ARGV[0]; | |
834 | \& my $fileName2 = $ARGV[1]; | |
835 | .Ve | |
836 | .PP | |
837 | .Vb 2 | |
838 | \& my $gds2File1 = new GDS2(-fileName => $fileName1); | |
839 | \& my $gds2File2 = new GDS2(-fileName => ">$fileName2"); | |
840 | .Ve | |
841 | .PP | |
842 | .Vb 11 | |
843 | \& while (my $record = $gds2File1 -> readGds2Record) | |
844 | \& { | |
845 | \& if ($gds2File1 -> returnLayer == 59) | |
846 | \& { | |
847 | \& $gds2File2 -> printLayer(-num=>66); | |
848 | \& } | |
849 | \& else | |
850 | \& { | |
851 | \& $gds2File2 -> printRecord(-data=>$record); | |
852 | \& } | |
853 | \& } | |
854 | .Ve | |
855 | .PP | |
856 | .Vb 5 | |
857 | \& Gds2 dump: | |
858 | \& here's a program to dump the contents of a stream file. | |
859 | \& #!/usr/local/bin/perl -w | |
860 | \& use GDS2; | |
861 | \& $\e="\en"; | |
862 | .Ve | |
863 | .PP | |
864 | .Vb 5 | |
865 | \& my $gds2File = new GDS2(-fileName=>$ARGV[0]); | |
866 | \& while ($gds2File -> readGds2Record) | |
867 | \& { | |
868 | \& print $gds2File -> returnRecordAsString; | |
869 | \& } | |
870 | .Ve | |
871 | .PP | |
872 | .Vb 30 | |
873 | \& Create a complete GDS2 stream file from scratch: | |
874 | \& #!/usr/local/bin/perl -w | |
875 | \& use GDS2; | |
876 | \& my $gds2File = new GDS2(-fileName=>'>test.gds'); | |
877 | \& $gds2File -> printInitLib(-name=>'testlib'); | |
878 | \& $gds2File -> printBgnstr(-name=>'test'); | |
879 | \& $gds2File -> printPath( | |
880 | \& -layer=>6, | |
881 | \& -pathType=>0, | |
882 | \& -width=>2.4, | |
883 | \& -xy=>[0,0, 10.5,0, 10.5,3.3], | |
884 | \& ); | |
885 | \& $gds2File -> printSref( | |
886 | \& -name=>'contact', | |
887 | \& -xy=>[4,5.5], | |
888 | \& ); | |
889 | \& $gds2File -> printAref( | |
890 | \& -name=>'contact', | |
891 | \& -columns=>2, | |
892 | \& -rows=>3, | |
893 | \& -xy=>[0,0], | |
894 | \& ); | |
895 | \& $gds2File -> printEndstr; | |
896 | \& $gds2File -> printBgnstr(-name => 'contact'); | |
897 | \& $gds2File -> printBoundary( | |
898 | \& -layer=>10, | |
899 | \& -xy=>[0,0, 1,0, 1,1, 0,1], | |
900 | \& ); | |
901 | \& $gds2File -> printEndstr; | |
902 | \& $gds2File -> printEndlib(); | |
903 | .Ve | |
904 | .SH "GDS2 Stream Format" | |
905 | .IX Header "GDS2 Stream Format" | |
906 | .Vb 50 | |
907 | \& ######################################################################################### | |
908 | \& # | |
909 | \& # Gds2 stream format is composed of variable length records. The mininum | |
910 | \& # length record is 4 bytes. The 1st 2 bytes of a record contain a count (in 8 bit | |
911 | \& # bytes) of the total record length. The 3rd byte of the header is the record | |
912 | \& # type. The 4th byte describes the type of data contained w/in the record. The | |
913 | \& # 5th through last bytes are data. | |
914 | \& # | |
915 | \& # If the output file is a mag tape, then the records of the library are written | |
916 | \& # out in 2048-byte physical blocks. Records may overlap block boundaries. | |
917 | \& # For this reason I think gds2 is often padded with null bytes so that the | |
918 | \& # file size ends up being a multiple of 2048. | |
919 | \& # | |
920 | \& # A null word consists of 2 consecutive zero bytes. Use null words to fill the | |
921 | \& # space between: | |
922 | \& # o the last record of a library and the end of its block | |
923 | \& # o the last record of a tape in a mult-reel stream file. | |
924 | \& # | |
925 | \& # DATA TYPE VALUE RECORD | |
926 | \& # --------- ----- ----------------------- | |
927 | \& # no data present 0 4 byte header + 0 | |
928 | \& # | |
929 | \& # Bit Array 1 4 byte header + 2 bytes data | |
930 | \& # | |
931 | \& # 2byte Signed Int 2 SMMMMMMM MMMMMMMM -> S - sign ; M - magnitude. | |
932 | \& # Twos complement format, with the most significant byte first. | |
933 | \& # I.E. | |
934 | \& # 0x0001 = 1 | |
935 | \& # 0x0002 = 2 | |
936 | \& # 0x0089 = 137 | |
937 | \& # 0xffff = -1 | |
938 | \& # 0xfffe = -2 | |
939 | \& # 0xff77 = -137 | |
940 | \& # | |
941 | \& # 4byte Signed Int 3 SMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM | |
942 | \& # | |
943 | \& # 8byte Real 5 SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM E-expon in excess-64 | |
944 | \& # MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM representation | |
945 | \& # | |
946 | \& # Mantissa == pos fraction >=1/16 && <1 bit 8==1/2, 9==1/4 etc... | |
947 | \& # The first bit is the sign (1 = negative), the next 7 bits | |
948 | \& # are the exponent, you have to subtract 64 from this number to | |
949 | \& # get the real value. The next seven bytes are the mantissa in | |
950 | \& # 4 word floating point representation. | |
951 | \& # | |
952 | \& # | |
953 | \& # string 6 odd length strings must be padded w/ null character and | |
954 | \& # byte count++ | |
955 | \& # | |
956 | \& ######################################################################################### | |
957 | .Ve | |
958 | .SH "Backus-naur representation of GDS2 Stream Syntax" | |
959 | .IX Header "Backus-naur representation of GDS2 Stream Syntax" | |
960 | .Vb 34 | |
961 | \& ################################################################################ | |
962 | \& # <STREAM FORMAT>::= HEADER BGNLIB [LIBDIRSIZE] [SRFNAME] [LIBSECR] # | |
963 | \& # LIBNAME [REFLIBS] [FONTS] [ATTRTABLE] [GENERATIONS] # | |
964 | \& # [<FormatType>] UNITS {<structure>}* ENDLIB # | |
965 | \& # # | |
966 | \& # <FormatType>::= FORMAT | FORMAT {MASK}+ ENDMASKS # | |
967 | \& # # | |
968 | \& # <structure>::= BGNSTR STRNAME [STRCLASS] {<element>}* ENDSTR # | |
969 | \& # # | |
970 | \& # <element>::= {<boundary> | <path> | <SREF> | <AREF> | <text> | # | |
971 | \& # <node> | <box} {<property>}* ENDEL # | |
972 | \& # # | |
973 | \& # <boundary>::= BOUNDARY [ELFLAGS] [PLEX] LAYER DATATYPE XY # | |
974 | \& # # | |
975 | \& # <path>::= PATH [ELFLAGS] [PLEX] LAYER DATATYPE [PATHTYPE] # | |
976 | \& # [WIDTH] [BGNEXTN] [ENDEXTN] [XY] # | |
977 | \& # # | |
978 | \& # <SREF>::= SREF [ELFLAGS] [PLEX] SNAME [<strans>] XY # | |
979 | \& # # | |
980 | \& # <AREF>::= AREF [ELFLAGS] [PLEX] SNAME [<strans>] COLROW XY # | |
981 | \& # # | |
982 | \& # <text>::= TEXT [ELFLAGS] [PLEX] LAYER <textbody> # | |
983 | \& # # | |
984 | \& # <textbody>::= TEXTTYPE [PRESENTATION] [PATHTYPE] [WIDTH] [<strans>] XY # | |
985 | \& # STRING # | |
986 | \& # # | |
987 | \& # <strans>::= STRANS [MAG] [ANGLE] # | |
988 | \& # # | |
989 | \& # <node>::= NODE [ELFLAGS] [PLEX] LAYER NODETYPE XY # | |
990 | \& # # | |
991 | \& # <box>::= BOX [ELFLAGS] [PLEX] LAYER BOXTYPE XY # | |
992 | \& # # | |
993 | \& # <property>::= PROPATTR PROPVALUE # | |
994 | \& ################################################################################ | |
995 | .Ve | |
996 | .SH "GDS2 Stream Record Datatypes" | |
997 | .IX Header "GDS2 Stream Record Datatypes" | |
998 | .Vb 9 | |
999 | \& ################################################################################ | |
1000 | \& NO_DATA = 0; | |
1001 | \& BIT_ARRAY = 1; | |
1002 | \& INTEGER_2 = 2; | |
1003 | \& INTEGER_4 = 3; | |
1004 | \& REAL_4 = 4; ## NOT supported, never really used | |
1005 | \& REAL_8 = 5; | |
1006 | \& ACSII_STRING = 6; | |
1007 | \& ################################################################################ | |
1008 | .Ve | |
1009 | .SH "GDS2 Stream Record Types" | |
1010 | .IX Header "GDS2 Stream Record Types" | |
1011 | .Vb 83 | |
1012 | \& ################################################################################ | |
1013 | \& HEADER = 0; ## 2-byte Signed Integer | |
1014 | \& BGNLIB = 1; ## 2-byte Signed Integer | |
1015 | \& LIBNAME = 2; ## ASCII String | |
1016 | \& UNITS = 3; ## 8-byte Real | |
1017 | \& ENDLIB = 4; ## no data present | |
1018 | \& BGNSTR = 5; ## 2-byte Signed Integer | |
1019 | \& STRNAME = 6; ## ASCII String | |
1020 | \& ENDSTR = 7; ## no data present | |
1021 | \& BOUNDARY = 8; ## no data present | |
1022 | \& PATH = 9; ## no data present | |
1023 | \& SREF = 10; ## no data present | |
1024 | \& AREF = 11; ## no data present | |
1025 | \& TEXT = 12; ## no data present | |
1026 | \& LAYER = 13; ## 2-byte Signed Integer | |
1027 | \& DATATYPE = 14; ## 2-byte Signed Integer | |
1028 | \& WIDTH = 15; ## 4-byte Signed Integer | |
1029 | \& XY = 16; ## 4-byte Signed Integer | |
1030 | \& ENDEL = 17; ## no data present | |
1031 | \& SNAME = 18; ## ASCII String | |
1032 | \& COLROW = 19; ## 2 2-byte Signed Integer <= 32767 | |
1033 | \& TEXTNODE = 20; ## no data present | |
1034 | \& NODE = 21; ## no data present | |
1035 | \& TEXTTYPE = 22; ## 2-byte Signed Integer | |
1036 | \& PRESENTATION = 23; ## Bit Array. One word (2 bytes) of bit flags. Bits 11 and | |
1037 | \& ## 12 together specify the font 00->font 0 11->font 3. | |
1038 | \& ## Bits 13 and 14 specify the vertical presentation, 15 | |
1039 | \& ## and 16 the horizontal presentation. 00->'top/left' 01-> | |
1040 | \& ## middle/center 10->bottom/right bits 1-10 were reserved | |
1041 | \& ## for future use and should be 0. | |
1042 | \& SPACING = 24; ## discontinued | |
1043 | \& STRING = 25; ## ASCII String <= 512 characters | |
1044 | \& STRANS = 26; ## Bit Array: 2 bytes of bit flags for graphic presentation | |
1045 | \& ## The 1st (high order or leftmost) bit specifies | |
1046 | \& ## reflection. If set then reflection across the X-axis | |
1047 | \& ## is applied before rotation. The 14th bit flags | |
1048 | \& ## absolute mag, the 15th absolute angle, the other bits | |
1049 | \& ## were reserved for future use and should be 0. | |
1050 | \& MAG = 27; ## 8-byte Real | |
1051 | \& ANGLE = 28; ## 8-byte Real | |
1052 | \& UINTEGER = 29; ## UNKNOWN User int, used only in Calma V2.0 | |
1053 | \& USTRING = 30; ## UNKNOWN User string, used only in Calma V2.0 | |
1054 | \& REFLIBS = 31; ## ASCII String | |
1055 | \& FONTS = 32; ## ASCII String | |
1056 | \& PATHTYPE = 33; ## 2-byte Signed Integer | |
1057 | \& GENERATIONS = 34; ## 2-byte Signed Integer | |
1058 | \& ATTRTABLE = 35; ## ASCII String | |
1059 | \& STYPTABLE = 36; ## ASCII String "Unreleased feature" | |
1060 | \& STRTYPE = 37; ## 2-byte Signed Integer "Unreleased feature" | |
1061 | \& EFLAGS = 38; ## BIT_ARRAY Flags for template and exterior data. | |
1062 | \& ## bits 15 to 0, l to r 0=template, 1=external data, others unused | |
1063 | \& ELKEY = 39; ## INTEGER_4 "Unreleased feature" | |
1064 | \& LINKTYPE = 40; ## UNKNOWN "Unreleased feature" | |
1065 | \& LINKKEYS = 41; ## UNKNOWN "Unreleased feature" | |
1066 | \& NODETYPE = 42; ## INTEGER_2 Nodetype specification. On Calma this could be 0 to 63, | |
1067 | \& ## GDSII allows 0 to 255. Of course a 16 bit integer allows up to 65535... | |
1068 | \& PROPATTR = 43; ## INTEGER_2 Property number. | |
1069 | \& PROPVALUE = 44; ## STRING Property value. On GDSII, 128 characters max, unless an | |
1070 | \& ## SREF, AREF, or NODE, which may have 512 characters. | |
1071 | \& BOX = 45; ## NO_DATA The beginning of a BOX element. | |
1072 | \& BOXTYPE = 46; ## INTEGER_2 Boxtype specification. | |
1073 | \& PLEX = 47; ## INTEGER_4 Plex number and plexhead flag. The least significant bit of | |
1074 | \& ## the most significant byte is the plexhead flag. | |
1075 | \& BGNEXTN = 48; ## INTEGER_4 Path extension beginning for pathtype 4 in Calma CustomPlus. | |
1076 | \& ## In database units, may be negative. | |
1077 | \& ENDEXTN = 49; ## INTEGER_4 Path extension end for pathtype 4 in Calma CustomPlus. In | |
1078 | \& ## database units, may be negative. | |
1079 | \& TAPENUM = 50; ## INTEGER_2 Tape number for multi-reel stream file. | |
1080 | \& TAPECODE = 51; ## INTEGER_2 Tape code to verify that the reel is from the proper set. | |
1081 | \& ## 12 bytes that are supposed to form a unique tape code. | |
1082 | \& STRCLASS = 52; ## BIT_ARRAY Calma use only. | |
1083 | \& RESERVED = 53; ## INTEGER_4 Used to be NUMTYPES per Calma GDSII Stream Format Manual, v6.0. | |
1084 | \& FORMAT = 54; ## INTEGER_2 Archive or Filtered flag. 0: Archive 1: filtered | |
1085 | \& MASK = 55; ## STRING Only in filtered streams. Layers and datatypes used for mask | |
1086 | \& ## in a filtered stream file. A string giving ranges of layers and datatypes | |
1087 | \& ## separated by a semicolon. There may be more than one mask in a stream file. | |
1088 | \& ENDMASKS = 56; ## NO_DATA The end of mask descriptions. | |
1089 | \& LIBDIRSIZE = 57; ## INTEGER_2 Number of pages in library director, a GDSII thing, it seems | |
1090 | \& ## to have only been used when Calma INFORM was creating a new library. | |
1091 | \& SRFNAME = 58; ## STRING Calma "Sticks"(c) rule file name. | |
1092 | \& LIBSECUR = 59; ## INTEGER_2 Access control list stuff for CalmaDOS, ancient. INFORM used | |
1093 | \& ## this when creating a new library. Had 1 to 32 entries with group | |
1094 | \& ## numbers, user numbers and access rights. | |
1095 | .Ve |