📄 techeditwizarddata.java
字号:
return true; } private String stripQuotes(String str) { if (str.startsWith("\"") && str.endsWith("\"")) return str.substring(1, str.length()-1); return str; } private int [] makeIntArray(String str) { WizardField [] foundArray = new WizardField[num_metal_layers]; for(int i=0; i<num_metal_layers; i++) foundArray[i] = new WizardField(); fillWizardArray(str, foundArray, num_metal_layers, false); int [] retArray = new int[foundArray.length]; for(int i=0; i<foundArray.length; i++) retArray[i] = (int)foundArray[i].v; return retArray; } private double [] makeDoubleArray(String str) { WizardField [] foundArray = new WizardField[num_metal_layers]; for(int i=0; i<num_metal_layers; i++) foundArray[i] = new WizardField(); fillWizardArray(str, foundArray, num_metal_layers, false); double [] retArray = new double[foundArray.length]; for(int i=0; i<foundArray.length; i++) retArray[i] = foundArray[i].v; return retArray; } private void fillWizardArray(String str, WizardField [] fieldArray, int expectedLength, boolean getRule) { if (!str.startsWith("(")) { Job.getUserInterface().showErrorMessage("Array does not start with '(' on " + str, "Syntax Error In Technology File"); return; } int pos = 1; int index = 0; for(;;) { while (pos < str.length() && str.charAt(pos) == ' ') pos++; if (index >= fieldArray.length) { Job.getUserInterface().showErrorMessage("Invalid metal index: " + index, "Syntax Error In Technology File"); return; } if (getRule) { if (str.charAt(pos) != '"') { Job.getUserInterface().showErrorMessage("Rule element does not start with quote on " + str, "Syntax Error In Technology File"); return; } pos++; int end = pos; while (end < str.length() && str.charAt(end) != '"') end++; if (str.charAt(end) != '"') { Job.getUserInterface().showErrorMessage("Rule element does not end with quote on " + str, "Syntax Error In Technology File"); return; } fieldArray[index++].rule = str.substring(pos, end); pos = end+1; } else { double v = TextUtils.atof(str.substring(pos)); fieldArray[index++].v = v; } while (pos < str.length() && str.charAt(pos) != ',' && str.charAt(pos) != ')') pos++; if (str.charAt(pos) != ',') break; pos++; } } /************************************** EXPORT RAW NUMBERS TO DISK **************************************/ void exportData() { String fileName = OpenFile.chooseOutputFile(FileType.TEXT, "Technology Wizard File", "Technology.txt"); if (fileName == null) return; try { PrintWriter printWriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName))); dumpNumbers(printWriter); printWriter.close(); } catch (IOException e) { System.out.println("Error writing XML file"); return; } } private void dumpNumbers(PrintWriter pw) { pw.println("#### Technology wizard data file"); pw.println("####"); pw.println("#### All dimensions in nanometers."); pw.println(); pw.println("$tech_name = \"" + tech_name + "\";"); pw.println("$tech_description = \"" + tech_description + "\";"); pw.println("$num_metal_layers = " + num_metal_layers + ";"); pw.println("$num_metal_layers = " + num_metal_layers + ";"); pw.println("$pwell_process = " + pWellFlag + ";"); pw.println("$horizontal_transistors = " + horizontalFlag + ";"); pw.println(); pw.println("## stepsize is minimum granularity that will be used as movement grid"); pw.println("## set to manufacturing grid or lowest common denominator with design rules"); pw.println("$stepsize = " + stepsize + ";"); pw.println(); pw.println("###### DIFFUSION RULES #####"); pw.println("$diff_width = " + TextUtils.formatDouble(diff_width.v) + ";"); pw.println("$diff_width_rule = \"" + diff_width.rule + "\";"); pw.println("$diff_poly_overhang = " + TextUtils.formatDouble(diff_poly_overhang.v) + "; # min. diff overhang from gate edge"); pw.println("$diff_poly_overhang_rule = \"" + diff_poly_overhang.rule + "\"; # min. diff overhang from gate edge"); pw.println("$diff_contact_overhang = " + TextUtils.formatDouble(diff_contact_overhang.v) + "; # min. diff overhang contact"); pw.println("$diff_contact_overhang_rule = \"" + diff_contact_overhang.rule + "\"; # min. diff overhang contact"); pw.println("$diff_spacing = " + TextUtils.formatDouble(diff_spacing.v) + ";"); pw.println("$diff_spacing_rule = \"" + diff_spacing.rule + "\";"); pw.println(); pw.println("###### POLY RULES #####"); pw.println("$poly_width = " + TextUtils.formatDouble(poly_width.v) + ";"); pw.println("$poly_width_rule = \"" + poly_width.rule + "\";"); pw.println("$poly_endcap = " + TextUtils.formatDouble(poly_endcap.v) + "; # min. poly gate extension from edge of diffusion"); pw.println("$poly_endcap_rule = \"" + poly_endcap.rule + "\"; # min. poly gate extension from edge of diffusion"); pw.println("$poly_spacing = " + TextUtils.formatDouble(poly_spacing.v) + ";"); pw.println("$poly_spacing_rule = \"" + poly_spacing.rule + "\";"); pw.println("$poly_diff_spacing = " + TextUtils.formatDouble(poly_diff_spacing.v) + "; # min. spacing between poly and diffusion"); pw.println("$poly_diff_spacing_rule = \"" + poly_diff_spacing.rule + "\"; # min. spacing between poly and diffusion"); pw.println(); pw.println("###### GATE RULES #####"); pw.println("$gate_length = " + TextUtils.formatDouble(gate_length.v) + "; # min. transistor gate length"); pw.println("$gate_length_rule = \"" + gate_length.rule + "\"; # min. transistor gate length"); pw.println("$gate_width = " + TextUtils.formatDouble(gate_width.v) + "; # min. transistor gate width"); pw.println("$gate_width_rule = \"" + gate_width.rule + "\"; # min. transistor gate width"); pw.println("$gate_spacing = " + TextUtils.formatDouble(gate_spacing.v) + "; # min. gate to gate spacing on diffusion"); pw.println("$gate_spacing_rule = \"" + gate_spacing.rule + "\"; # min. gate to gate spacing on diffusion"); pw.println("$gate_contact_spacing = " + TextUtils.formatDouble(gate_contact_spacing.v) + "; # min. spacing from gate edge to contact inside diffusion"); pw.println("$gate_contact_spacing_rule = \"" + gate_contact_spacing.rule + "\"; # min. spacing from gate edge to contact inside diffusion"); pw.println(); pw.println("###### CONTACT RULES #####"); pw.println("$contact_size = " + TextUtils.formatDouble(contact_size.v) + ";"); pw.println("$contact_size_rule = \"" + contact_size.rule + "\";"); pw.println("$contact_spacing = " + TextUtils.formatDouble(contact_spacing.v) + ";"); pw.println("$contact_spacing_rule = \"" + contact_spacing.rule + "\";"); pw.println("$contact_array_spacing = " + TextUtils.formatDouble(contact_array_spacing.v) + ";"); pw.println("$contact_array_spacing_rule = \"" + contact_array_spacing.rule + "\";"); pw.println("$contact_metal_overhang_inline_only = " + TextUtils.formatDouble(contact_metal_overhang_inline_only.v) + "; # metal overhang when overhanging contact from two sides only"); pw.println("$contact_metal_overhang_inline_only_rule = \"" + contact_metal_overhang_inline_only.rule + "\"; # metal overhang when overhanging contact from two sides only"); pw.println("$contact_metal_overhang_all_sides = " + TextUtils.formatDouble(contact_metal_overhang_all_sides.v) + "; # metal overhang when surrounding contact"); pw.println("$contact_metal_overhang_all_sides_rule = \"" + contact_metal_overhang_all_sides.rule + "\"; # metal overhang when surrounding contact"); pw.println("$contact_poly_overhang = " + TextUtils.formatDouble(contact_poly_overhang.v) + "; # poly overhang contact"); pw.println("$contact_poly_overhang_rule = \"" + contact_poly_overhang.rule + "\"; # poly overhang contact"); pw.println("$polycon_diff_spacing = " + TextUtils.formatDouble(polycon_diff_spacing.v) + "; # spacing between poly-metal contact edge and diffusion"); pw.println("$polycon_diff_spacing_rule = \"" + polycon_diff_spacing.rule + "\"; # spacing between poly-metal contact edge and diffusion"); pw.println(); pw.println("###### WELL AND IMPLANT RULES #####"); pw.println("$nplus_width = " + TextUtils.formatDouble(nplus_width.v) + ";"); pw.println("$nplus_width_rule = \"" + nplus_width.rule + "\";"); pw.println("$nplus_overhang_diff = " + TextUtils.formatDouble(nplus_overhang_diff.v) + ";"); pw.println("$nplus_overhang_diff_rule = \"" + nplus_overhang_diff.rule + "\";"); pw.println("$nplus_overhang_poly = " + TextUtils.formatDouble(nplus_overhang_poly.v) + ";"); pw.println("$nplus_overhang_poly_rule = \"" + nplus_overhang_poly.rule + "\";"); pw.println("$nplus_spacing = " + TextUtils.formatDouble(nplus_spacing.v) + ";"); pw.println("$nplus_spacing_rule = \"" + nplus_spacing.rule + "\";"); pw.println(); pw.println("$pplus_width = " + TextUtils.formatDouble(pplus_width.v) + ";"); pw.println("$pplus_width_rule = \"" + pplus_width.rule + "\";"); pw.println("$pplus_overhang_diff = " + TextUtils.formatDouble(pplus_overhang_diff.v) + ";"); pw.println("$pplus_overhang_diff_rule = \"" + pplus_overhang_diff.rule + "\";"); pw.println("$pplus_overhang_poly = " + TextUtils.formatDouble(pplus_overhang_poly.v) + ";"); pw.println("$pplus_overhang_poly_rule = \"" + pplus_overhang_poly.rule + "\";"); pw.println("$pplus_spacing = " + TextUtils.formatDouble(pplus_spacing.v) + ";"); pw.println("$pplus_spacing_rule = \"" + pplus_spacing.rule + "\";"); pw.println(); pw.println("$nwell_width = " + TextUtils.formatDouble(nwell_width.v) + ";"); pw.println("$nwell_width_rule = \"" + nwell_width.rule + "\";"); pw.println("$nwell_overhang_diff_p = " + TextUtils.formatDouble(nwell_overhang_diff_p.v) + ";"); pw.println("$nwell_overhang_diff_rule_p = \"" + nwell_overhang_diff_p.rule + "\";"); pw.println("$nwell_overhang_diff_n = " + TextUtils.formatDouble(nwell_overhang_diff_n.v) + ";"); pw.println("$nwell_overhang_diff_rule_n = \"" + nwell_overhang_diff_n.rule + "\";"); pw.println("$nwell_spacing = " + TextUtils.formatDouble(nwell_spacing.v) + ";"); pw.println("$nwell_spacing_rule = \"" + nwell_spacing.rule + "\";"); pw.println(); pw.println("###### METAL RULES #####"); pw.print("@metal_width = ("); for(int i=0; i<num_metal_layers; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(metal_width[i].v)); } pw.println(");"); pw.print("@metal_width_rule = ("); for(int i=0; i<num_metal_layers; i++) { if (i > 0) pw.print(", "); pw.print("\"" + metal_width[i].rule + "\""); } pw.println(");"); pw.print("@metal_spacing = ("); for(int i=0; i<num_metal_layers; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(metal_spacing[i].v)); } pw.println(");"); pw.print("@metal_spacing_rule = ("); for(int i=0; i<num_metal_layers; i++) { if (i > 0) pw.print(", "); pw.print("\"" + metal_spacing[i].rule + "\""); } pw.println(");"); pw.println(); pw.println("###### VIA RULES #####"); pw.print("@via_size = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(via_size[i].v)); } pw.println(");"); pw.print("@via_size_rule = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print("\"" + via_size[i].rule + "\""); } pw.println(");"); pw.print("@via_spacing = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(via_spacing[i].v)); } pw.println(");"); pw.print("@via_spacing_rule = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print("\"" + via_spacing[i].rule + "\""); } pw.println(");"); pw.println(); pw.println("## \"sep2d\" spacing, close proximity via array spacing"); pw.print("@via_array_spacing = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(via_array_spacing[i].v)); } pw.println(");"); pw.print("@via_array_spacing_rule = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print("\"" + via_array_spacing[i].rule + "\""); } pw.println(");"); pw.print("@via_overhang_inline = ("); for(int i=0; i<num_metal_layers-1; i++) { if (i > 0) pw.print(", "); pw.print(TextUtils.formatDouble(via_overhang_inline[i].v)); } pw.println(");"); pw.print("@via_overhang_inline_rule = ("); for(int i=0; i<num_metal_layers-1; i++)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -