📄 schematics.java
字号:
switch_port, PrimitivePort.newInstance(this, switchNode, new ArcProto[] {wire_arc, bus_arc}, "y", 0,90, 1, PortCharacteristic.UNKNOWN, EdgeH.fromRight(1), EdgeV.makeCenter(), EdgeH.fromRight(1), EdgeV.makeCenter()) }); switchNode.setFunction(PrimitiveNode.Function.UNKNOWN); switchNode.setAutoGrowth(0, 4); /** off page connector */ offpageNode = PrimitiveNode.newInstance("Off-Page", this, 4.0, 2.0, null, new Technology.NodeLayer [] { new Technology.NodeLayer(node_lay, 0, Poly.Type.CLOSED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge()), new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeTopEdge()), new Technology.TechPoint(RIGHTBYP5, EdgeV.makeTopEdge()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeCenter()), new Technology.TechPoint(RIGHTBYP5, EdgeV.makeBottomEdge())}) }); offpageNode.addPrimitivePorts(new PrimitivePort [] { PrimitivePort.newInstance(this, offpageNode, new ArcProto[] {wire_arc, bus_arc}, "a", 180,45, 0, PortCharacteristic.UNKNOWN, EdgeH.makeLeftEdge(), EdgeV.makeCenter(), EdgeH.makeLeftEdge(), EdgeV.makeCenter()), PrimitivePort.newInstance(this, offpageNode, new ArcProto[] {wire_arc, bus_arc}, "y", 0,45, 0, PortCharacteristic.UNKNOWN, EdgeH.makeRightEdge(), EdgeV.makeCenter(), EdgeH.makeRightEdge(), EdgeV.makeCenter()) }); offpageNode.setFunction(PrimitiveNode.Function.CONNECT); /** power */ powerNode = PrimitiveNode.newInstance("Power", this, 3.0, 3.0, null, new Technology.NodeLayer [] { new Technology.NodeLayer(node_lay, 0, Poly.Type.CIRCLE, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeTopEdge())}), new Technology.NodeLayer(node_lay, 0, Poly.Type.CIRCLE, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeCenter(), TOPBYP75)}) }); powerNode.addPrimitivePorts(new PrimitivePort [] { PrimitivePort.newInstance(this, powerNode, new ArcProto[] {wire_arc}, "vdd", 0,180, 0, PortCharacteristic.PWR, EdgeH.makeCenter(), EdgeV.makeCenter(), EdgeH.makeCenter(), EdgeV.makeCenter()) }); powerNode.setFunction(PrimitiveNode.Function.CONPOWER); powerNode.setSquare(); /** ground */ groundNode = PrimitiveNode.newInstance("Ground", this, 3.0, 4.0, null, new Technology.NodeLayer [] { new Technology.NodeLayer(node_lay, 0, Poly.Type.VECTORS, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeTopEdge()), new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeCenter()), new Technology.TechPoint(LEFTBYP75, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, BOTBYP25), new Technology.TechPoint(LEFTBYP5, BOTBYP5), new Technology.TechPoint(RIGHTBYP5, BOTBYP5), new Technology.TechPoint(LEFTBYP25, BOTBYP75), new Technology.TechPoint(RIGHTBYP25, BOTBYP75), new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeBottomEdge()), new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeBottomEdge())}) }); groundNode.addPrimitivePorts(new PrimitivePort [] { PrimitivePort.newInstance(this, groundNode, new ArcProto[] {wire_arc}, "gnd", 90,90, 0, PortCharacteristic.GND, EdgeH.makeCenter(), EdgeV.makeTopEdge(), EdgeH.makeCenter(), EdgeV.makeTopEdge()) }); groundNode.setFunction(PrimitiveNode.Function.CONGROUND); /** source */ sourceNode = PrimitiveNode.newInstance("Source", this, 6.0, 6.0, null, new Technology.NodeLayer [] { new Technology.NodeLayer(node_lay, 0, Poly.Type.CIRCLE, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeCenter())}), new Technology.NodeLayer(node_lay, 0, Poly.Type.VECTORS, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP3, TOPBYP6), new Technology.TechPoint(RIGHTBYP3, TOPBYP6), new Technology.TechPoint(EdgeH.makeCenter(), TOPBYP3), new Technology.TechPoint(EdgeH.makeCenter(), TOPBYP9)}) }); sourceNode.addPrimitivePorts(new PrimitivePort [] { PrimitivePort.newInstance(this, sourceNode, new ArcProto[] {wire_arc}, "plus", 90,0, 0, PortCharacteristic.UNKNOWN, EdgeH.makeCenter(), EdgeV.makeTopEdge(), EdgeH.makeCenter(), EdgeV.makeTopEdge()), PrimitivePort.newInstance(this, sourceNode, new ArcProto[] {wire_arc}, "minus", 270,0, 1, PortCharacteristic.UNKNOWN, EdgeH.makeCenter(), EdgeV.makeBottomEdge(), EdgeH.makeCenter(), EdgeV.makeBottomEdge()) }); sourceNode.setFunction(PrimitiveNode.Function.SOURCE); sourceNode.setSquare(); /** transistor */ Technology.NodeLayer tranLayerTranTop = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP75, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, BOTBYP25)}); Technology.NodeLayer tranLayerNMOS = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeCenter(), BOTBYP25), new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.fromTop(1))}); Technology.NodeLayer tranLayerBTran1 = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP25, BOTBYP25), new Technology.TechPoint(RIGHTBYP25, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeBottomEdge())}); Technology.NodeLayer tranLayerBTran2 = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP75, BOTBYP75), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP5, BOTBYP875)}); Technology.NodeLayer tranLayerBTran3 = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP5, BOTBYP375), new Technology.TechPoint(LEFTBYP25, BOTBYP25), new Technology.TechPoint(LEFTBYP25, BOTBYP5)}); Technology.NodeLayer tranLayerBTran4 = new Technology.NodeLayer(node_lay, 0, Poly.Type.VECTORS, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, BOTBYP25), new Technology.TechPoint(LEFTBYP875, BOTBYP25), new Technology.TechPoint(RIGHTBYP875, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeBottomEdge())}); Technology.NodeLayer tranLayerBTran5 = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP125, EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeCenter(), BOTBYP25), new Technology.TechPoint(RIGHTBYP125, EdgeV.makeCenter())}); Technology.NodeLayer tranLayerBTran6 = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP125, EdgeV.makeCenter()), new Technology.TechPoint(EdgeH.makeCenter(), TOPBYP25), new Technology.TechPoint(RIGHTBYP125, EdgeV.makeCenter())}); Technology.NodeLayer tranLayerBTran7 = new Technology.NodeLayer(node_lay, 0, Poly.Type.VECTORS, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP75, BOTBYP25), new Technology.TechPoint(LEFTBYP875, BOTBYP25), new Technology.TechPoint(LEFTBYP5, BOTBYP25), new Technology.TechPoint(LEFTBYP25, BOTBYP25), new Technology.TechPoint(RIGHTBYP25, BOTBYP25), new Technology.TechPoint(RIGHTBYP5, BOTBYP25), new Technology.TechPoint(RIGHTBYP875, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, BOTBYP25), new Technology.TechPoint(RIGHTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP75, EdgeV.makeBottomEdge()), new Technology.TechPoint(EdgeH.makeRightEdge(), EdgeV.makeBottomEdge())}); tranLayersN = buildTransistorDescription(true, false, false, false, 0, 0, false); tranLayersP = buildTransistorDescription(false, false, false, false, 0, 0, false); tranLayersNd = buildTransistorDescription(true, true, false, false, 0, 0, false); tranLayersPd = buildTransistorDescription(false, true, false, false, 0, 0, false); tranLayersNnT = buildTransistorDescription(true, false, true, false, 0, 0, false); tranLayersPnT = buildTransistorDescription(false, false, true, false, 0, 0, false); tranLayersNfG = buildTransistorDescription(true, false, false, true, 0, 0, false); tranLayersPfG = buildTransistorDescription(false, false, false, true, 0, 0, false); tranLayersNvtL = buildTransistorDescription(true, false, false, false, -1, 0, false); tranLayersPvtL = buildTransistorDescription(false, false, false, false, -1, 0, false); tranLayersNvtH = buildTransistorDescription(true, false, false, false, 1, 0, false); tranLayersPvtH = buildTransistorDescription(false, false, false, false, 1, 0, false); tranLayersNht1 = buildTransistorDescription(true, false, false, false, 0, 1, false); tranLayersPht1 = buildTransistorDescription(false, false, false, false, 0, 1, false); tranLayersNht2 = buildTransistorDescription(true, false, false, false, 0, 2, false); tranLayersPht2 = buildTransistorDescription(false, false, false, false, 0, 2, false); tranLayersNht3 = buildTransistorDescription(true, false, false, false, 0, 3, false); tranLayersPht3 = buildTransistorDescription(false, false, false, false, 0, 3, false); tranLayersNnTht1 = buildTransistorDescription(true, false, true, false, 0, 1, false); tranLayersPnTht1 = buildTransistorDescription(false, false, true, false, 0, 1, false); tranLayersNnTht2 = buildTransistorDescription(true, false, true, false, 0, 2, false); tranLayersPnTht2 = buildTransistorDescription(false, false, true, false, 0, 2, false); tranLayersNnTht3 = buildTransistorDescription(true, false, true, false, 0, 3, false); tranLayersPnTht3 = buildTransistorDescription(false, false, true, false, 0, 3, false); tranLayersNPN = new Technology.NodeLayer [] {tranLayerBTran1, tranLayerTranTop, tranLayerNMOS, tranLayerBTran2}; tranLayersPNP = new Technology.NodeLayer [] {tranLayerBTran1, tranLayerTranTop, tranLayerNMOS, tranLayerBTran3}; tranLayersNJFET = new Technology.NodeLayer [] {tranLayerBTran4, tranLayerTranTop, tranLayerNMOS, tranLayerBTran5}; tranLayersPJFET = new Technology.NodeLayer [] {tranLayerBTran4, tranLayerTranTop, tranLayerNMOS, tranLayerBTran6}; tranLayersDMES = new Technology.NodeLayer [] {tranLayerBTran4, tranLayerTranTop, tranLayerNMOS}; tranLayersEMES = new Technology.NodeLayer [] {tranLayerBTran7, tranLayerNMOS}; transistorNode = PrimitiveNode.newInstance("Transistor", this, 4.0, 4.0, new SizeOffset(0, 0, 0, 1), tranLayersN); transistorNode.addPrimitivePorts(new PrimitivePort [] { PrimitivePort.newInstance(this, transistorNode, new ArcProto[] {wire_arc}, "g", 0,180, 0, PortCharacteristic.IN, EdgeH.makeCenter(), EdgeV.fromTop(1), EdgeH.makeCenter(), EdgeV.fromTop(1)), PrimitivePort.newInstance(this, transistorNode, new ArcProto[] {wire_arc}, "s", 180,90, 1, PortCharacteristic.BIDIR, EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge(), EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge()), PrimitivePort.newInstance(this, transistorNode, new ArcProto[] {wire_arc}, "d", 0,90, 2, PortCharacteristic.BIDIR, EdgeH.makeRightEdge(), EdgeV.makeBottomEdge(), EdgeH.makeRightEdge(), EdgeV.makeBottomEdge()) }); transistorNode.setFunction(PrimitiveNode.Function.TRANS); /** resistor */ Technology.NodeLayer resistorLayer = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP66, EdgeV.makeCenter()), new Technology.TechPoint(LEFTBYP6, EdgeV.makeCenter()), new Technology.TechPoint(LEFTBYP5, EdgeV.makeTopEdge()), new Technology.TechPoint(LEFTBYP3, EdgeV.makeBottomEdge()), new Technology.TechPoint(LEFTBYP1, EdgeV.makeTopEdge()), new Technology.TechPoint(RIGHTBYP1, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP3, EdgeV.makeTopEdge()), new Technology.TechPoint(RIGHTBYP5, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP6, EdgeV.makeCenter()), new Technology.TechPoint(RIGHTBYP66, EdgeV.makeCenter())}); Technology.NodeLayer resistorLayerWell = new Technology.NodeLayer(node_lay, 0, Poly.Type.OPENEDT2, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(LEFTBYP6, EdgeV.makeTopEdge()), new Technology.TechPoint(LEFTBYP6, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP6, EdgeV.makeBottomEdge()), new Technology.TechPoint(RIGHTBYP6, EdgeV.makeTopEdge()), new Technology.TechPoint(LEFTBYP6, EdgeV.makeTopEdge())}); Technology.NodeLayer resistorLayerP = new Technology.NodeLayer(node_lay, 0, Poly.Type.TEXTBOX, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(RIGHTBYP4, EdgeV.makeCenter()), new Technology.TechPoint(RIGHTBYP4, EdgeV.makeTopEdge()), new Technology.TechPoint(RIGHTBYP6, EdgeV.makeTopEdge()), new Technology.TechPoint(RIGHTBYP6, EdgeV.makeCenter())}); resistorLayerP.setMessage("P"); resistorLayerP.setDescriptor(tdBig); Technology.NodeLayer resistorLayerN = new Technology.NodeLayer(node_lay, 0, Poly.Type.TEXTBOX, Technology.NodeLayer.POINTS, new Technology.TechPoint [] { new Technology.TechPoint(RIGHTBYP4, EdgeV.makeCenter()), new Technology.TechPoint(RIGHTBYP4, Edg
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -