klayout/testdata/oasis/t9.1.ot

162 lines
6.0 KiB
Plaintext

# <test>
# <name>t9.1.ot</name>
# <content-description>A single cell with a variety of CTRAPEZOID objects</content-description>
# <test-intention>Geometrical objects reader capabilities</test-intention>
# <test-intention>CTRAPEZOID record reading</test-intention>
# <test-intention>Repetitions of CTRAPEZOIDs</test-intention>
# <test-intention>Trapezoid-related modal variables</test-intention>
# <content>
# begin_lib 0.001
# begin_cell {A}
# boundary 1 2 {-100 200} {-100 400} {0 400} {0 200} {-100 200}
# boundary 1 2
# boundary 1 2 {-100 1000} {-100 1100} {50 1100} {150 1000} {-100 1000}
# boundary 1 2 {-100 1400} {-100 1500} {150 1500} {50 1400} {-100 1400}
# boundary 1 2 {-100 1800} {0 1900} {150 1900} {150 1800} {-100 1800}
# boundary 1 2 {0 2200} {-100 2300} {150 2300} {150 2200} {0 2200}
# boundary 1 2 {-100 2600} {0 2700} {50 2700} {150 2600} {-100 2600}
# boundary 1 2 {0 3000} {-100 3100} {150 3100} {50 3000} {0 3000}
# boundary 1 2 {-100 3400} {0 3500} {150 3500} {50 3400} {-100 3400}
# boundary 1 2 {0 3800} {-100 3900} {50 3900} {150 3800} {0 3800}
# boundary 1 2 {-100 4200} {-100 4450} {0 4350} {0 4200} {-100 4200}
# boundary 1 2 {-100 4600} {-100 4750} {0 4850} {0 4600} {-100 4600}
# boundary 1 2 {-100 5000} {-100 5250} {0 5250} {0 5100} {-100 5000}
# boundary 1 2 {0 5400} {-100 5500} {-100 5650} {0 5650} {0 5400}
# boundary 1 2 {-100 5800} {-100 6050} {0 5950} {0 5900} {-100 5800}
# boundary 1 2 {0 6200} {-100 6300} {-100 6350} {0 6450} {0 6200}
# boundary 1 2 {-100 6600} {-100 6750} {0 6850} {0 6700} {-100 6600}
# boundary 1 2 {0 7000} {-100 7100} {-100 7250} {0 7150} {0 7000}
# boundary 1 2 {-100 7400} {-100 7650} {150 7400} {-100 7400}
# boundary 1 2 {-100 7800} {-100 8050} {150 8050} {-100 7800}
# boundary 1 2 {-100 8200} {150 8450} {150 8200} {-100 8200}
# boundary 1 2 {150 8600} {-100 8850} {150 8850} {150 8600}
# boundary 1 2 {-100 9000} {0 9100} {100 9000} {-100 9000}
# boundary 1 2 {0 9400} {-100 9500} {100 9500} {0 9400}
# boundary 1 2 {-100 9800} {-100 10000} {0 9900} {-100 9800}
# boundary 1 2 {0 10200} {-100 10300} {0 10400} {0 10200}
# boundary 1 2 {-100 10600} {-100 10700} {150 10700} {150 10600} {-100 10600}
# boundary 1 2 {-100 11000} {-100 11250} {150 11250} {150 11000} {-100 11000}
# boundary 2 3 {-100 11400} {-100 11650} {150 11650} {150 11400} {-100 11400}
# boundary 2 3 {300 11400} {300 11650} {550 11650} {550 11400} {300 11400}
# boundary 2 3 {700 11400} {700 11650} {950 11650} {950 11400} {700 11400}
# boundary 2 3 {-100 11700} {-100 11950} {150 11950} {150 11700} {-100 11700}
# boundary 2 3 {300 11700} {300 11950} {550 11950} {550 11700} {300 11700}
# boundary 2 3 {700 11700} {700 11950} {950 11950} {950 11700} {700 11700}
# boundary 2 3 {-100 12000} {-100 12250} {150 12250} {150 12000} {-100 12000}
# boundary 2 3 {300 12000} {300 12250} {550 12250} {550 12000} {300 12000}
# boundary 2 3 {700 12000} {700 12250} {950 12250} {950 12000} {700 12000}
# boundary 2 3 {-100 12300} {-100 12550} {150 12550} {150 12300} {-100 12300}
# boundary 2 3 {300 12300} {300 12550} {550 12550} {550 12300} {300 12300}
# boundary 2 3 {700 12300} {700 12550} {950 12550} {950 12300} {700 12300}
# box 2 3 {-100 600} {0 600}
# box 2 3 {-100 1000} {150 1100}
# box 2 3 {-100 1400} {150 1500}
# box 2 3 {-100 1800} {150 1900}
# box 2 3 {-100 2200} {150 2300}
# box 2 3 {-100 2600} {150 2700}
# box 2 3 {-100 3000} {150 3100}
# box 2 3 {-100 3400} {150 3500}
# box 2 3 {-100 3800} {150 3900}
# box 2 3 {-100 4200} {0 4450}
# box 2 3 {-100 4600} {0 4850}
# box 2 3 {-100 5000} {0 5250}
# box 2 3 {-100 5400} {0 5650}
# box 2 3 {-100 5800} {0 6050}
# box 2 3 {-100 6200} {0 6450}
# box 2 3 {-100 6600} {0 6850}
# box 2 3 {-100 7000} {0 7250}
# box 2 3 {-100 7400} {150 7650}
# box 2 3 {-100 7800} {150 8050}
# box 2 3 {-100 8200} {150 8450}
# box 2 3 {-100 8600} {150 8850}
# box 2 3 {-100 9000} {100 9100}
# box 2 3 {-100 9400} {100 9500}
# box 2 3 {-100 9800} {0 10000}
# box 2 3 {-100 10200} {0 10400}
# box 2 3 {-100 10600} {150 10700}
# box 2 3 {-100 11000} {150 11250}
# end_cell
# end_lib
# </content>
# </test>
header
real 0 1000.0
uint 0 ;# offset table is in start record
for { set i 0 } { $i < 12 } { incr i } { uint 0 }
# Cell A
record CELL_STR
str A
record CTRAPEZOID
bits 11111011 ;# TWHXYRDL
uint 1 ;# layer
uint 2 ;# datatype
uint 24 ;# type
uint 100 ;# width
uint 200 ;# height
int -100 ;# geometry-x (absolute)
int 200 ;# geometry-y (absolute)
record XYRELATIVE
record CTRAPEZOID
bits 00001000 ;# TWHXYRDL
int 400 ;# geometry-y (relative)
record RECTANGLE
bits 00000011 ;# SWHXYRDL
uint 2 ;# layer
uint 3 ;# datatype
set h [ list 250 100 ]
set v [ list 100 250 ]
set wh [ list $h $h $h $h $h $h $h $h \
$v $v $v $v $v $v $v $v \
$h $h $h $h $h $h $v $v \
$h $h ]
set wh_en [ list "11" "11" "11" "11" "11" "11" "11" "11" \
"11" "11" "11" "11" "11" "11" "11" "11" \
"10" "10" "10" "10" "01" "01" "10" "10" \
"11" "10" ]
for { set t 0 } { $t < 26 } { incr t } {
set x [ lindex $wh $t ]
set x_en [ lindex $wh_en $t ]
record CTRAPEZOID
bits "1${x_en}01011" ;# TWHXYRDL
uint 1 ;# layer
uint 2 ;# datatype
uint $t ;# type
if { $x_en == "10" || $x_en == "11" } {
uint [ lindex $x 0 ] ;# width
}
if { $x_en == "01" || $x_en == "11" } {
uint [ lindex $x 1 ] ;# height
}
int 400 ;# geometry-y (relative)
record RECTANGLE
bits 00000011 ;# SWHXYRDL
uint 2 ;# layer
uint 3 ;# datatype
}
record CTRAPEZOID
bits 00001100 ;# TWHXYRDL
int 400 ;# geometry-y (relative)
uint 1 ;# repetition (3x4 matrix)
uint 1
uint 2
uint 400
uint 300
tail