Pins are now accessed via name, not index
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / mi / nandbased / GUIram4.java
index 699f13e..419836b 100644 (file)
@@ -13,8 +13,8 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent
        {
                super(model, 1, "GUIram4");
                setSubmodelScale(.1);
-               setInputCount(13);
-               setOutputCount(8);
+               setInputPins("A0", "A1", "A2", "A3", "B0", "B1", "B2", "B3", "WE", "D1", "D2", "D3", "D4");
+               setOutputPins("QA1", "QA2", "QA3", "QA4", "QB1", "QB2", "QB3", "QB4");
                initSubmodelComponents();
        }
 
@@ -22,27 +22,27 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent
        private void initSubmodelComponents()
        {
                //@formatter:off
-               Pin  A0 = getInputSubmodelPins() .get( 0);
-               Pin  A1 = getInputSubmodelPins() .get( 1);
-               Pin  A2 = getInputSubmodelPins() .get( 2);
-               Pin  A3 = getInputSubmodelPins() .get( 3);
-               Pin  B0 = getInputSubmodelPins() .get( 4);
-               Pin  B1 = getInputSubmodelPins() .get( 5);
-               Pin  B2 = getInputSubmodelPins() .get( 6);
-               Pin  B3 = getInputSubmodelPins() .get( 7);
-               Pin  WE = getInputSubmodelPins() .get( 8);
-               Pin  D1 = getInputSubmodelPins() .get( 9);
-               Pin  D2 = getInputSubmodelPins() .get(10);
-               Pin  D3 = getInputSubmodelPins() .get(11);
-               Pin  D4 = getInputSubmodelPins() .get(12);
-               Pin QA1 = getOutputSubmodelPins().get( 0);
-               Pin QA2 = getOutputSubmodelPins().get( 1);
-               Pin QA3 = getOutputSubmodelPins().get( 2);
-               Pin QA4 = getOutputSubmodelPins().get( 3);
-               Pin QB1 = getOutputSubmodelPins().get( 4);
-               Pin QB2 = getOutputSubmodelPins().get( 5);
-               Pin QB3 = getOutputSubmodelPins().get( 6);
-               Pin QB4 = getOutputSubmodelPins().get( 7);
+               Pin  A0 = getSubmodelPin("A0");
+               Pin  A1 = getSubmodelPin("A1");
+               Pin  A2 = getSubmodelPin("A2");
+               Pin  A3 = getSubmodelPin("A3");
+               Pin  B0 = getSubmodelPin("B0");
+               Pin  B1 = getSubmodelPin("B1");
+               Pin  B2 = getSubmodelPin("B2");
+               Pin  B3 = getSubmodelPin("B3");
+               Pin  WE = getSubmodelPin("WE");
+               Pin  D1 = getSubmodelPin("D1");
+               Pin  D2 = getSubmodelPin("D2");
+               Pin  D3 = getSubmodelPin("D3");
+               Pin  D4 = getSubmodelPin("D4");
+               Pin QA1 =getSubmodelPin("QA1");
+               Pin QA2 =getSubmodelPin("QA2");
+               Pin QA3 =getSubmodelPin("QA3");
+               Pin QA4 =getSubmodelPin("QA4");
+               Pin QB1 =getSubmodelPin("QB1");
+               Pin QB2 =getSubmodelPin("QB2");
+               Pin QB3 =getSubmodelPin("QB3");
+               Pin QB4 =getSubmodelPin("QB4");
 
                GUIdemux2   demuxA   = new GUIdemux2  (submodelModifiable);
                GUIdemux2   demuxB   = new GUIdemux2  (submodelModifiable);
@@ -133,151 +133,151 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent
                cpAB3in.moveCenterTo( 50, 650);
                cpAB4in.moveCenterTo( 55, 750);
 
-               new GUIWire(submodelModifiable, A0, demuxA.getInputPins().get(0), new Point[0]);
-               new GUIWire(submodelModifiable, A1, demuxA.getInputPins().get(1), new Point(10, 150), new Point(10,  60));
-               new GUIWire(submodelModifiable, B0, demuxB.getInputPins().get(0), new Point( 5, 450), new Point( 5, 155));
-               new GUIWire(submodelModifiable, B1, demuxB.getInputPins().get(1), new Point(10, 550), new Point(10, 165));
-               new GUIWire(submodelModifiable, demuxB.getOutputPins().get(0), cpB00, new Point[0]);
-               new GUIWire(submodelModifiable, demuxB.getOutputPins().get(1), cpB01, new Point[0]);
-               new GUIWire(submodelModifiable, demuxB.getOutputPins().get(2), cpB10, new Point[0]);
-               new GUIWire(submodelModifiable, demuxB.getOutputPins().get(3), cpB11, new Point[0]);
-               new GUIWire(submodelModifiable, cpB00, weAndB.getInputPins().get(0), new Point[0]);
-               new GUIWire(submodelModifiable, cpB01, weAndB.getInputPins().get(1), new Point[0]);
-               new GUIWire(submodelModifiable, cpB10, weAndB.getInputPins().get(2), new Point[0]);
-               new GUIWire(submodelModifiable, cpB11, weAndB.getInputPins().get(3), new Point[0]);
-               new GUIWire(submodelModifiable, WE, weAndB.getInputPins().get(4), new Point(15, 850), new Point(15, 195));
-               new GUIWire(submodelModifiable, weAndB.getOutputPins().get(0), cell00.getInputPins().get(4), new Point(290, 155), new Point(290, 230), new Point(35, 230), new Point(35, 375));
-               new GUIWire(submodelModifiable, weAndB.getOutputPins().get(1), cell01.getInputPins().get(4), new Point(285, 165), new Point(285, 225), new Point(30, 225), new Point(30, 525));
-               new GUIWire(submodelModifiable, weAndB.getOutputPins().get(2), cell10.getInputPins().get(4), new Point(280, 175), new Point(280, 220), new Point(25, 220), new Point(25, 675));
-               new GUIWire(submodelModifiable, weAndB.getOutputPins().get(3), cell11.getInputPins().get(4), new Point(275, 185), new Point(275, 215), new Point(20, 215), new Point(20, 825));
-               new GUIWire(submodelModifiable, cpAB101, cpAB1in                     , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB1in, cell00.getInputPins().get(0), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB201, cpAB2in                     , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB2in, cell00.getInputPins().get(1), new Point(45, 345));
-               new GUIWire(submodelModifiable, cpAB301, cell00.getInputPins().get(2), new Point(50, 355));
-               new GUIWire(submodelModifiable, cpAB401, cell00.getInputPins().get(3), new Point(55, 365));
-               new GUIWire(submodelModifiable, cpAB101, cell01.getInputPins().get(0), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB201, cell01.getInputPins().get(1), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB301, cell01.getInputPins().get(2), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB401, cell01.getInputPins().get(3), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB101, cpAB110                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB201, cpAB210                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB301, cpAB3in                      , new Point[0]);
-               new GUIWire(submodelModifiable, B2, cpAB3in                          , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB3in, cpAB310                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB401, cpAB410                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB110, cell10.getInputPins().get(0), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB210, cell10.getInputPins().get(1), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB310, cell10.getInputPins().get(2), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB410, cell10.getInputPins().get(3), new Point[0]);
-               new GUIWire(submodelModifiable, cpAB110, cell11.getInputPins().get(0), new Point(40, 785));
-               new GUIWire(submodelModifiable, cpAB210, cell11.getInputPins().get(1), new Point(45, 795));
-               new GUIWire(submodelModifiable, cpAB310, cell11.getInputPins().get(2), new Point(50, 805));
-               new GUIWire(submodelModifiable, cpAB410, cpAB4in                     , new Point[0]);
-               new GUIWire(submodelModifiable, cpAB4in, cell11.getInputPins().get(3), new Point(55, 815));
-               new GUIWire(submodelModifiable, A2, cpAB1in                          , new Point(40, 250));
-               new GUIWire(submodelModifiable, A3, cpAB2in                          , new Point[0]);
-               new GUIWire(submodelModifiable, B3, cpAB4in                          , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_101, cell00.getInputPins().get(5), new Point(60, 385));
-               new GUIWire(submodelModifiable, cpD_201, cell00.getInputPins().get(6), new Point(65, 395));
-               new GUIWire(submodelModifiable, cpD_301, cell00.getInputPins().get(7), new Point(70, 405));
-               new GUIWire(submodelModifiable, cpD_401, cell00.getInputPins().get(8), new Point(75, 415));
-               new GUIWire(submodelModifiable, cpD_101, cell01.getInputPins().get(5), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_201, cell01.getInputPins().get(6), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_301, cell01.getInputPins().get(7), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_401, cell01.getInputPins().get(8), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_101, cpD_110                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_201, cpD_210                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_301, cpD_310                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_401, cpD_410                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_110, cell10.getInputPins().get(5), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_210, cell10.getInputPins().get(6), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_310, cell10.getInputPins().get(7), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_410, cell10.getInputPins().get(8), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_110, cpD_111                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_210, cpD_211                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_310, cpD_311                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_410, cpD_411                      , new Point[0]);
-               new GUIWire(submodelModifiable, cpD_111, cell11.getInputPins().get(5), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_211, cell11.getInputPins().get(6), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_311, cell11.getInputPins().get(7), new Point[0]);
-               new GUIWire(submodelModifiable, cpD_411, cell11.getInputPins().get(8), new Point[0]);
-               new GUIWire(submodelModifiable, D1, cpD_111                          , new Point(60,  950));
-               new GUIWire(submodelModifiable, D2, cpD_211                          , new Point(65, 1050));
-               new GUIWire(submodelModifiable, D3, cpD_311                          , new Point(70, 1150));
-               new GUIWire(submodelModifiable, D4, cpD_411                          , new Point(75, 1250));
-               new GUIWire(submodelModifiable, demuxA.getOutputPins().get(0), andA00  .getInputPins().get(4), new Point(135, 50), new Point(135, 370));
-               new GUIWire(submodelModifiable, demuxA.getOutputPins().get(1), andorA01.getInputPins().get(8), new Point(130, 60), new Point(130, 520));
-               new GUIWire(submodelModifiable, demuxA.getOutputPins().get(2), andorA10.getInputPins().get(8), new Point(125, 70), new Point(125, 670));
-               new GUIWire(submodelModifiable, demuxA.getOutputPins().get(3), andorA11.getInputPins().get(8), new Point(120, 80), new Point(120, 820));
-               new GUIWire(submodelModifiable, cpB00 , andB00  .getInputPins().get(4), new Point(230, 420));
-               new GUIWire(submodelModifiable, cpB01 , andorB01.getInputPins().get(8), new Point(225, 570));
-               new GUIWire(submodelModifiable, cpB10 , andorB10.getInputPins().get(8), new Point(220, 720));
-               new GUIWire(submodelModifiable, cpB11 , andorB11.getInputPins().get(8), new Point(215, 870));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(4), andB00  .getInputPins().get(0), new Point(140, 375), new Point(140, 380));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(5), andB00  .getInputPins().get(1), new Point(140, 385), new Point(140, 390));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(6), andB00  .getInputPins().get(2), new Point(140, 395), new Point(140, 400));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(7), andB00  .getInputPins().get(3), new Point(140, 405), new Point(140, 410));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(4), andorB01.getInputPins().get(4), new Point(140, 525), new Point(140, 530));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(5), andorB01.getInputPins().get(5), new Point(140, 535), new Point(140, 540));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(6), andorB01.getInputPins().get(6), new Point(140, 545), new Point(140, 550));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(7), andorB01.getInputPins().get(7), new Point(140, 555), new Point(140, 560));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(4), andorB10.getInputPins().get(4), new Point(140, 675), new Point(140, 680));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(5), andorB10.getInputPins().get(5), new Point(140, 685), new Point(140, 690));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(6), andorB10.getInputPins().get(6), new Point(140, 695), new Point(140, 700));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(7), andorB10.getInputPins().get(7), new Point(140, 705), new Point(140, 710));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(4), andorB11.getInputPins().get(4), new Point(140, 825), new Point(140, 830));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(5), andorB11.getInputPins().get(5), new Point(140, 835), new Point(140, 840));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(6), andorB11.getInputPins().get(6), new Point(140, 845), new Point(140, 850));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(7), andorB11.getInputPins().get(7), new Point(140, 855), new Point(140, 860));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(0), andA00  .getInputPins().get(0), new Point(140, 335), new Point(140, 330));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(1), andA00  .getInputPins().get(1), new Point(140, 345), new Point(140, 340));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(2), andA00  .getInputPins().get(2), new Point(140, 355), new Point(140, 350));
-               new GUIWire(submodelModifiable, cell00.getOutputPins().get(3), andA00  .getInputPins().get(3), new Point(140, 365), new Point(140, 360));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(0), andorA01.getInputPins().get(4), new Point(140, 485), new Point(140, 480));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(1), andorA01.getInputPins().get(5), new Point(140, 495), new Point(140, 490));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(2), andorA01.getInputPins().get(6), new Point(140, 505), new Point(140, 500));
-               new GUIWire(submodelModifiable, cell01.getOutputPins().get(3), andorA01.getInputPins().get(7), new Point(140, 515), new Point(140, 510));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(0), andorA10.getInputPins().get(4), new Point(140, 635), new Point(140, 630));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(1), andorA10.getInputPins().get(5), new Point(140, 645), new Point(140, 640));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(2), andorA10.getInputPins().get(6), new Point(140, 655), new Point(140, 650));
-               new GUIWire(submodelModifiable, cell10.getOutputPins().get(3), andorA10.getInputPins().get(7), new Point(140, 665), new Point(140, 660));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(0), andorA11.getInputPins().get(4), new Point(140, 785), new Point(140, 780));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(1), andorA11.getInputPins().get(5), new Point(140, 795), new Point(140, 790));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(2), andorA11.getInputPins().get(6), new Point(140, 805), new Point(140, 800));
-               new GUIWire(submodelModifiable, cell11.getOutputPins().get(3), andorA11.getInputPins().get(7), new Point(140, 815), new Point(140, 810));
-               new GUIWire(submodelModifiable, andB00  .getOutputPins().get(0), andorB01.getInputPins().get(0), new Point(305, 380), new Point(305, 445), new Point(245, 445), new Point(245, 490));
-               new GUIWire(submodelModifiable, andB00  .getOutputPins().get(1), andorB01.getInputPins().get(1), new Point(300, 390), new Point(300, 440), new Point(240, 440), new Point(240, 500));
-               new GUIWire(submodelModifiable, andB00  .getOutputPins().get(2), andorB01.getInputPins().get(2), new Point(295, 400), new Point(295, 435), new Point(235, 435), new Point(235, 510));
-               new GUIWire(submodelModifiable, andB00  .getOutputPins().get(3), andorB01.getInputPins().get(3), new Point(290, 410), new Point(290, 430), new Point(230, 430), new Point(230, 520));
-               new GUIWire(submodelModifiable, andorB01.getOutputPins().get(0), andorB10.getInputPins().get(0), new Point(305, 490), new Point(305, 595), new Point(245, 595), new Point(245, 640));
-               new GUIWire(submodelModifiable, andorB01.getOutputPins().get(1), andorB10.getInputPins().get(1), new Point(300, 500), new Point(300, 590), new Point(240, 590), new Point(240, 650));
-               new GUIWire(submodelModifiable, andorB01.getOutputPins().get(2), andorB10.getInputPins().get(2), new Point(295, 510), new Point(295, 585), new Point(235, 585), new Point(235, 660));
-               new GUIWire(submodelModifiable, andorB01.getOutputPins().get(3), andorB10.getInputPins().get(3), new Point(290, 520), new Point(290, 580), new Point(230, 580), new Point(230, 670));
-               new GUIWire(submodelModifiable, andorB10.getOutputPins().get(0), andorB11.getInputPins().get(0), new Point(305, 640), new Point(305, 745), new Point(245, 745), new Point(245, 790));
-               new GUIWire(submodelModifiable, andorB10.getOutputPins().get(1), andorB11.getInputPins().get(1), new Point(300, 650), new Point(300, 740), new Point(240, 740), new Point(240, 800));
-               new GUIWire(submodelModifiable, andorB10.getOutputPins().get(2), andorB11.getInputPins().get(2), new Point(295, 660), new Point(295, 735), new Point(235, 735), new Point(235, 810));
-               new GUIWire(submodelModifiable, andorB10.getOutputPins().get(3), andorB11.getInputPins().get(3), new Point(290, 670), new Point(290, 730), new Point(230, 730), new Point(230, 820));
-               new GUIWire(submodelModifiable, andorB11.getOutputPins().get(0), QB1                           , new Point(330, 790), new Point(330, 450));
-               new GUIWire(submodelModifiable, andorB11.getOutputPins().get(1), QB2                           , new Point(335, 800), new Point(335, 550));
-               new GUIWire(submodelModifiable, andorB11.getOutputPins().get(2), QB3                           , new Point(340, 810), new Point(340, 650));
-               new GUIWire(submodelModifiable, andorB11.getOutputPins().get(3), QB4                           , new Point(345, 820), new Point(345, 750));
-               new GUIWire(submodelModifiable, andA00  .getOutputPins().get(0), andorA01.getInputPins().get(0), new Point(210, 330), new Point(210, 430), new Point(150, 430), new Point(150, 440));
-               new GUIWire(submodelModifiable, andA00  .getOutputPins().get(1), andorA01.getInputPins().get(1), new Point(205, 340), new Point(205, 425), new Point(145, 425), new Point(145, 450));
-               new GUIWire(submodelModifiable, andA00  .getOutputPins().get(2), andorA01.getInputPins().get(2), new Point(200, 350), new Point(200, 420), new Point(140, 420), new Point(140, 460));
-               new GUIWire(submodelModifiable, andA00  .getOutputPins().get(3), andorA01.getInputPins().get(3), new Point(195, 360), new Point(195, 415), new Point(135, 415), new Point(135, 470));
-               new GUIWire(submodelModifiable, andorA01.getOutputPins().get(0), andorA10.getInputPins().get(0), new Point(210, 440), new Point(210, 580), new Point(150, 580), new Point(150, 590));
-               new GUIWire(submodelModifiable, andorA01.getOutputPins().get(1), andorA10.getInputPins().get(1), new Point(205, 450), new Point(205, 575), new Point(145, 575), new Point(145, 600));
-               new GUIWire(submodelModifiable, andorA01.getOutputPins().get(2), andorA10.getInputPins().get(2), new Point(200, 460), new Point(200, 570), new Point(140, 570), new Point(140, 610));
-               new GUIWire(submodelModifiable, andorA01.getOutputPins().get(3), andorA10.getInputPins().get(3), new Point(195, 470), new Point(195, 565), new Point(135, 565), new Point(135, 620));
-               new GUIWire(submodelModifiable, andorA10.getOutputPins().get(0), andorA11.getInputPins().get(0), new Point(210, 590), new Point(210, 730), new Point(150, 730), new Point(150, 740));
-               new GUIWire(submodelModifiable, andorA10.getOutputPins().get(1), andorA11.getInputPins().get(1), new Point(205, 600), new Point(205, 725), new Point(145, 725), new Point(145, 750));
-               new GUIWire(submodelModifiable, andorA10.getOutputPins().get(2), andorA11.getInputPins().get(2), new Point(200, 610), new Point(200, 720), new Point(140, 720), new Point(140, 760));
-               new GUIWire(submodelModifiable, andorA10.getOutputPins().get(3), andorA11.getInputPins().get(3), new Point(195, 620), new Point(195, 715), new Point(135, 715), new Point(135, 770));
-               new GUIWire(submodelModifiable, andorA11.getOutputPins().get(0), QA1                           , new Point(210, 740), new Point(210, 880), new Point(310, 880), new Point(310,  50));
-               new GUIWire(submodelModifiable, andorA11.getOutputPins().get(1), QA2                           , new Point(205, 750), new Point(205, 885), new Point(315, 885), new Point(315, 150));
-               new GUIWire(submodelModifiable, andorA11.getOutputPins().get(2), QA3                           , new Point(200, 760), new Point(200, 890), new Point(320, 890), new Point(320, 250));
-               new GUIWire(submodelModifiable, andorA11.getOutputPins().get(3), QA4                           , new Point(195, 770), new Point(195, 895), new Point(325, 895), new Point(325, 350));
+               new GUIWire(submodelModifiable, A0, demuxA.getPin("S0"), new Point[0]);
+               new GUIWire(submodelModifiable, A1, demuxA.getPin("S1"), new Point(10, 150), new Point(10,  60));
+               new GUIWire(submodelModifiable, B0, demuxB.getPin("S0"), new Point( 5, 450), new Point( 5, 155));
+               new GUIWire(submodelModifiable, B1, demuxB.getPin("S1"), new Point(10, 550), new Point(10, 165));
+               new GUIWire(submodelModifiable, demuxB.getPin("Y00"), cpB00, new Point[0]);
+               new GUIWire(submodelModifiable, demuxB.getPin("Y01"), cpB01, new Point[0]);
+               new GUIWire(submodelModifiable, demuxB.getPin("Y10"), cpB10, new Point[0]);
+               new GUIWire(submodelModifiable, demuxB.getPin("Y11"), cpB11, new Point[0]);
+               new GUIWire(submodelModifiable, cpB00, weAndB.getPin("A1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpB01, weAndB.getPin("A2"), new Point[0]);
+               new GUIWire(submodelModifiable, cpB10, weAndB.getPin("A3"), new Point[0]);
+               new GUIWire(submodelModifiable, cpB11, weAndB.getPin("A4"), new Point[0]);
+               new GUIWire(submodelModifiable, WE, weAndB.getPin("B"), new Point(15, 850), new Point(15, 195));
+               new GUIWire(submodelModifiable, weAndB.getPin("Y1"), cell00.getPin("WE"), new Point(290, 155), new Point(290, 230), new Point(35, 230), new Point(35, 375));
+               new GUIWire(submodelModifiable, weAndB.getPin("Y2"), cell01.getPin("WE"), new Point(285, 165), new Point(285, 225), new Point(30, 225), new Point(30, 525));
+               new GUIWire(submodelModifiable, weAndB.getPin("Y3"), cell10.getPin("WE"), new Point(280, 175), new Point(280, 220), new Point(25, 220), new Point(25, 675));
+               new GUIWire(submodelModifiable, weAndB.getPin("Y4"), cell11.getPin("WE"), new Point(275, 185), new Point(275, 215), new Point(20, 215), new Point(20, 825));
+               new GUIWire(submodelModifiable, cpAB101, cpAB1in            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB1in, cell00.getPin("A0"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB201, cpAB2in            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB2in, cell00.getPin("A1"), new Point(45, 345));
+               new GUIWire(submodelModifiable, cpAB301, cell00.getPin("B0"), new Point(50, 355));
+               new GUIWire(submodelModifiable, cpAB401, cell00.getPin("B1"), new Point(55, 365));
+               new GUIWire(submodelModifiable, cpAB101, cell01.getPin("A0"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB201, cell01.getPin("A1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB301, cell01.getPin("B0"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB401, cell01.getPin("B1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB101, cpAB110            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB201, cpAB210            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB301, cpAB3in            , new Point[0]);
+               new GUIWire(submodelModifiable, B2     , cpAB3in            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB3in, cpAB310            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB401, cpAB410            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB110, cell10.getPin("A0"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB210, cell10.getPin("A1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB310, cell10.getPin("B0"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB410, cell10.getPin("B1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpAB110, cell11.getPin("A0"), new Point(40, 785));
+               new GUIWire(submodelModifiable, cpAB210, cell11.getPin("A1"), new Point(45, 795));
+               new GUIWire(submodelModifiable, cpAB310, cell11.getPin("B0"), new Point(50, 805));
+               new GUIWire(submodelModifiable, cpAB410, cpAB4in            , new Point[0]);
+               new GUIWire(submodelModifiable, cpAB4in, cell11.getPin("B1"), new Point(55, 815));
+               new GUIWire(submodelModifiable, A2, cpAB1in                 , new Point(40, 250));
+               new GUIWire(submodelModifiable, A3, cpAB2in                 , new Point[0]);
+               new GUIWire(submodelModifiable, B3, cpAB4in                 , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_101, cell00.getPin("D1"), new Point(60, 385));
+               new GUIWire(submodelModifiable, cpD_201, cell00.getPin("D2"), new Point(65, 395));
+               new GUIWire(submodelModifiable, cpD_301, cell00.getPin("D3"), new Point(70, 405));
+               new GUIWire(submodelModifiable, cpD_401, cell00.getPin("D4"), new Point(75, 415));
+               new GUIWire(submodelModifiable, cpD_101, cell01.getPin("D1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_201, cell01.getPin("D2"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_301, cell01.getPin("D3"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_401, cell01.getPin("D4"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_101, cpD_110            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_201, cpD_210            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_301, cpD_310            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_401, cpD_410            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_110, cell10.getPin("D1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_210, cell10.getPin("D2"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_310, cell10.getPin("D3"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_410, cell10.getPin("D4"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_110, cpD_111            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_210, cpD_211            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_310, cpD_311            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_410, cpD_411            , new Point[0]);
+               new GUIWire(submodelModifiable, cpD_111, cell11.getPin("D1"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_211, cell11.getPin("D2"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_311, cell11.getPin("D3"), new Point[0]);
+               new GUIWire(submodelModifiable, cpD_411, cell11.getPin("D4"), new Point[0]);
+               new GUIWire(submodelModifiable, D1, cpD_111                 , new Point(60,  950));
+               new GUIWire(submodelModifiable, D2, cpD_211                 , new Point(65, 1050));
+               new GUIWire(submodelModifiable, D3, cpD_311                 , new Point(70, 1150));
+               new GUIWire(submodelModifiable, D4, cpD_411                 , new Point(75, 1250));
+               new GUIWire(submodelModifiable, demuxA.getPin("Y00"), andA00  .getPin("B"), new Point(135, 50), new Point(135, 370));
+               new GUIWire(submodelModifiable, demuxA.getPin("Y01"), andorA01.getPin("B"), new Point(130, 60), new Point(130, 520));
+               new GUIWire(submodelModifiable, demuxA.getPin("Y10"), andorA10.getPin("B"), new Point(125, 70), new Point(125, 670));
+               new GUIWire(submodelModifiable, demuxA.getPin("Y11"), andorA11.getPin("B"), new Point(120, 80), new Point(120, 820));
+               new GUIWire(submodelModifiable, cpB00, andB00  .getPin("B"), new Point(230, 420));
+               new GUIWire(submodelModifiable, cpB01, andorB01.getPin("B"), new Point(225, 570));
+               new GUIWire(submodelModifiable, cpB10, andorB10.getPin("B"), new Point(220, 720));
+               new GUIWire(submodelModifiable, cpB11, andorB11.getPin("B"), new Point(215, 870));
+               new GUIWire(submodelModifiable, cell00.getPin("QB1"), andB00  .getPin("A1"), new Point(140, 375), new Point(140, 380));
+               new GUIWire(submodelModifiable, cell00.getPin("QB2"), andB00  .getPin("A2"), new Point(140, 385), new Point(140, 390));
+               new GUIWire(submodelModifiable, cell00.getPin("QB3"), andB00  .getPin("A3"), new Point(140, 395), new Point(140, 400));
+               new GUIWire(submodelModifiable, cell00.getPin("QB4"), andB00  .getPin("A4"), new Point(140, 405), new Point(140, 410));
+               new GUIWire(submodelModifiable, cell01.getPin("QB1"), andorB01.getPin("A1"), new Point(140, 525), new Point(140, 530));
+               new GUIWire(submodelModifiable, cell01.getPin("QB2"), andorB01.getPin("A2"), new Point(140, 535), new Point(140, 540));
+               new GUIWire(submodelModifiable, cell01.getPin("QB3"), andorB01.getPin("A3"), new Point(140, 545), new Point(140, 550));
+               new GUIWire(submodelModifiable, cell01.getPin("QB4"), andorB01.getPin("A4"), new Point(140, 555), new Point(140, 560));
+               new GUIWire(submodelModifiable, cell10.getPin("QB1"), andorB10.getPin("A1"), new Point(140, 675), new Point(140, 680));
+               new GUIWire(submodelModifiable, cell10.getPin("QB2"), andorB10.getPin("A2"), new Point(140, 685), new Point(140, 690));
+               new GUIWire(submodelModifiable, cell10.getPin("QB3"), andorB10.getPin("A3"), new Point(140, 695), new Point(140, 700));
+               new GUIWire(submodelModifiable, cell10.getPin("QB4"), andorB10.getPin("A4"), new Point(140, 705), new Point(140, 710));
+               new GUIWire(submodelModifiable, cell11.getPin("QB1"), andorB11.getPin("A1"), new Point(140, 825), new Point(140, 830));
+               new GUIWire(submodelModifiable, cell11.getPin("QB2"), andorB11.getPin("A2"), new Point(140, 835), new Point(140, 840));
+               new GUIWire(submodelModifiable, cell11.getPin("QB3"), andorB11.getPin("A3"), new Point(140, 845), new Point(140, 850));
+               new GUIWire(submodelModifiable, cell11.getPin("QB4"), andorB11.getPin("A4"), new Point(140, 855), new Point(140, 860));
+               new GUIWire(submodelModifiable, cell00.getPin("QA1"), andA00  .getPin("A1"), new Point(140, 335), new Point(140, 330));
+               new GUIWire(submodelModifiable, cell00.getPin("QA2"), andA00  .getPin("A2"), new Point(140, 345), new Point(140, 340));
+               new GUIWire(submodelModifiable, cell00.getPin("QA3"), andA00  .getPin("A3"), new Point(140, 355), new Point(140, 350));
+               new GUIWire(submodelModifiable, cell00.getPin("QA4"), andA00  .getPin("A4"), new Point(140, 365), new Point(140, 360));
+               new GUIWire(submodelModifiable, cell01.getPin("QA1"), andorA01.getPin("A1"), new Point(140, 485), new Point(140, 480));
+               new GUIWire(submodelModifiable, cell01.getPin("QA2"), andorA01.getPin("A2"), new Point(140, 495), new Point(140, 490));
+               new GUIWire(submodelModifiable, cell01.getPin("QA3"), andorA01.getPin("A3"), new Point(140, 505), new Point(140, 500));
+               new GUIWire(submodelModifiable, cell01.getPin("QA4"), andorA01.getPin("A4"), new Point(140, 515), new Point(140, 510));
+               new GUIWire(submodelModifiable, cell10.getPin("QA1"), andorA10.getPin("A1"), new Point(140, 635), new Point(140, 630));
+               new GUIWire(submodelModifiable, cell10.getPin("QA2"), andorA10.getPin("A2"), new Point(140, 645), new Point(140, 640));
+               new GUIWire(submodelModifiable, cell10.getPin("QA3"), andorA10.getPin("A3"), new Point(140, 655), new Point(140, 650));
+               new GUIWire(submodelModifiable, cell10.getPin("QA4"), andorA10.getPin("A4"), new Point(140, 665), new Point(140, 660));
+               new GUIWire(submodelModifiable, cell11.getPin("QA1"), andorA11.getPin("A1"), new Point(140, 785), new Point(140, 780));
+               new GUIWire(submodelModifiable, cell11.getPin("QA2"), andorA11.getPin("A2"), new Point(140, 795), new Point(140, 790));
+               new GUIWire(submodelModifiable, cell11.getPin("QA3"), andorA11.getPin("A3"), new Point(140, 805), new Point(140, 800));
+               new GUIWire(submodelModifiable, cell11.getPin("QA4"), andorA11.getPin("A4"), new Point(140, 815), new Point(140, 810));
+               new GUIWire(submodelModifiable, andB00  .getPin("Y1"), andorB01.getPin("C1"), new Point(305, 380), new Point(305, 445), new Point(245, 445), new Point(245, 490));
+               new GUIWire(submodelModifiable, andB00  .getPin("Y2"), andorB01.getPin("C2"), new Point(300, 390), new Point(300, 440), new Point(240, 440), new Point(240, 500));
+               new GUIWire(submodelModifiable, andB00  .getPin("Y3"), andorB01.getPin("C3"), new Point(295, 400), new Point(295, 435), new Point(235, 435), new Point(235, 510));
+               new GUIWire(submodelModifiable, andB00  .getPin("Y4"), andorB01.getPin("C4"), new Point(290, 410), new Point(290, 430), new Point(230, 430), new Point(230, 520));
+               new GUIWire(submodelModifiable, andorB01.getPin("Y1"), andorB10.getPin("C1"), new Point(305, 490), new Point(305, 595), new Point(245, 595), new Point(245, 640));
+               new GUIWire(submodelModifiable, andorB01.getPin("Y2"), andorB10.getPin("C2"), new Point(300, 500), new Point(300, 590), new Point(240, 590), new Point(240, 650));
+               new GUIWire(submodelModifiable, andorB01.getPin("Y3"), andorB10.getPin("C3"), new Point(295, 510), new Point(295, 585), new Point(235, 585), new Point(235, 660));
+               new GUIWire(submodelModifiable, andorB01.getPin("Y4"), andorB10.getPin("C4"), new Point(290, 520), new Point(290, 580), new Point(230, 580), new Point(230, 670));
+               new GUIWire(submodelModifiable, andorB10.getPin("Y1"), andorB11.getPin("C1"), new Point(305, 640), new Point(305, 745), new Point(245, 745), new Point(245, 790));
+               new GUIWire(submodelModifiable, andorB10.getPin("Y2"), andorB11.getPin("C2"), new Point(300, 650), new Point(300, 740), new Point(240, 740), new Point(240, 800));
+               new GUIWire(submodelModifiable, andorB10.getPin("Y3"), andorB11.getPin("C3"), new Point(295, 660), new Point(295, 735), new Point(235, 735), new Point(235, 810));
+               new GUIWire(submodelModifiable, andorB10.getPin("Y4"), andorB11.getPin("C4"), new Point(290, 670), new Point(290, 730), new Point(230, 730), new Point(230, 820));
+               new GUIWire(submodelModifiable, andorB11.getPin("Y1"), QB1                           , new Point(330, 790), new Point(330, 450));
+               new GUIWire(submodelModifiable, andorB11.getPin("Y2"), QB2                           , new Point(335, 800), new Point(335, 550));
+               new GUIWire(submodelModifiable, andorB11.getPin("Y3"), QB3                           , new Point(340, 810), new Point(340, 650));
+               new GUIWire(submodelModifiable, andorB11.getPin("Y4"), QB4                           , new Point(345, 820), new Point(345, 750));
+               new GUIWire(submodelModifiable, andA00  .getPin("Y1"), andorA01.getPin("C1"), new Point(210, 330), new Point(210, 430), new Point(150, 430), new Point(150, 440));
+               new GUIWire(submodelModifiable, andA00  .getPin("Y2"), andorA01.getPin("C2"), new Point(205, 340), new Point(205, 425), new Point(145, 425), new Point(145, 450));
+               new GUIWire(submodelModifiable, andA00  .getPin("Y3"), andorA01.getPin("C3"), new Point(200, 350), new Point(200, 420), new Point(140, 420), new Point(140, 460));
+               new GUIWire(submodelModifiable, andA00  .getPin("Y4"), andorA01.getPin("C4"), new Point(195, 360), new Point(195, 415), new Point(135, 415), new Point(135, 470));
+               new GUIWire(submodelModifiable, andorA01.getPin("Y1"), andorA10.getPin("C1"), new Point(210, 440), new Point(210, 580), new Point(150, 580), new Point(150, 590));
+               new GUIWire(submodelModifiable, andorA01.getPin("Y2"), andorA10.getPin("C2"), new Point(205, 450), new Point(205, 575), new Point(145, 575), new Point(145, 600));
+               new GUIWire(submodelModifiable, andorA01.getPin("Y3"), andorA10.getPin("C3"), new Point(200, 460), new Point(200, 570), new Point(140, 570), new Point(140, 610));
+               new GUIWire(submodelModifiable, andorA01.getPin("Y4"), andorA10.getPin("C4"), new Point(195, 470), new Point(195, 565), new Point(135, 565), new Point(135, 620));
+               new GUIWire(submodelModifiable, andorA10.getPin("Y1"), andorA11.getPin("C1"), new Point(210, 590), new Point(210, 730), new Point(150, 730), new Point(150, 740));
+               new GUIWire(submodelModifiable, andorA10.getPin("Y2"), andorA11.getPin("C2"), new Point(205, 600), new Point(205, 725), new Point(145, 725), new Point(145, 750));
+               new GUIWire(submodelModifiable, andorA10.getPin("Y3"), andorA11.getPin("C3"), new Point(200, 610), new Point(200, 720), new Point(140, 720), new Point(140, 760));
+               new GUIWire(submodelModifiable, andorA10.getPin("Y4"), andorA11.getPin("C4"), new Point(195, 620), new Point(195, 715), new Point(135, 715), new Point(135, 770));
+               new GUIWire(submodelModifiable, andorA11.getPin("Y1"), QA1                           , new Point(210, 740), new Point(210, 880), new Point(310, 880), new Point(310,  50));
+               new GUIWire(submodelModifiable, andorA11.getPin("Y2"), QA2                           , new Point(205, 750), new Point(205, 885), new Point(315, 885), new Point(315, 150));
+               new GUIWire(submodelModifiable, andorA11.getPin("Y3"), QA3                           , new Point(200, 760), new Point(200, 890), new Point(320, 890), new Point(320, 250));
+               new GUIWire(submodelModifiable, andorA11.getPin("Y4"), QA4                           , new Point(195, 770), new Point(195, 895), new Point(325, 895), new Point(325, 350));
                //@formatter:on
        }
 }
\ No newline at end of file