@@ -112,9 +112,11 @@ def build_tech(layer_count, name=None, width=None):
112
112
layeridx = n + 1
113
113
114
114
metal_name = f"metal{ layeridx } "
115
+ max_width = 5.0
115
116
if layeridx == layer_count :
116
117
metal_name = "topmetal"
117
118
gds_layer = 100
119
+ max_width = None
118
120
119
121
layers .append (
120
122
make_metal_layer (
@@ -134,12 +136,12 @@ def build_tech(layer_count, name=None, width=None):
134
136
"TEXT" : 20
135
137
}
136
138
},
137
- "HORIZONTAL" if layeridx % 2 == 1 else "VERITCAL " ,
139
+ "HORIZONTAL" if layeridx % 2 == 1 else "VERTICAL " ,
138
140
min_width = width [n ],
139
141
min_spacing = width [n ],
140
142
resistance_per_um = 1.5000e-03 ,
141
143
capacitance_per_um = 1.0000E-01 ,
142
- max_width = 5.0
144
+ max_width = max_width
143
145
))
144
146
145
147
if layeridx != layer_count :
@@ -175,7 +177,8 @@ def build_tech(layer_count, name=None, width=None):
175
177
tech = {
176
178
"name" : name ,
177
179
"grid" : 0.005 ,
178
- "layers" : layers
180
+ "layers" : layers ,
181
+ "outline" : (0 , 0 )
179
182
}
180
183
181
184
return tech
@@ -203,6 +206,13 @@ def build_layermap(tech, path):
203
206
str (gds_type )
204
207
))
205
208
209
+ layermap .append ((
210
+ "DIEAREA" ,
211
+ "ALL" ,
212
+ str (tech ["outline" ][0 ]),
213
+ str (tech ["outline" ][1 ])
214
+ ))
215
+
206
216
os .makedirs (path , exist_ok = True )
207
217
with open (f'{ path } /{ tech ["name" ]} .layermap' , 'w' ) as f :
208
218
f .write (
@@ -294,7 +304,8 @@ def build_klayout_drc(tech, path):
294
304
jinja2_env .get_template ('drc.j2' ).render (
295
305
license = LICENSE ,
296
306
grid = int (tech ["grid" ] * 1000 ),
297
- layers = layers
307
+ layers = layers ,
308
+ outline = {"number" : tech ["outline" ][0 ], "type" : tech ["outline" ][1 ]}
298
309
)
299
310
)
300
311
f .write ('\n ' )
@@ -358,6 +369,8 @@ def make_layer(name, gds):
358
369
return prop
359
370
360
371
props = ET .Element ("layer-properties" )
372
+ props .append (make_layer ("outline" , (tech ["outline" ][0 ], tech ["outline" ][1 ])))
373
+ layeridx += 1
361
374
for layer in tech ["layers" ]:
362
375
gds_types = sorted (set ([* layer ["gds" ]["types" ].values (), * layer ["gds" ]["name" ].values ()]))
363
376
for gds_type in gds_types :
@@ -436,8 +449,12 @@ def build_openroad_fill(tech, path):
436
449
shapes .append (width )
437
450
438
451
fill ["layers" ][layer ["name" ]] = {
452
+ "name" : layer ["name" ],
453
+ "layer" : layer ["gds" ]["number" ],
454
+ "datatype" : layer ["gds" ]["types" ]["NET" ],
439
455
"space_to_outline" : max_spacing ,
440
456
"non-opc" : {
457
+ "datatype" : layer ["gds" ]["types" ]["FILL" ],
441
458
"width" : shapes ,
442
459
"height" : shapes ,
443
460
"space_to_fill" : layer ["spacing" ]["min" ],
0 commit comments