ee82f0e737946f7e79d43b34e82eeaa52fc24acc
[Mograsim.git] / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / model / components / mi / nandbased / GUIram2.java
1 package net.mograsim.logic.model.model.components.mi.nandbased;
2
3 import java.util.Arrays;
4
5 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
6 import net.mograsim.logic.model.model.ViewModelModifiable;
7 import net.mograsim.logic.model.model.components.submodels.SimpleRectangularSubmodelComponent;
8 import net.mograsim.logic.model.model.wires.GUIWire;
9 import net.mograsim.logic.model.model.wires.Pin;
10 import net.mograsim.logic.model.model.wires.WireCrossPoint;
11 import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
12 import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.StandardHighLevelStateHandler;
13 import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.atomic.BitVectorSplittingAtomicHighLevelStateHandler;
14 import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.subcomponent.DelegatingSubcomponentHighLevelStateHandler;
15
16 public class GUIram2 extends SimpleRectangularSubmodelComponent
17 {
18         private StandardHighLevelStateHandler highLevelStateHandler;
19
20         public GUIram2(ViewModelModifiable model)
21         {
22                 this(model, null);
23         }
24
25         public GUIram2(ViewModelModifiable model, String name)
26         {
27                 super(model, 1, "GUIram2", name);
28                 setSubmodelScale(.1);
29                 setInputPins("A0", "A1", "B0", "B1", "WE", "D1", "D2", "D3", "D4");
30                 setOutputPins("QA1", "QA2", "QA3", "QA4", "QB1", "QB2", "QB3", "QB4");
31                 initSubmodelComponents();
32         }
33
34         @SuppressWarnings("unused") // for GUIWires being created
35         private void initSubmodelComponents()
36         {
37                 //@formatter:off
38                 Pin  A0 = getSubmodelPin("A0");
39                 Pin  A1 = getSubmodelPin("A1");
40                 Pin  B0 = getSubmodelPin("B0");
41                 Pin  B1 = getSubmodelPin("B1");
42                 Pin  WE = getSubmodelPin("WE");
43                 Pin  D1 = getSubmodelPin("D1");
44                 Pin  D2 = getSubmodelPin("D2");
45                 Pin  D3 = getSubmodelPin("D3");
46                 Pin  D4 = getSubmodelPin("D4");
47                 Pin QA1 = getSubmodelPin("QA1");
48                 Pin QA2 = getSubmodelPin("QA2");
49                 Pin QA3 = getSubmodelPin("QA3");
50                 Pin QA4 = getSubmodelPin("QA4");
51                 Pin QB1 = getSubmodelPin("QB1");
52                 Pin QB2 = getSubmodelPin("QB2");
53                 Pin QB3 = getSubmodelPin("QB3");
54                 Pin QB4 = getSubmodelPin("QB4");
55
56                 GUIdemux2   demuxA   = new GUIdemux2  (submodelModifiable);
57                 GUIdemux2   demuxB   = new GUIdemux2  (submodelModifiable);
58                 GUIand41    weAndB   = new GUIand41   (submodelModifiable);
59                 GUIdlatch4      cell00   = new GUIdlatch4 (submodelModifiable);
60                 GUIdlatch4      cell01   = new GUIdlatch4 (submodelModifiable);
61                 GUIdlatch4      cell10   = new GUIdlatch4 (submodelModifiable);
62                 GUIdlatch4      cell11   = new GUIdlatch4 (submodelModifiable);
63                 GUIand41    andA00   = new GUIand41   (submodelModifiable);
64                 GUIandor414 andorA01 = new GUIandor414(submodelModifiable);
65                 GUIandor414 andorA10 = new GUIandor414(submodelModifiable);
66                 GUIandor414 andorA11 = new GUIandor414(submodelModifiable);
67                 GUIand41    andB00   = new GUIand41   (submodelModifiable);
68                 GUIandor414 andorB01 = new GUIandor414(submodelModifiable);
69                 GUIandor414 andorB10 = new GUIandor414(submodelModifiable);
70                 GUIandor414 andorB11 = new GUIandor414(submodelModifiable);
71
72                 WireCrossPoint cpB00  = new WireCrossPoint(submodelModifiable, 1);
73                 WireCrossPoint cpB01  = new WireCrossPoint(submodelModifiable, 1);
74                 WireCrossPoint cpB10  = new WireCrossPoint(submodelModifiable, 1);
75                 WireCrossPoint cpB11  = new WireCrossPoint(submodelModifiable, 1);
76                 WireCrossPoint cpD1in = new WireCrossPoint(submodelModifiable, 1);
77                 WireCrossPoint cpD2in = new WireCrossPoint(submodelModifiable, 1);
78                 WireCrossPoint cpD3in = new WireCrossPoint(submodelModifiable, 1);
79                 WireCrossPoint cpD4in = new WireCrossPoint(submodelModifiable, 1);
80                 WireCrossPoint cpD101 = new WireCrossPoint(submodelModifiable, 1);
81                 WireCrossPoint cpD201 = new WireCrossPoint(submodelModifiable, 1);
82                 WireCrossPoint cpD301 = new WireCrossPoint(submodelModifiable, 1);
83                 WireCrossPoint cpD401 = new WireCrossPoint(submodelModifiable, 1);
84                 WireCrossPoint cpD110 = new WireCrossPoint(submodelModifiable, 1);
85                 WireCrossPoint cpD210 = new WireCrossPoint(submodelModifiable, 1);
86                 WireCrossPoint cpD310 = new WireCrossPoint(submodelModifiable, 1);
87                 WireCrossPoint cpD410 = new WireCrossPoint(submodelModifiable, 1);
88                 WireCrossPoint cpQ100 = new WireCrossPoint(submodelModifiable, 1);
89                 WireCrossPoint cpQ200 = new WireCrossPoint(submodelModifiable, 1);
90                 WireCrossPoint cpQ300 = new WireCrossPoint(submodelModifiable, 1);
91                 WireCrossPoint cpQ400 = new WireCrossPoint(submodelModifiable, 1);
92                 WireCrossPoint cpQ101 = new WireCrossPoint(submodelModifiable, 1);
93                 WireCrossPoint cpQ201 = new WireCrossPoint(submodelModifiable, 1);
94                 WireCrossPoint cpQ301 = new WireCrossPoint(submodelModifiable, 1);
95                 WireCrossPoint cpQ401 = new WireCrossPoint(submodelModifiable, 1);
96                 WireCrossPoint cpQ110 = new WireCrossPoint(submodelModifiable, 1);
97                 WireCrossPoint cpQ210 = new WireCrossPoint(submodelModifiable, 1);
98                 WireCrossPoint cpQ310 = new WireCrossPoint(submodelModifiable, 1);
99                 WireCrossPoint cpQ410 = new WireCrossPoint(submodelModifiable, 1);
100                 WireCrossPoint cpQ111 = new WireCrossPoint(submodelModifiable, 1);
101                 WireCrossPoint cpQ211 = new WireCrossPoint(submodelModifiable, 1);
102                 WireCrossPoint cpQ311 = new WireCrossPoint(submodelModifiable, 1);
103                 WireCrossPoint cpQ411 = new WireCrossPoint(submodelModifiable, 1);
104
105                 demuxA  .moveTo( 55,  45);
106                 demuxB  .moveTo( 55, 150);
107                 weAndB  .moveTo(130, 150);
108                 cell00  .moveTo( 55, 325);
109                 cell01  .moveTo( 55, 475);
110                 cell10  .moveTo( 55, 625);
111                 cell11  .moveTo( 55, 775);
112                 andA00  .moveTo(235, 375);
113                 andorA01.moveTo(235, 485);
114                 andorA10.moveTo(235, 635);
115                 andorA11.moveTo(235, 785);
116                 andB00  .moveTo(135, 325);
117                 andorB01.moveTo(135, 435);
118                 andorB10.moveTo(135, 585);
119                 andorB11.moveTo(135, 735);
120                 cpB00 .moveCenterTo(110, 155);
121                 cpB01 .moveCenterTo(105, 165);
122                 cpB10 .moveCenterTo(100, 175);
123                 cpB11 .moveCenterTo( 95, 185);
124                 cpD1in.moveCenterTo( 35, 550);
125                 cpD2in.moveCenterTo( 40, 650);
126                 cpD3in.moveCenterTo( 45, 750);
127                 cpD4in.moveCenterTo( 50, 810);
128                 cpD101.moveCenterTo( 35, 480);
129                 cpD201.moveCenterTo( 40, 490);
130                 cpD301.moveCenterTo( 45, 500);
131                 cpD401.moveCenterTo( 50, 510);
132                 cpD110.moveCenterTo( 35, 630);
133                 cpD210.moveCenterTo( 40, 640);
134                 cpD310.moveCenterTo( 45, 650);
135                 cpD410.moveCenterTo( 50, 660);
136                 cpQ100.moveCenterTo(130, 330);
137                 cpQ200.moveCenterTo(125, 340);
138                 cpQ300.moveCenterTo(120, 350);
139                 cpQ400.moveCenterTo(115, 360);
140                 cpQ101.moveCenterTo(130, 480);
141                 cpQ201.moveCenterTo(125, 490);
142                 cpQ301.moveCenterTo(120, 500);
143                 cpQ401.moveCenterTo(115, 510);
144                 cpQ110.moveCenterTo(130, 630);
145                 cpQ210.moveCenterTo(125, 640);
146                 cpQ310.moveCenterTo(120, 650);
147                 cpQ410.moveCenterTo(115, 660);
148                 cpQ111.moveCenterTo(130, 780);
149                 cpQ211.moveCenterTo(125, 790);
150                 cpQ311.moveCenterTo(120, 800);
151                 cpQ411.moveCenterTo(115, 810);
152
153                 new GUIWire(submodelModifiable, A0, demuxA.getPin("S0"), new Point[0]);
154                 new GUIWire(submodelModifiable, A1, demuxA.getPin("S1"), new Point(10, 150), new Point(10,  60));
155                 new GUIWire(submodelModifiable, B0, demuxB.getPin("S0"), new Point( 5, 250), new Point( 5, 155));
156                 new GUIWire(submodelModifiable, B1, demuxB.getPin("S1"), new Point(10, 350), new Point(10, 165));
157                 new GUIWire(submodelModifiable, demuxB.getPin("Y00"), cpB00, new Point[0]);
158                 new GUIWire(submodelModifiable, demuxB.getPin("Y01"), cpB01, new Point[0]);
159                 new GUIWire(submodelModifiable, demuxB.getPin("Y10"), cpB10, new Point[0]);
160                 new GUIWire(submodelModifiable, demuxB.getPin("Y11"), cpB11, new Point[0]);
161                 new GUIWire(submodelModifiable, cpB00, weAndB.getPin("A1"), new Point[0]);
162                 new GUIWire(submodelModifiable, cpB01, weAndB.getPin("A2"), new Point[0]);
163                 new GUIWire(submodelModifiable, cpB10, weAndB.getPin("A3"), new Point[0]);
164                 new GUIWire(submodelModifiable, cpB11, weAndB.getPin("A4"), new Point[0]);
165                 new GUIWire(submodelModifiable, WE, weAndB.getPin("B"), new Point(5, 450), new Point(5, 300), new Point(125, 300), new Point(125, 195));
166                 new GUIWire(submodelModifiable, weAndB.getPin("Y1"), cell00.getPin("C"), new Point(185, 155), new Point(185, 250), new Point(30, 250), new Point(30, 370));
167                 new GUIWire(submodelModifiable, weAndB.getPin("Y2"), cell01.getPin("C"), new Point(180, 165), new Point(180, 245), new Point(25, 245), new Point(25, 520));
168                 new GUIWire(submodelModifiable, weAndB.getPin("Y3"), cell10.getPin("C"), new Point(175, 175), new Point(175, 240), new Point(20, 240), new Point(20, 670));
169                 new GUIWire(submodelModifiable, weAndB.getPin("Y4"), cell11.getPin("C"), new Point(170, 185), new Point(170, 235), new Point(15, 235), new Point(15, 820));
170                 new GUIWire(submodelModifiable, D1, cpD1in                 , new Point[0]);
171                 new GUIWire(submodelModifiable, D2, cpD2in                 , new Point[0]);
172                 new GUIWire(submodelModifiable, D3, cpD3in                 , new Point[0]);
173                 new GUIWire(submodelModifiable, D4, cpD4in                 , new Point(50, 850));
174                 new GUIWire(submodelModifiable, cpD101, cell00.getPin("D1"), new Point(35, 330));
175                 new GUIWire(submodelModifiable, cpD201, cell00.getPin("D2"), new Point(40, 340));
176                 new GUIWire(submodelModifiable, cpD301, cell00.getPin("D3"), new Point(45, 350));
177                 new GUIWire(submodelModifiable, cpD401, cell00.getPin("D4"), new Point(50, 360));
178                 new GUIWire(submodelModifiable, cpD101, cell01.getPin("D1"), new Point[0]);
179                 new GUIWire(submodelModifiable, cpD201, cell01.getPin("D2"), new Point[0]);
180                 new GUIWire(submodelModifiable, cpD301, cell01.getPin("D3"), new Point[0]);
181                 new GUIWire(submodelModifiable, cpD401, cell01.getPin("D4"), new Point[0]);
182                 new GUIWire(submodelModifiable, cpD101, cpD1in             , new Point[0]);
183                 new GUIWire(submodelModifiable, cpD1in, cpD110             , new Point[0]);
184                 new GUIWire(submodelModifiable, cpD201, cpD210             , new Point[0]);
185                 new GUIWire(submodelModifiable, cpD301, cpD310             , new Point[0]);
186                 new GUIWire(submodelModifiable, cpD401, cpD410             , new Point[0]);
187                 new GUIWire(submodelModifiable, cpD110, cell10.getPin("D1"), new Point[0]);
188                 new GUIWire(submodelModifiable, cpD210, cell10.getPin("D2"), new Point[0]);
189                 new GUIWire(submodelModifiable, cpD310, cell10.getPin("D3"), new Point[0]);
190                 new GUIWire(submodelModifiable, cpD410, cell10.getPin("D4"), new Point[0]);
191                 new GUIWire(submodelModifiable, cpD210, cpD2in             , new Point[0]);
192                 new GUIWire(submodelModifiable, cpD310, cpD3in             , new Point[0]);
193                 new GUIWire(submodelModifiable, cpD410, cpD4in             , new Point[0]);
194                 new GUIWire(submodelModifiable, cpD110, cell11.getPin("D1"), new Point(35, 780));
195                 new GUIWire(submodelModifiable, cpD2in, cell11.getPin("D2"), new Point(40, 790));
196                 new GUIWire(submodelModifiable, cpD3in, cell11.getPin("D3"), new Point(45, 800));
197                 new GUIWire(submodelModifiable, cpD4in, cell11.getPin("D4"), new Point[0]);
198                 new GUIWire(submodelModifiable, cell00.getPin("Q1"), cpQ100, new Point[0]);
199                 new GUIWire(submodelModifiable, cell00.getPin("Q2"), cpQ200, new Point[0]);
200                 new GUIWire(submodelModifiable, cell00.getPin("Q3"), cpQ300, new Point[0]);
201                 new GUIWire(submodelModifiable, cell00.getPin("Q4"), cpQ400, new Point[0]);
202                 new GUIWire(submodelModifiable, cell01.getPin("Q1"), cpQ101, new Point[0]);
203                 new GUIWire(submodelModifiable, cell01.getPin("Q2"), cpQ201, new Point[0]);
204                 new GUIWire(submodelModifiable, cell01.getPin("Q3"), cpQ301, new Point[0]);
205                 new GUIWire(submodelModifiable, cell01.getPin("Q4"), cpQ401, new Point[0]);
206                 new GUIWire(submodelModifiable, cell10.getPin("Q1"), cpQ110, new Point[0]);
207                 new GUIWire(submodelModifiable, cell10.getPin("Q2"), cpQ210, new Point[0]);
208                 new GUIWire(submodelModifiable, cell10.getPin("Q3"), cpQ310, new Point[0]);
209                 new GUIWire(submodelModifiable, cell10.getPin("Q4"), cpQ410, new Point[0]);
210                 new GUIWire(submodelModifiable, cell11.getPin("Q1"), cpQ111, new Point[0]);
211                 new GUIWire(submodelModifiable, cell11.getPin("Q2"), cpQ211, new Point[0]);
212                 new GUIWire(submodelModifiable, cell11.getPin("Q3"), cpQ311, new Point[0]);
213                 new GUIWire(submodelModifiable, cell11.getPin("Q4"), cpQ411, new Point[0]);
214                 new GUIWire(submodelModifiable, demuxA.getPin("Y00"), andA00  .getPin("B"), new Point(210, 50), new Point(210, 420));
215                 new GUIWire(submodelModifiable, demuxA.getPin("Y01"), andorA01.getPin("B"), new Point(205, 60), new Point(205, 570));
216                 new GUIWire(submodelModifiable, demuxA.getPin("Y10"), andorA10.getPin("B"), new Point(200, 70), new Point(200, 720));
217                 new GUIWire(submodelModifiable, demuxA.getPin("Y11"), andorA11.getPin("B"), new Point(195, 80), new Point(195, 870));
218                 new GUIWire(submodelModifiable, cpB00 , andB00  .getPin("B"), new Point(110, 370));
219                 new GUIWire(submodelModifiable, cpB01 , andorB01.getPin("B"), new Point(105, 520));
220                 new GUIWire(submodelModifiable, cpB10 , andorB10.getPin("B"), new Point(100, 670));
221                 new GUIWire(submodelModifiable, cpB11 , andorB11.getPin("B"), new Point(95, 820));
222                 new GUIWire(submodelModifiable, cpQ100, andA00  .getPin("A1"), new Point(130, 380));
223                 new GUIWire(submodelModifiable, cpQ200, andA00  .getPin("A2"), new Point(125, 390));
224                 new GUIWire(submodelModifiable, cpQ300, andA00  .getPin("A3"), new Point(120, 400));
225                 new GUIWire(submodelModifiable, cpQ400, andA00  .getPin("A4"), new Point(115, 410));
226                 new GUIWire(submodelModifiable, cpQ101, andorA01.getPin("A1"), new Point(130, 530));
227                 new GUIWire(submodelModifiable, cpQ201, andorA01.getPin("A2"), new Point(125, 540));
228                 new GUIWire(submodelModifiable, cpQ301, andorA01.getPin("A3"), new Point(120, 550));
229                 new GUIWire(submodelModifiable, cpQ401, andorA01.getPin("A4"), new Point(115, 560));
230                 new GUIWire(submodelModifiable, cpQ110, andorA10.getPin("A1"), new Point(130, 680));
231                 new GUIWire(submodelModifiable, cpQ210, andorA10.getPin("A2"), new Point(125, 690));
232                 new GUIWire(submodelModifiable, cpQ310, andorA10.getPin("A3"), new Point(120, 700));
233                 new GUIWire(submodelModifiable, cpQ410, andorA10.getPin("A4"), new Point(115, 710));
234                 new GUIWire(submodelModifiable, cpQ111, andorA11.getPin("A1"), new Point(130, 830));
235                 new GUIWire(submodelModifiable, cpQ211, andorA11.getPin("A2"), new Point(125, 840));
236                 new GUIWire(submodelModifiable, cpQ311, andorA11.getPin("A3"), new Point(120, 850));
237                 new GUIWire(submodelModifiable, cpQ411, andorA11.getPin("A4"), new Point(115, 860));
238                 new GUIWire(submodelModifiable, cpQ100, andB00  .getPin("A1"), new Point[0]);
239                 new GUIWire(submodelModifiable, cpQ200, andB00  .getPin("A2"), new Point[0]);
240                 new GUIWire(submodelModifiable, cpQ300, andB00  .getPin("A3"), new Point[0]);
241                 new GUIWire(submodelModifiable, cpQ400, andB00  .getPin("A4"), new Point[0]);
242                 new GUIWire(submodelModifiable, cpQ101, andorB01.getPin("A1"), new Point[0]);
243                 new GUIWire(submodelModifiable, cpQ201, andorB01.getPin("A2"), new Point[0]);
244                 new GUIWire(submodelModifiable, cpQ301, andorB01.getPin("A3"), new Point[0]);
245                 new GUIWire(submodelModifiable, cpQ401, andorB01.getPin("A4"), new Point[0]);
246                 new GUIWire(submodelModifiable, cpQ110, andorB10.getPin("A1"), new Point[0]);
247                 new GUIWire(submodelModifiable, cpQ210, andorB10.getPin("A2"), new Point[0]);
248                 new GUIWire(submodelModifiable, cpQ310, andorB10.getPin("A3"), new Point[0]);
249                 new GUIWire(submodelModifiable, cpQ410, andorB10.getPin("A4"), new Point[0]);
250                 new GUIWire(submodelModifiable, cpQ111, andorB11.getPin("A1"), new Point[0]);
251                 new GUIWire(submodelModifiable, cpQ211, andorB11.getPin("A2"), new Point[0]);
252                 new GUIWire(submodelModifiable, cpQ311, andorB11.getPin("A3"), new Point[0]);
253                 new GUIWire(submodelModifiable, cpQ411, andorB11.getPin("A4"), new Point[0]);
254                 new GUIWire(submodelModifiable, andA00  .getPin("Y1"), andorA01.getPin("C1"), new Point(290, 380), new Point(290, 445), new Point(230, 445), new Point(230, 490));
255                 new GUIWire(submodelModifiable, andA00  .getPin("Y2"), andorA01.getPin("C2"), new Point(285, 390), new Point(285, 440), new Point(225, 440), new Point(225, 500));
256                 new GUIWire(submodelModifiable, andA00  .getPin("Y3"), andorA01.getPin("C3"), new Point(280, 400), new Point(280, 435), new Point(220, 435), new Point(220, 510));
257                 new GUIWire(submodelModifiable, andA00  .getPin("Y4"), andorA01.getPin("C4"), new Point(275, 410), new Point(275, 430), new Point(215, 430), new Point(215, 520));
258                 new GUIWire(submodelModifiable, andorA01.getPin("Y1"), andorA10.getPin("C1"), new Point(290, 490), new Point(290, 595), new Point(230, 595), new Point(230, 640));
259                 new GUIWire(submodelModifiable, andorA01.getPin("Y2"), andorA10.getPin("C2"), new Point(285, 500), new Point(285, 590), new Point(225, 590), new Point(225, 650));
260                 new GUIWire(submodelModifiable, andorA01.getPin("Y3"), andorA10.getPin("C3"), new Point(280, 510), new Point(280, 585), new Point(220, 585), new Point(220, 660));
261                 new GUIWire(submodelModifiable, andorA01.getPin("Y4"), andorA10.getPin("C4"), new Point(275, 520), new Point(275, 580), new Point(215, 580), new Point(215, 670));
262                 new GUIWire(submodelModifiable, andorA10.getPin("Y1"), andorA11.getPin("C1"), new Point(290, 640), new Point(290, 745), new Point(230, 745), new Point(230, 790));
263                 new GUIWire(submodelModifiable, andorA10.getPin("Y2"), andorA11.getPin("C2"), new Point(285, 650), new Point(285, 740), new Point(225, 740), new Point(225, 800));
264                 new GUIWire(submodelModifiable, andorA10.getPin("Y3"), andorA11.getPin("C3"), new Point(280, 660), new Point(280, 735), new Point(220, 735), new Point(220, 810));
265                 new GUIWire(submodelModifiable, andorA10.getPin("Y4"), andorA11.getPin("C4"), new Point(275, 670), new Point(275, 730), new Point(215, 730), new Point(215, 820));
266                 new GUIWire(submodelModifiable, andorA11.getPin("Y1"), QA1                           , new Point(300, 790), new Point(300,  50));
267                 new GUIWire(submodelModifiable, andorA11.getPin("Y2"), QA2                           , new Point(305, 800), new Point(305, 150));
268                 new GUIWire(submodelModifiable, andorA11.getPin("Y3"), QA3                           , new Point(310, 810), new Point(310, 250));
269                 new GUIWire(submodelModifiable, andorA11.getPin("Y4"), QA4                           , new Point(315, 820), new Point(315, 350));
270                 new GUIWire(submodelModifiable, andB00  .getPin("Y1"), andorB01.getPin("C1"), new Point(190, 330), new Point(190, 430), new Point(130, 430), new Point(130, 440));
271                 new GUIWire(submodelModifiable, andB00  .getPin("Y2"), andorB01.getPin("C2"), new Point(185, 340), new Point(185, 425), new Point(125, 425), new Point(125, 450));
272                 new GUIWire(submodelModifiable, andB00  .getPin("Y3"), andorB01.getPin("C3"), new Point(180, 350), new Point(180, 420), new Point(120, 420), new Point(120, 460));
273                 new GUIWire(submodelModifiable, andB00  .getPin("Y4"), andorB01.getPin("C4"), new Point(175, 360), new Point(175, 415), new Point(115, 415), new Point(115, 470));
274                 new GUIWire(submodelModifiable, andorB01.getPin("Y1"), andorB10.getPin("C1"), new Point(190, 440), new Point(190, 580), new Point(130, 580), new Point(130, 590));
275                 new GUIWire(submodelModifiable, andorB01.getPin("Y2"), andorB10.getPin("C2"), new Point(185, 450), new Point(185, 575), new Point(125, 575), new Point(125, 600));
276                 new GUIWire(submodelModifiable, andorB01.getPin("Y3"), andorB10.getPin("C3"), new Point(180, 460), new Point(180, 570), new Point(120, 570), new Point(120, 610));
277                 new GUIWire(submodelModifiable, andorB01.getPin("Y4"), andorB10.getPin("C4"), new Point(175, 470), new Point(175, 565), new Point(115, 565), new Point(115, 620));
278                 new GUIWire(submodelModifiable, andorB10.getPin("Y1"), andorB11.getPin("C1"), new Point(190, 590), new Point(190, 730), new Point(130, 730), new Point(130, 740));
279                 new GUIWire(submodelModifiable, andorB10.getPin("Y2"), andorB11.getPin("C2"), new Point(185, 600), new Point(185, 725), new Point(125, 725), new Point(125, 750));
280                 new GUIWire(submodelModifiable, andorB10.getPin("Y3"), andorB11.getPin("C3"), new Point(180, 610), new Point(180, 720), new Point(120, 720), new Point(120, 760));
281                 new GUIWire(submodelModifiable, andorB10.getPin("Y4"), andorB11.getPin("C4"), new Point(175, 620), new Point(175, 715), new Point(115, 715), new Point(115, 770));
282                 new GUIWire(submodelModifiable, andorB11.getPin("Y1"), QB1                           , new Point(190, 740), new Point(190, 880), new Point(325, 880), new Point(325, 450));
283                 new GUIWire(submodelModifiable, andorB11.getPin("Y2"), QB2                           , new Point(185, 750), new Point(185, 885), new Point(330, 885), new Point(330, 550));
284                 new GUIWire(submodelModifiable, andorB11.getPin("Y3"), QB3                           , new Point(180, 760), new Point(180, 890), new Point(335, 890), new Point(335, 650));
285                 new GUIWire(submodelModifiable, andorB11.getPin("Y4"), QB4                           , new Point(175, 770), new Point(175, 895), new Point(340, 895), new Point(340, 750));
286                 //@formatter:on
287
288                 highLevelStateHandler = new StandardHighLevelStateHandler(this);
289                 highLevelStateHandler.addSubcomponentHighLevelState("c00", DelegatingSubcomponentHighLevelStateHandler::new).set(cell00, null);
290                 highLevelStateHandler.addSubcomponentHighLevelState("c01", DelegatingSubcomponentHighLevelStateHandler::new).set(cell01, null);
291                 highLevelStateHandler.addSubcomponentHighLevelState("c10", DelegatingSubcomponentHighLevelStateHandler::new).set(cell10, null);
292                 highLevelStateHandler.addSubcomponentHighLevelState("c11", DelegatingSubcomponentHighLevelStateHandler::new).set(cell11, null);
293                 highLevelStateHandler.addAtomicHighLevelState("q", BitVectorSplittingAtomicHighLevelStateHandler::new)
294                                 .set(Arrays.asList("c00.q", "c01.q", "c10.q", "c11.q"), Arrays.asList(4, 4, 4, 4));
295         }
296
297         @Override
298         public Object getHighLevelState(String stateID)
299         {
300                 return highLevelStateHandler.getHighLevelState(stateID);
301         }
302
303         @Override
304         public void setHighLevelState(String stateID, Object newState)
305         {
306                 highLevelStateHandler.setHighLevelState(stateID, newState);
307         }
308
309         static
310         {
311                 IndirectGUIComponentCreator.setComponentSupplier(GUIram2.class.getCanonicalName(), (m, p, n) -> new GUIram2(m, n));
312         }
313 }