procedure( make_slot(metal_id sw nw ne se) leChopShape(metal_id list(sw nw ne se sw) t t ) ) ; end proc make_slot ; ------------------------------------ ; user-specified parameters ; ------------------------------------ metal_layer = "METAL1" metal_width = 600.0 metal_length = 300.0 mycell_id = deGetCellView() ; ------------------------------------------- ; calculate how many slots can be chopped out ; ------------------------------------------- slot_length = 5.0 slot_width = 20.0 spacing_hori = slot_width + 10.0 spacing_vert = slot_length + 10.0 slot_cols = fix( metal_width / spacing_hori ) slot_rows = fix( metal_length / spacing_vert ) ; ------------------------------------ ; create long and wide metal line ; ------------------------------------ met = rodCreateRect( ?cvId mycell_id ?layer metal_layer ?width metal_width ?length metal_length ?returnBoolean nil ) shape_id = met~>dbId ; ------------------------------------------- ; coordinates of 1st slot, southwest corner ; ------------------------------------------- orig_x = 10.0 orig_y = 10.0 ; ------------------------------------ ; create slots, 1 column at a time ; ------------------------------------ for( this_col 1 slot_cols let((sw_x ne_x) sw_x = orig_x + (this_col - 1) * spacing_hori ne_x = sw_x + slot_width for( this_row 1 slot_rows let((sw_y ne_y sw nw ne se (chop_abort 0) ) sw_y = orig_y + (this_row-1) * spacing_vert ne_y = sw_y + slot_length ; formulate coordinates ; sw = sw_x : sw_y nw = sw_x : ne_y ne = ne_x : ne_y se = ne_x : sw_y ; check last slot is within metal shape when(ne_x >= metal_width || ne_y >= metal_length chop_abort = 1 this_row = slot_rows this_col = slot_cols ) ; chop out slot when(chop_abort != 1 make_slot(shape_id sw nw ne se) ) ) ; end this_row for let ) ; end this_row for ) ; end this_col for let ) ; end this_col for