~ubuntu-branches/ubuntu/vivid/electric/vivid

« back to all changes in this revision

Viewing changes to com/sun/electric/technology/technologies/Schematics.java

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-07-08 21:54:23 UTC
  • mfrom: (1.1.6) (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20140708215423-4zrgsca1e28tzcoc
Tags: 9.05+dfsg-1
* Imported Upstream version 9.05+dfsg.
* Add signing-key.pgp and check for valid upstream tarballs with uscan's
  pgpsigurlmangle feature.
* Move the package to Git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
854
854
                    })
855
855
                });
856
856
        PrimitivePort bufferInPort = PrimitivePort.newInstance(bufferNode, new ArcProto[]{wire_arc, bus_arc}, "a", false,
857
 
                180, 0, 0, PortCharacteristic.IN, false, true,
 
857
                180, 45, 0, PortCharacteristic.IN, false, true,
858
858
                EdgeH.l(-3), EdgeV.c(0), EdgeH.l(-3), EdgeV.c(0));
859
859
        PrimitivePort bufferSidePort = PrimitivePort.newInstance(bufferNode, new ArcProto[]{wire_arc}, "c", false,
860
 
                270, 0, 1, PortCharacteristic.IN, false, true,
 
860
                270, 45, 1, PortCharacteristic.IN, false, true,
861
861
                EdgeH.c(0), EdgeV.b(-1), EdgeH.c(0), EdgeV.b(-1));
862
862
        PrimitivePort bufferOutPort = PrimitivePort.newInstance(bufferNode, new ArcProto[]{wire_arc, bus_arc}, "y", false,
863
 
                0, 0, 2, PortCharacteristic.OUT, false, true,
 
863
                0, 45, 2, PortCharacteristic.OUT, false, true,
864
864
                EdgeH.r(2), EdgeV.c(0), EdgeH.r(2), EdgeV.c(0));
865
865
        bufferNode.addPrimitivePorts(bufferInPort, bufferSidePort, bufferOutPort);
866
866
        bufferNode.setFunction(PrimitiveNode.Function.BUFFER);
883
883
                    })
884
884
                });
885
885
        PrimitivePort andInPort = new SpecialSelectionPort(andNode, "a",
886
 
                EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-4), EdgeV.t(3));
 
886
            EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-4), EdgeV.t(3));
887
887
        PrimitivePort andOutPort = new SquareSizablePort(andNode, new ArcProto[]{wire_arc, bus_arc}, "y",
888
 
                1, PortCharacteristic.OUT,
889
 
                EdgeH.c(3.5), EdgeV.c(0), EdgeH.c(3.5), EdgeV.c(0));
890
 
 
 
888
            0, 45, 1, PortCharacteristic.OUT, EdgeH.c(3.5), EdgeV.c(0), EdgeH.c(3.5), EdgeV.c(0));
891
889
        PrimitivePort andTopPort = new SquareSizablePort(andNode, new ArcProto[]{wire_arc, bus_arc}, "yt",
892
 
                2, PortCharacteristic.OUT,
893
 
                EdgeH.c(2.75), EdgeV.c(2), EdgeH.c(2.75), EdgeV.c(2));
 
890
            0, 45, 2, PortCharacteristic.OUT, EdgeH.c(2.75), EdgeV.c(2), EdgeH.c(2.75), EdgeV.c(2));
894
891
        PrimitivePort andBottomPort = new SquareSizablePort(andNode, new ArcProto[]{wire_arc, bus_arc}, "yc",
895
 
                3, PortCharacteristic.OUT,
896
 
                EdgeH.c(2.75), EdgeV.c(-2), EdgeH.c(2.75), EdgeV.c(-2));
 
892
            0, 45, 3, PortCharacteristic.OUT, EdgeH.c(2.75), EdgeV.c(-2), EdgeH.c(2.75), EdgeV.c(-2));
897
893
        andNode.addPrimitivePorts(andInPort, andOutPort, andTopPort, andBottomPort);
898
894
        andNode.setFunction(PrimitiveNode.Function.GATEAND);
899
895
        andNode.setAutoGrowth(0, 4);
931
927
                    })
932
928
                });
933
929
        PrimitivePort orInPort = new SpecialSelectionPort(orNode, "a",
934
 
                EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-3), EdgeV.t(3));
 
930
            EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-3), EdgeV.t(3));
935
931
        PrimitivePort orOutPort = new SquareSizablePort(orNode, new ArcProto[]{wire_arc, bus_arc}, "y",
936
 
                1, PortCharacteristic.OUT,
937
 
                EdgeH.c(4.5), EdgeV.c(0), EdgeH.c(4.5), EdgeV.c(0));
 
932
            0, 45, 1, PortCharacteristic.OUT, EdgeH.c(4.5), EdgeV.c(0), EdgeH.c(4.5), EdgeV.c(0));
938
933
        PrimitivePort orTopPort = new SquareSizablePort(orNode, new ArcProto[]{wire_arc, bus_arc}, "yt",
939
 
                2, PortCharacteristic.OUT,
940
 
                EdgeH.c(2.65), EdgeV.c(2), EdgeH.c(2.65), EdgeV.c(2));
 
934
                0, 45, 2, PortCharacteristic.OUT, EdgeH.c(2.65), EdgeV.c(2), EdgeH.c(2.65), EdgeV.c(2));
941
935
        PrimitivePort orBottomPort = new SquareSizablePort(orNode, new ArcProto[]{wire_arc, bus_arc}, "yc",
942
 
                3, PortCharacteristic.OUT,
943
 
                EdgeH.c(2.65), EdgeV.c(-2), EdgeH.c(2.65), EdgeV.c(-2));
 
936
                0, 45, 3, PortCharacteristic.OUT, EdgeH.c(2.65), EdgeV.c(-2), EdgeH.c(2.65), EdgeV.c(-2));
944
937
        orNode.addPrimitivePorts(orInPort, orOutPort, orTopPort, orBottomPort);
945
938
        orNode.setFunction(PrimitiveNode.Function.GATEOR);
946
939
        orNode.setAutoGrowth(0, 4);
982
975
                    })
983
976
                });
984
977
        PrimitivePort xorInPort = new SpecialSelectionPort(xorNode, "a",
985
 
                EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-3), EdgeV.t(3));
 
978
            EdgeH.c(-4), EdgeV.b(-3), EdgeH.c(-3), EdgeV.t(3));
986
979
        PrimitivePort xorOutPort = new SquareSizablePort(xorNode, new ArcProto[]{wire_arc, bus_arc}, "y",
987
 
                1, PortCharacteristic.OUT,
988
 
                EdgeH.c(4.5), EdgeV.c(0), EdgeH.c(4.5), EdgeV.c(0));
 
980
                0, 45, 1, PortCharacteristic.OUT, EdgeH.c(4.5), EdgeV.c(0), EdgeH.c(4.5), EdgeV.c(0));
989
981
        PrimitivePort xorTopPort = new SquareSizablePort(xorNode, new ArcProto[]{wire_arc, bus_arc}, "yt",
990
 
                2, PortCharacteristic.OUT,
991
 
                EdgeH.c(2.65), EdgeV.c(2), EdgeH.c(2.65), EdgeV.c(2));
 
982
                0, 45, 2, PortCharacteristic.OUT, EdgeH.c(2.65), EdgeV.c(2), EdgeH.c(2.65), EdgeV.c(2));
992
983
        PrimitivePort xorBottomPort = new SquareSizablePort(xorNode, new ArcProto[]{wire_arc, bus_arc}, "yc",
993
 
                3, PortCharacteristic.OUT,
994
 
                EdgeH.c(2.65), EdgeV.c(-2), EdgeH.c(2.65), EdgeV.c(-2));
 
984
                0, 45, 3, PortCharacteristic.OUT, EdgeH.c(2.65), EdgeV.c(-2), EdgeH.c(2.65), EdgeV.c(-2));
995
985
        xorNode.addPrimitivePorts(xorInPort, xorOutPort, xorTopPort, xorBottomPort);
996
986
        xorNode.setFunction(PrimitiveNode.Function.GATEXOR);
997
987
        xorNode.setAutoGrowth(0, 4);
1195
1185
        PrimitivePort muxInPort = new SpecialSelectionPort(muxNode, "a",
1196
1186
                LEFT8BYP8, EdgeV.b(-5), LEFT8BYP8, EdgeV.t(5));
1197
1187
        PrimitivePort muxSidePort = PrimitivePort.newInstance(muxNode, new ArcProto[]{wire_arc}, "s", false,
1198
 
                270, 0, 2, PortCharacteristic.IN, false, true,
 
1188
                270, 45, 2, PortCharacteristic.IN, false, true,
1199
1189
                EdgeH.c(0), BOT10BYP875, EdgeH.c(0), BOT10BYP875);
1200
1190
        PrimitivePort muxOutPort = PrimitivePort.newInstance(muxNode, new ArcProto[]{wire_arc, bus_arc}, "y", false,
1201
 
                0, 0, 1, PortCharacteristic.OUT, false, true,
 
1191
                0, 45, 1, PortCharacteristic.OUT, false, true,
1202
1192
                RIGHT8BYP8, EdgeV.c(0), RIGHT8BYP8, EdgeV.c(0));
1203
1193
        muxNode.addPrimitivePorts(muxInPort, muxSidePort, muxOutPort);
1204
1194
        muxNode.setFunction(PrimitiveNode.Function.MUX);
1271
1261
                    new Technology.TechPoint(LEFT6BYP3, TOP6BYP6), new Technology.TechPoint(RIGHT6BYP3, TOP6BYP6),
1272
1262
                    new Technology.TechPoint(EdgeH.c(0), TOP6BYP3), new Technology.TechPoint(EdgeH.c(0), TOP6BYP9)}));
1273
1263
        sourceNode.addPrimitivePorts(
1274
 
                PrimitivePort.newInstance(sourceNode, new ArcProto[]{wire_arc}, "plus", 90, 0, 0, PortCharacteristic.UNKNOWN,
 
1264
                PrimitivePort.newInstance(sourceNode, new ArcProto[]{wire_arc}, "plus", 90, 45, 0, PortCharacteristic.UNKNOWN,
1275
1265
                EdgeH.c(0), EdgeV.t(3), EdgeH.c(0), EdgeV.t(3)),
1276
 
                PrimitivePort.newInstance(sourceNode, new ArcProto[]{wire_arc}, "minus", 270, 0, 1, PortCharacteristic.UNKNOWN,
 
1266
                PrimitivePort.newInstance(sourceNode, new ArcProto[]{wire_arc}, "minus", 270, 45, 1, PortCharacteristic.UNKNOWN,
1277
1267
                EdgeH.c(0), EdgeV.b(-3), EdgeH.c(0), EdgeV.b(-3)));
1278
1268
        sourceNode.setFunction(PrimitiveNode.Function.SOURCE);
1279
1269
        sourceNode.setSquare();
1658
1648
                    new Technology.TechPoint(EdgeH.r(3), EdgeV.c(0))}),
1659
1649
                meterLetterV);
1660
1650
        meterNode.addPrimitivePorts(
1661
 
                PrimitivePort.newInstance(meterNode, new ArcProto[]{wire_arc}, "a", 90, 0, 0, PortCharacteristic.UNKNOWN,
 
1651
                PrimitivePort.newInstance(meterNode, new ArcProto[]{wire_arc}, "a", 90, 45, 0, PortCharacteristic.UNKNOWN,
1662
1652
                EdgeH.c(0), EdgeV.t(3), EdgeH.c(0), EdgeV.t(3)),
1663
 
                PrimitivePort.newInstance(meterNode, new ArcProto[]{wire_arc}, "b", 270, 0, 1, PortCharacteristic.UNKNOWN,
 
1653
                PrimitivePort.newInstance(meterNode, new ArcProto[]{wire_arc}, "b", 270, 45, 1, PortCharacteristic.UNKNOWN,
1664
1654
                EdgeH.c(0), EdgeV.b(-3), EdgeH.c(0), EdgeV.b(-3)));
1665
1655
        meterNode.setFunction(PrimitiveNode.Function.METER);
1666
1656
        meterNode.setSquare();
2647
2637
    private class SquareSizablePort extends PrimitivePort {
2648
2638
 
2649
2639
        private SquareSizablePort(PrimitiveNode parent, ArcProto[] portArcs, String protoName,
2650
 
                int portTopology, PortCharacteristic characteristic,
 
2640
                int portAngle, int portRange, int portTopology, PortCharacteristic characteristic,
2651
2641
                EdgeH left, EdgeV bottom, EdgeH right, EdgeV top) {
2652
 
            super(parent, portArcs, protoName, false, 0, 0, portTopology, characteristic, false, true,
 
2642
            super(parent, portArcs, protoName, false, portAngle, portRange, portTopology, characteristic, false, true,
2653
2643
                    left, bottom, right, top);
2654
2644
            assert left.getMultiplier() == 0 && right.getMultiplier() == 0 && bottom.getMultiplier() == 0 && top.getMultiplier() == 0;
2655
2645
        }
2684
2674
 
2685
2675
        private SpecialSelectionPort(PrimitiveNode parent, String protoName,
2686
2676
                EdgeH left, EdgeV bottom, EdgeH right, EdgeV top) {
2687
 
            super(parent, new ArcProto[]{wire_arc, bus_arc}, protoName, false, 180, 0, 0, PortCharacteristic.IN, true, true,
 
2677
            super(parent, new ArcProto[]{wire_arc, bus_arc}, protoName, false, 180, 45, 0, PortCharacteristic.IN, true, true,
2688
2678
                    left, bottom, right, top);
2689
2679
        }
2690
2680