function nwc(row : integer, col : integer), QUICK_HELP "Place an n-well contact." { local pos = $get_ic_location(@snap); local x = pos[0]; local y = pos[1]; local l_siz_ACT = (row*2) + (row*4) - 1; local b_siz_ACT = (col*2) + (col*4) - 1; local x_sizA = b_siz_ACT/2; local y_sizA = l_siz_ACT/2; local l_NPS = (row*2) + ((row+1)*4) - 1; local b_NPS = (col*2) + ((col+1)*4) - 1; local x_NPS = b_NPS/2; local y_NPS = l_NPS/2; local con_x = x - (x_sizA - 2.5); local con_y = y - (y_sizA - 2.5); local i = 1; local j = 1; $$select_all(); $$protect(); if( $get_env("ADK_TECH") == "tsmc018" ){ $$add_shape([[x-x_sizA,y+y_sizA],[x+x_sizA,y-y_sizA]],"ACTIVE",@internal,@nokeep); $$add_shape([[x-x_NPS,y+y_NPS],[x+x_NPS,y-y_NPS]],"N_PLUS_SELECT",@internal,@nokeep); $$add_shape([[x-x_NPS-1,y+y_NPS+1],[x+x_NPS+1,y-y_NPS]],"N_WELL",@internal,@nokeep); for (i=1;i<=row;i=i+1) { for (j=1;j<=col;j=j+1) { $$add_shape([[con_x-1,con_y+1],[con_x+1,con_y-1]],"CONTACT_TO_ACTIVE",@internal,@nokeep); con_x = con_x + 6.0; } con_y = con_y + 6.0; con_x = x - (x_sizA - 2.5); } } $$select_all(); $$move(); $$unprotect_all(); $$unselect_all(); } function pwc(row : integer,col : integer), QUICK_HELP "Place an p-well contact." { local pos = $get_ic_location(@snap); local x = pos[0]; local y = pos[1]; local l_siz_ACT = (row*2) + (row*4) - 1; local b_siz_ACT = (col*2) + (col*4) - 1; local x_sizA = b_siz_ACT/2; local y_sizA = l_siz_ACT/2; local l_NPS = (row*2) + ((row+1)*4) - 1; local b_NPS = (col*2) + ((col+1)*4) - 1; local x_NPS = b_NPS/2; local y_NPS = l_NPS/2; local con_x = x - (x_sizA - 2.5); local con_y = y - (y_sizA - 2.5); local i = 1; local j = 1; $$select_all(); $$protect(); if( $get_env("ADK_TECH") == "tsmc018" ){ $$add_shape([[x-x_sizA,y+y_sizA],[x+x_sizA,y-y_sizA]],"ACTIVE",@internal,@nokeep); $$add_shape([[x-x_NPS,y+y_NPS],[x+x_NPS,y-y_NPS]],"P_PLUS_SELECT",@internal,@nokeep); $$add_shape([[x-x_NPS-1,y+y_NPS],[x+x_NPS+1,y-y_NPS-1]],"P_WELL",@internal,@nokeep); for (i=1;i<=row;i=i+1) { for (j=1;j<=col;j=j+1) { $$add_shape([[con_x-1,con_y+1],[con_x+1,con_y-1]],"CONTACT_TO_ACTIVE",@internal,@nokeep); con_x = con_x + 6.0; } con_y = con_y + 6.0; con_x = x - (x_sizA - 2.5); } } $$select_all(); $$move(); $$unprotect_all(); $$unselect_all(); } function pc(), QUICK_HELP "Place a poly contact" { local pos; local x; local y; pos = $get_ic_location(@snap); x = pos[0]; y = pos[1]; $$select_all(); $$protect(); if( $get_env("ADK_TECH") == "tsmc018" ){ local pos = $get_ic_location(@snap); local x = pos[0]; local y = pos[1]; $add_shape([[x-2, y+2], [x+2, y-2]], "METAL1", @internal, @nokeep); $add_shape([[x-1, y+1], [x+1, y-1]], "CONTACT_TO_POLY", @internal, @nokeep); $add_shape([[x-2.5, y+2.5], [x+2.5, y-2.5]], "POLY", @internal, @nokeep); } $$select_all(); $$move(); $$unprotect_all(); $$unselect_all(); // } // end of pc function pp(), QUICK_HELP "Place a port contact" { local pos; local x; local y; pos = $get_ic_location(@snap); x = pos[0]; y = pos[1]; if( $get_env("ADK_TECH") == "ami12" ){ $add_cell("$ADK/technology/ic/process/ami12_via/via"); $unselect_all(); $add_shape([[x-2, y+2], [x+2, y-2]], "METAL3_BLKG", @both, @nokeep); } else if( $get_env("ADK_TECH") == "tsmc035" ){ $add_cell("$ADK/technology/ic/process/tsmc035_via/via"); } else if( $get_env("ADK_TECH") == "tsmc025" ){ $add_cell("$ADK/technology/ic/process/tsmc025_via/via"); } else if( $get_env("ADK_TECH") == "tsmc018" ){ $add_cell("$ADK/technology/ic/process/tsmc025_via/via"); } else{ $add_cell("$ADK/technology/ic/process/ami05_via/via"); $unselect_all(); $add_shape([[x-2, y+2], [x+2, y-2]], "METAL3_BLKG", @both, @nokeep); } $unselect_all(); } // end of pp function pr(), QUICK_HELP "Place the power rails for a standard cell." { $unselect_all(); $add_shape([[0, 10], [25, 0]], "METAL1", @both, @nokeep); $activate_net("/GND",@net_name); $add_to_net(); $make_port(@power, @in, "GND"); $deactivate(); $unselect_all(); $add_shape([[0, 120], [25, 110]], "METAL1", @both, @nokeep); $activate_net("/VDD",@net_name); $add_to_net(); $make_port(@power, @in, "VDD"); $deactivate(); $add_shape([[0, 120], [25, 95]], "NWELL", @internal, @nokeep); $add_shape([[0, 0], [25, 20]], "PWELL", @internal, @nokeep); $unselect_all(); $view_all(); } // end of pr //function nwc(), // QUICK_HELP "Place an n-well contact." //{ // local cell_info = $get_cell_info(); // local process = cell_info[13]; // // if ($string_locate(process,"ami05",0) != @UNDEFINED) { // $add_cell("$ADK/technology/ic/process/ami05_via/nwell_contact"); // } else if ($string_locate(process,"tsmc018",0) != @DEFINED) { // $add_cell("$ADK/technology/ic/process/ami12_via/nwell_contact"); // } //} // end of nwc //function pwc(), // QUICK_HELP "Place a p-well contact." //{ // local cell_info = $get_cell_info(); // local process = cell_info[13]; // // if ($string_locate(process,"ami05",0) != @UNDEFINED) { // $add_cell("$ADK/technology/ic/process/ami05_via/pwell_contact"); // } else if ($string_locate(process,"tsmc018",0) != @DEFINED) { // $add_cell("$ADK/technology/ic/process/ami12_via/pwell_contact"); // } //} // end of nwc function pfp(), QUICK_HELP "Place an fp1 layer around the entire cell extent." { local cell_info = $get_cell_info(); local extent = cell_info[1]; $add_shape(extent,"fp1",@both,@nokeep); } // end of pfp function p(), QUICK_HELP "Place poly path of width 2." { $add_path(, "poly", @internal, 2, @center, @normal, @nokeep, @nopad); } function m(), QUICK_HELP "Place metal path of width 3." { $add_path(, "metal1", @internal, 3, @center, @normal, @nokeep, @nopad); } function v(), QUICK_HELP "Move unconstrained." { $move(,,@any,@selected); } //function ec5(), // QUICK_HELP //"Extract Cell: \n\ // Lumped extraction for AMI 0.5 micron characterization. (dev only)" //{ // local cell_info = $get_cell_info(); // local name = //$strcat(cell_info[0],".sp"); // // $load_rules("$ADK/technology/ic/process/ami05.rules"); // $acquire_license(@ictrace); // $extract_mask_lumped_parameters(@false, @true, "", @false, "", "", @true, //"icap_net", @false, "res_net", @false, "cpl_cap_net", "", "", @eddm, "lvs.rep", //"maskdb", @true, @true, @false, @true, name, @hspice, @lumped, @layout, @false, //@false, "GND", @false, @false, @false, 0, @true, @false); // $release_license(@ictrace); //} //function ec12(), // QUICK_HELP //"Extract Cell: \n\ // Lumped extraction for AMI 1.2 micron characterization. (dev only)" //{ // local cell_info = $get_cell_info(); // local name = //$strcat(cell_info[0],".sp"); // // $load_rules("$ADK/technology/ic/process/ami12.rules"); // $acquire_license(@ictrace); // $extract_mask_lumped_parameters(@false, @true, "", @false, "", "", @true, //"icap_net", @false, "res_net", @false, "cpl_cap_net", "", "", @eddm, "lvs.rep", //"maskdb", @true, @true, @false, @true, name, @hspice, @lumped, @layout, @false, //@false, "GND", @false, @false, @false, 0, @true, @false); //$load_rules("$ADK/technology/ic/ami05.rules"); // $release_license(@ictrace); //} //function ec35(), // QUICK_HELP //"Extract Cell: \n\ // Lumped extraction for TSMC 0.35 micron characterization. (dev only)" //{ // local cell_info = $get_cell_info(); // local name = //$strcat(cell_info[0],".sp"); // // $load_rules("$ADK/technology/ic/process/tsmc035.rules"); // $acquire_license(@ictrace); // $extract_mask_lumped_parameters(@false, @true, "", @false, "", "", @true, //"icap_net", @false, "res_net", @false, "cpl_cap_net", "", "", @eddm, "lvs.rep", //"maskdb", @true, @true, @false, @true, name, @hspice, @lumped, @layout, @false, //@false, "GND", @false, @false, @false, 0, @true, @false); // $release_license(@ictrace); //} function add_lib(library : string, path : string) { local line, stream_id; local filename = "/tmp/cell.list" ; local command = $strcat("ls ", path,"/*.attr* | nawk -F'.' '{print $1}' > ", filename); $message(command); $system(command); stream_id = $open_file($free_stream_id(),filename,@read); $freeze_window(); line = $reads_file(stream_id); while ((! $eof(stream_id)) && (line != UNDEFINED)) { $add_to_library(library, line); line = $reads_file(stream_id); } $unfreeze_window(); command = $strcat("rm -f ", filename); $system(command); } // end of add_lib function ab1(), QUICK_HELP "Add metal 1 blockages to entire cell." { $setup_select_filter([@shape, @path, @pin], @both, [@in], @true, @true, @true); $unselect_all(@nofilter); $set_visible_layers(@replace, ["METAL1"]); $select_all(void); $copy_to_layer("METAL1_BLKG"); $change_aspect(@both); $unselect_all(@nofilter); $set_visible_layers(@replace, ["COMMENT", "METAL1.PORT", "METAL2.PORT", "METAL3.PORT", "ANALOG", "BB_PAD", "MARKER", "METAL4.PORT", "METAL5.PORT", "P_HIGH_VOLTAGE", "N_HIGH_VOLTAGE", "MEMS_OPEN", "MEMS_ETCH_STOP", "CONTACT", "PADS", "SILICIDE_BLOCK", "\ VIA3", "METAL4", "VIA4", "METAL5", "HI_RES_IMPLANT", "P_WELL", "N_WELL", "ACTIVE", "P_PLUS_SELECT", "N_PLUS_SELECT", "POLY", "CONTACT_TO_POLY", "CONTACT_TO_ACTIVE", "METAL1", "VIA", "METAL2", "OVERGLASS", "CONTACT_TO_ELECTRODE", "ELECTRODE", "BURIED_CCD",\ "PBASE", "CAP_WELL", "Thick_Active", "VIA2", "METAL3", "DIFFUSED_RESISTOR", "METAL1_BLKG", "METAL2_BLKG", "METAL3_BLKG", "METAL4_BLKG", "METAL5_BLKG", "row", "drc_results", "masklv_results", "overflow", "device_iobj", "flyline", "fp1", "active_overflow",\ "outline", "gds_anchor", "gds_error", "translate_text", "power_strap", "cell_inst_name", "port_pin_name", "path_ref_line", "array_bb", "inst_bb", "fixed_bb", "sticky_overflow", "active_sticky_overflow", "region", "bisector", "channel", "slice", "eco_rout\ ing_layer_1", "eco_routing_layer_2", "eco_routing_layer_3", "eco_routing_layer_4", "eco_routing_layer_5", "non_routing_overflow", "active_non_routing_overflow", "routing_level_2", "routing_level_1", "power_layers"]); $unselect_all(@nofilter); $setup_select_filter([@shape, @path, @text, @property_text, @instance, @device, @array, @pin, @row, @via_object, @overflow, @region, @bisector, @slice, @channel], @both, [@in], @true, @true, @true); local cell_info = $get_cell_info(); local extent = cell_info[1]; $add_shape(extent,"METAL1_BLKG",@both,@nokeep); $redraw(); } // end of ab1 function rab1(), QUICK_HELP "Remove metal 1 blockages from entire cell." { $setup_select_filter([@shape, @path, @pin], @both, [@in], @true, @true, @true); $unselect_all(@nofilter); $set_visible_layers(@replace, ["METAL1_BLKG"]); $select_all(void); $delete(); $unselect_all(@nofilter); $set_visible_layers(@replace, ["COMMENT", "METAL1.PORT", "METAL2.PORT", "METAL3.PORT", "ANALOG", "BB_PAD", "MARKER", "METAL4.PORT", "METAL5.PORT", "P_HIGH_VOLTAGE", "N_HIGH_VOLTAGE", "MEMS_OPEN", "MEMS_ETCH_STOP", "CONTACT", "PADS", "SILICIDE_BLOCK", "\ VIA3", "METAL4", "VIA4", "METAL5", "HI_RES_IMPLANT", "P_WELL", "N_WELL", "ACTIVE", "P_PLUS_SELECT", "N_PLUS_SELECT", "POLY", "CONTACT_TO_POLY", "CONTACT_TO_ACTIVE", "METAL1", "VIA", "METAL2", "OVERGLASS", "CONTACT_TO_ELECTRODE", "ELECTRODE", "BURIED_CCD",\ "PBASE", "CAP_WELL", "Thick_Active", "VIA2", "METAL3", "DIFFUSED_RESISTOR", "METAL1_BLKG", "METAL2_BLKG", "METAL3_BLKG", "METAL4_BLKG", "METAL5_BLKG", "row", "drc_results", "masklv_results", "overflow", "device_iobj", "flyline", "fp1", "active_overflow",\ "outline", "gds_anchor", "gds_error", "translate_text", "power_strap", "cell_inst_name", "port_pin_name", "path_ref_line", "array_bb", "inst_bb", "fixed_bb", "sticky_overflow", "active_sticky_overflow", "region", "bisector", "channel", "slice", "eco_rout\ ing_layer_1", "eco_routing_layer_2", "eco_routing_layer_3", "eco_routing_layer_4", "eco_routing_layer_5", "non_routing_overflow", "active_non_routing_overflow", "routing_level_2", "routing_level_1", "power_layers"]); $unselect_all(@nofilter); $setup_select_filter([@shape, @path, @text, @property_text, @instance, @device, @array, @pin, @row, @via_object, @overflow, @region, @bisector, @slice, @channel], @both, [@in], @true, @true, @true); $redraw(); } // end of rab1 function s12(), QUICK_HELP "Set process ami120." { $load_rules("$ADK/technology/ic/process/ami12.rules"); $set_cell_process("$ADK/technology/ic/process/ami12", @context); } // end of s12 function s5(), QUICK_HELP "Set process ami05." { $load_rules("$ADK/technology/ic/process/ami05.rules"); $set_cell_process("$ADK/technology/ic/process/ami05", @context); } // end of s5 function s35(), QUICK_HELP "Set process tsmc035." { $load_rules("$ADK/technology/ic/process/tsmc035.rules"); $set_cell_process("$ADK/technology/ic/process/tsmc035", @context); } // end of s35 //function eps_out(), // QUICK_HELP "Quick exatract of color eps file." //{ // local cell_info = $get_cell_info(); // local name = $strcat(cell_info[0],".eps"); // $ge_select_export_format(0); // $export_graphic_object("", name, "3.0inches", "2.0inches", "", @color_yes, //"0", "", @true, [], "EPS (Encapsulated PostScript)"); //} //function eps_out35(), // QUICK_HELP "Quick exatract of color eps file for tsmc035 cells." //{ // local cell_info = $get_cell_info(); // local name = $strcat(cell_info[0],".eps"); // $ge_select_export_format(0); // $export_graphic_object("", name, "3.0inches", "2.0inches", "", @color_yes, //"0", "", @true, [], "EPS (Encapsulated PostScript)"); //} //function eps_out25(), // QUICK_HELP "Quick exatract of color eps file for tsmc025 cells." //{ // local cell_info = $get_cell_info(); // local name = $strcat(cell_info[0],".eps"); // $ge_select_export_format(0); // $export_graphic_object("", name, "3.0inches", "2.0inches", "", @color_yes, //"0", "", @true, [], "EPS (Encapsulated PostScript)"); //} //function eps_out18(), // QUICK_HELP "Quick exatract of color eps file for tsmc018 cells." //{ // local cell_info = $get_cell_info(); // local name = $strcat(cell_info[0],".eps"); // $ge_select_export_format(0); // $export_graphic_object("", name, "3.0inches", "2.0inches", "", @color_yes, //"0", "", @true, [], "EPS (Encapsulated PostScript)"); //} function vfy(), QUICK_HELP "Quick LVS check for ADK development." { local cell_info = $get_cell_info(); local name = $strcat("$ADK/parts/",cell_info[0],"/sdl"); $acquire_license(@ictrace); $lvs_mask(@true, @true, name, "", @eddm, "lvs.rep", "maskdb", @true, @true); $$open_notepad("lvs.rep", @read_only, ""); $set_active_window("Notepad"); $set_active_window("Notepad"); } function cp(), QUICK_HELP "Quick save and reserve; checkpoint." { $save_cell(@context); $reserve_cell(@nohierarchy); } function dup(), QUICK_HELP "Delete unplaced ports in design" { local porthandle=$get_group_members("ports"); local len=length(porthandle); local index; for (index=0;index= 0)) { // Good, we're a pin so let's get the pin number so we know where to put it // in the frame. local pin_no = $number_string(pin_name[pos+3:length(pin_name)-1]); // Select this pin, only, in the schematic to use $place select_schematic_instance(pin_name); switch (pin_no) { // Check the pin number and then place the selected object at the correct place in the frame case 1,2,3,4,5 : $place_on_row(origin+[4000,2500+(pin_no*300)]); break; case 36,37,38,39,40 : $place_on_row(origin+[4000,2500-(40-pin_no)*300]); break; case 26,27,28,29,30,31,32,33,34,35 : $place_on_row(origin+[1000+(pin_no-25)*300,1000]); break; case 16,17,18,19,20,21,22,23,24,25 : $place_on_row(origin+[1000,1000+(25-pin_no)*300]); break; case 15,14,13,12,11,10,9,8,7,6 : $place_on_row(origin+[1000+(15-pin_no)*300,4000]); } placed_pins[pin_no-1] = "placed"; // add this pin to the list of pins placed } } // now we need to place spacers for all the unplaced pins local spacer = "$ADK/technology/ic/pads/ami05/pads/PadSpace"; for (pin=1; pin <= 40; pin = pin + 1) { if (placed_pins[pin-1] != "placed") { switch (pin) { case 1,2,3,4,5 : $add_cell(spacer,origin); $move_on_row(origin, origin+[4000,2500+(pin*300)], @any, @selected); break; case 36,37,38,39,40 : $add_cell(spacer,origin); $move_on_row(origin, origin+[4000,2500-(40-pin)*300]); break; case 26,27,28,29,30,31,32,33,34,35 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1000+(pin-25)*300,1000]);break; case 16,17,18,19,20,21,22,23,24,25 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1000,1000+(25-pin)*300]);break; case 15,14,13,12,11,10,9,8,7,6 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1000+(15-pin)*300,4000]); } } } } function make_tsmc035_miniframe(), QUICK_HELP "Build a TinyChip padframe for TSMC 0.35 micron" { // First, let's put the origin at the lower left corner of the cell extent. local cell_info = $get_cell_info(); local extent = cell_info[1]; local origin = extent[0] - [1700,1700]; local i; local pin; // Place floorplan for external cells (non-corner pads): $add_row(9, [origin+[1500,1500],origin+[1500,5999]],[@rotate_ccw], @left, @noslide, @noresize, @nokeep); //left $add_row(9, [origin+[1500,5999],origin+[6000,5999]],[@normal], @left, @noslide, @noresize, @nokeep); //top $add_row(9, [origin+[6000,6000],origin+[6000,1501]],[@rotate_mirror_xy], @left, @noslide, @noresize, @nokeep); //right $add_row(9, [origin+[1500,1500],origin+[6000,1500]],[@mirror_xy], @left, @noslide, @noresize, @nokeep); //bottom // place corners: $add_cell("$ADK/technology/ic/pads/tsmc035/pads/PadlessCorner",origin+[1500,1500],@noflip,90); $add_cell("$ADK/technology/ic/pads/tsmc035/pads/PadlessCorner",origin+[6000,1500],@noflip,180); $add_cell("$ADK/technology/ic/pads/tsmc035/pads/PadlessCorner",origin+[1500,5999],@noflip,0); $add_cell("$ADK/technology/ic/pads/tsmc035/pads/PadlessCorner",origin+[6000,5999],@noflip,270); $unselect_all(); // Select the pins that are in the design but are unplaced $select_unplaced_schematic_instances(); local num_pins = $get_select_count(); local pins = $get_select_set(); local placed_pins = $create_vector(40); // list of pins we did place $unselect_all(); for (pin=0; pin < num_pins; pin = pin + 1) { local this_pin_handle = pins[pin]; local pin_name = $get_object_info(this_pin_handle)[3]; local pos = $string_locate(pin_name, "PIN", 0); // If this has "PIN" in it, it's a pin, otherwise it's probably a cell or port and we don't // want to place them in the padframe! if ((pos != UNDEFINED) &&( pos >= 0)) { // Good, we're a pin so let's get the pin number so we know where to put it // in the frame. local pin_no = $number_string(pin_name[pos+3:length(pin_name)-1]); // Select this pin, only, in the schematic to use $place select_schematic_instance(pin_name); switch (pin_no) { // Check the pin number and then place the selected object at the correct place in the frame case 1,2,3,4,5 : $place_on_row(origin+[6000,3750+(pin_no*450)]); break; case 36,37,38,39,40 : $place_on_row(origin+[6000,3750-(40-pin_no)*450]); break; case 26,27,28,29,30,31,32,33,34,35 : $place_on_row(origin+[1500+(pin_no-25)*450,1500]); break; case 16,17,18,19,20,21,22,23,24,25 : $place_on_row(origin+[1500,1500+(25-pin_no)*450]); break; case 15,14,13,12,11,10,9,8,7,6 : $place_on_row(origin+[1500+(15-pin_no)*450,6000]); } placed_pins[pin_no-1] = "placed"; // add this pin to the list of pins placed } } // now we need to place spacers for all the unplaced pins local spacer = "$ADK/technology/ic/pads/tsmc035/pads/PadNoConnect"; for (pin=1; pin <= 40; pin = pin + 1) { if (placed_pins[pin-1] != "placed") { switch (pin) { case 1,2,3,4,5 : $add_cell(spacer,origin); $move_on_row(origin, origin+[6000,3750+(pin*450)], @any, @selected); break; case 36,37,38,39,40 : $add_cell(spacer,origin); $move_on_row(origin, origin+[6000,3750-(40-pin)*450]); break; case 26,27,28,29,30,31,32,33,34,35 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1500+(pin-25)*450,1500]);break; case 16,17,18,19,20,21,22,23,24,25 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1500,1500+(25-pin)*450]);break; case 15,14,13,12,11,10,9,8,7,6 : $add_cell(spacer,origin); $move_on_row(origin, origin+[1500+(15-pin)*450,6000]); } } } } function make_ami12_miniframe(), QUICK_HELP "Build a TinyChip padframe for AMI 1.2/1.6 micron" { // First, let's put the origin at the lower left corner of the cell extent. local cell_info = $get_cell_info(); local extent = cell_info[1]; local origin = extent[0] - [400,400]; local i; local pin; // Place floorplan for external cells (non-corner pads): $add_row(9, [origin+[325,325],origin+[325,2910]],[@rotate_ccw], @left, @noslide, @noresize, @nokeep); //left $add_row(9, [origin+[325,2915],origin+[2900,2915]],[@normal], @left, @noslide, @noresize, @nokeep); //top $add_row(9, [origin+[2910,2910],origin+[2910,325]],[@rotate_mirror_xy], @left, @noslide, @noresize, @nokeep); //right $add_row(9, [origin+[335,320],origin+[2900,320]],[@mirror_xy], @left, @noslide, @noresize, @nokeep); //bottom // place corners: $add_cell("$ADK/technology/ic/pads/ami120/analog/cg",origin+[335,335],@noflip,0); $add_cell("$ADK/technology/ic/pads/ami120/analog/cg_r",origin+[2900,335],@noflip,0); $add_cell("$ADK/technology/ic/pads/ami120/analog/cv",origin+[335,2900],@noflip,0); $add_cell("$ADK/technology/ic/pads/ami120/analog/cv_r",origin+[2900,2900],@noflip,0); $unselect_all(); // Select the pins that are in the design but are unplaced $select_unplaced_schematic_instances(); local num_pins = $get_select_count(); local pins = $get_select_set(); local placed_pins = $create_vector(40); // list of pins we did place $unselect_all(); for (pin=0; pin < num_pins; pin = pin + 1) { local this_pin_handle = pins[pin]; local pin_name = $get_object_info(this_pin_handle)[3]; local pos = $string_locate(pin_name, "PIN", 0); // If this has "PIN" in it, it's a pin, otherwise it's probably a cell or port and we don't // want to place them in the padframe! if ((pos != UNDEFINED) &&( pos >= 0)) { // Good, we're a pin so let's get the pin number so we know where to put it // in the frame. local pin_no = $number_string(pin_name[pos+3:length(pin_name)-1]); // Select this pin, only, in the schematic to use $place select_schematic_instance(pin_name); switch (pin_no) { // Check the pin number and then place the selected object at the correct place in the frame case 1,3 : $place_on_row(origin+[2910,1760+(pin_no*285)]); break; case 2,4 : $place_on_row(origin+[2910,1760+((pin_no-1)*285)],@horizontal); $flip(@vertical); break; case 37,39 : $place_on_row(origin+[2910,1760-(40-pin_no)*285]); break; case 36,38,40 : $place_on_row(origin+[2910,1760-(41-pin_no)*285],@horizontal); $flip(@vertical); break; case 27,29,31,33 : $place_on_row(origin+[335+(pin_no-25)*285,320]); break; case 26,28,30,32,34 : $place_on_row(origin+[335+(pin_no-26)*285,320],@horizontal); $flip(@horizontal); break; case 17,19,21,23 : $place_on_row(origin+[325,335+(24-pin_no)*285]); break; case 16,18,20,22,24 : $place_on_row(origin+[325,335+(25-pin_no)*285],@horizontal); $flip(@vertical); break; case 13,11,9,7 : $place_on_row(origin+[335+(14-pin_no)*285,2915]); break; case 14,12,10,8,6 : $place_on_row(origin+[335+(15-pin_no)*285,2915],@horizontal,0); $flip(@horizontal); } placed_pins[pin_no-1] = "placed"; // add this pin to the list of pins placed } } // now we need to place spacers for all the unplaced pins local spacer = "$ADK/technology/ic/pads/ami120/analog/analog"; for (pin=1; pin <= 40; pin = pin + 1) { if (placed_pins[pin-1] != "placed") { switch (pin) { case 1,2,3,4 : $add_cell(spacer,origin); $move_on_row(origin, origin+[2910,1760+(pin*285)], @any, @selected); break; case 36,37,38,39,40 : $add_cell(spacer,origin); $move_on_row(origin, origin+[2910,1760-(40-pin)*285]); break; case 26,27,28,29,30,31,32,33,34 : $add_cell(spacer,origin); $move_on_row(origin, origin+[335+(pin-25)*285,320]);break; case 16,17,18,19,20,21,22,23,24 : $add_cell(spacer,origin); $move_on_row(origin, origin+[325,335+(24-pin)*285]);break; case 14,13,12,11,10,9,8,7,6 : $add_cell(spacer,origin); $move_on_row(origin, origin+[335+(14-pin)*285,2915]); } } } }