From: Fabian Stemmler Date: Wed, 11 Sep 2019 15:11:45 +0000 (+0200) Subject: Merge branch 'development' of https://gitlab.lrz.de/lrr-tum/students/eragp-misim... X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=662fb8ae0007c317aa210b1de50499b47f38477a;hp=3cbdb0a536ea979bcc658840d7c556beaff82ecb;p=Mograsim.git Merge branch 'development' of https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into development --- diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json index 7afc8a7a..dbca8f24 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json @@ -157,94 +157,118 @@ } }, { - "id": "Merger", - "name": "Merger#0", + "id": "NandGate", + "name": "NandGate#0", "pos": { - "x": 235.0, - "y": 56.0 + "x": 255.0, + "y": 495.0 }, - "params": 8 + "params": 1 }, { - "id": "Merger", - "name": "Merger#1", + "id": "NandGate", + "name": "NandGate#1", "pos": { - "x": 235.0, - "y": 136.0 + "x": 270.0, + "y": 550.0 }, - "params": 4 + "params": 1 }, { - "id": "Merger", - "name": "Merger#2", + "id": "Splitter", + "name": "Splitter#0", "pos": { - "x": 235.0, - "y": 176.0 + "x": 215.0, + "y": 56.0 }, - "params": 4 + "params": { + "logicWidth": 16, + "orientation": "RIGHT" + } }, { - "id": "Merger", - "name": "Merger#3", + "id": "Splitter", + "name": "Splitter#1", "pos": { - "x": 360.0, - "y": 20.0 + "x": 305.0, + "y": 30.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { - "id": "Merger", - "name": "Merger#4", + "id": "Splitter", + "name": "Splitter#10", "pos": { - "x": 360.0, - "y": 125.0 + "x": 600.0, + "y": 395.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { - "id": "NandGate", - "name": "NandGate#0", + "id": "Splitter", + "name": "Splitter#11", "pos": { - "x": 255.0, - "y": 495.0 + "x": 235.0, + "y": 56.0 }, - "params": 1 + "params": { + "logicWidth": 8, + "orientation": "LEFT" + } }, { - "id": "NandGate", - "name": "NandGate#1", + "id": "Splitter", + "name": "Splitter#12", "pos": { - "x": 270.0, - "y": 550.0 + "x": 235.0, + "y": 136.0 }, - "params": 1 + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "Splitter", - "name": "Splitter#0", + "name": "Splitter#13", "pos": { - "x": 215.0, - "y": 56.0 + "x": 235.0, + "y": 176.0 }, - "params": 16 + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "Splitter", - "name": "Splitter#1", + "name": "Splitter#14", "pos": { - "x": 305.0, - "y": 30.0 + "x": 360.0, + "y": 20.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "Splitter", - "name": "Splitter#10", + "name": "Splitter#15", "pos": { - "x": 600.0, - "y": 395.0 + "x": 360.0, + "y": 125.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "Splitter", @@ -253,7 +277,10 @@ "x": 305.0, "y": 135.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -262,7 +289,10 @@ "x": 405.0, "y": 395.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -271,7 +301,10 @@ "x": 405.0, "y": 435.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -280,7 +313,10 @@ "x": 470.0, "y": 395.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -289,7 +325,10 @@ "x": 470.0, "y": 435.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -298,7 +337,10 @@ "x": 535.0, "y": 435.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -307,7 +349,10 @@ "x": 535.0, "y": 395.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -316,7 +361,10 @@ "x": 600.0, "y": 435.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "WireCrossPoint", @@ -377,9 +425,9 @@ "name": "WireCrossPoint#14", "pos": { "x": 354.0, - "y": 504.0 + "y": 509.0 }, - "params": 12 + "params": 16 }, { "id": "WireCrossPoint", @@ -477,14 +525,6 @@ "y": 526.0 } }, - { - "id": "dff12_we", - "name": "dff12_we#0", - "pos": { - "x": 290.0, - "y": 485.0 - } - }, { "id": "dff16_invwe", "name": "dff16_invwe#0", @@ -494,16 +534,25 @@ } }, { - "id": "inc12", - "name": "inc12#0", + "id": "dff16_we", + "name": "dff16_we#0", + "pos": { + "x": 290.0, + "y": 485.0 + } + }, + { + "id": "inc", + "name": "inc#0", "pos": { "x": 245.0, "y": 525.0 - } + }, + "params": 16 }, { - "id": "mux1_12", - "name": "mux1_12#0", + "id": "mux1_16", + "name": "mux1_16#0", "pos": { "x": 170.0, "y": 495.0 @@ -733,8 +782,8 @@ }, { "pin1": { - "compName": "Merger#3", - "pinName": "O" + "compName": "Splitter#14", + "pinName": "I" }, "pin2": { "compName": "WireCrossPoint#10", @@ -749,8 +798,8 @@ "pinName": "" }, "pin2": { - "compName": "Merger#4", - "pinName": "O" + "compName": "Splitter#15", + "pinName": "I" }, "name": "unnamedWire#114", "path": [] @@ -917,7 +966,7 @@ "pinName": "Y" }, "pin2": { - "compName": "dff12_we#0", + "compName": "dff16_we#0", "pinName": "WE" }, "name": "unnamedWire#127", @@ -925,11 +974,11 @@ }, { "pin1": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "Y" }, "pin2": { - "compName": "dff12_we#0", + "compName": "dff16_we#0", "pinName": "D" }, "name": "unnamedWire#128", @@ -937,11 +986,11 @@ }, { "pin1": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "A" }, "pin2": { - "compName": "mux1_12#0", + "compName": "mux1_16#0", "pinName": "Y" }, "name": "unnamedWire#129", @@ -961,7 +1010,7 @@ }, { "pin1": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "CI" }, "pin2": { @@ -1009,7 +1058,7 @@ }, { "pin1": { - "compName": "mux1_12#0", + "compName": "mux1_16#0", "pinName": "I1" }, "pin2": { @@ -1021,7 +1070,7 @@ }, { "pin1": { - "compName": "mux1_12#0", + "compName": "mux1_16#0", "pinName": "S" }, "pin2": { @@ -1045,26 +1094,14 @@ }, { "pin1": { - "compName": "WireCrossPoint#14", - "pinName": "" - }, - "pin2": { - "compName": "WireCrossPoint#14", - "pinName": "" - }, - "name": "unnamedWire#137", - "path": [] - }, - { - "pin1": { - "compName": "dff12_we#0", + "compName": "dff16_we#0", "pinName": "Q" }, "pin2": { "compName": "WireCrossPoint#14", "pinName": "" }, - "name": "unnamedWire#138", + "name": "unnamedWire#137", "path": [] }, { @@ -1493,16 +1530,16 @@ "pinName": "O15" }, "pin2": { - "compName": "Merger#0", - "pinName": "I7" + "compName": "Splitter#11", + "pinName": "O7" }, "name": "unnamedWire#46", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I6" + "compName": "Splitter#11", + "pinName": "O6" }, "pin2": { "compName": "Splitter#0", @@ -1517,16 +1554,16 @@ "pinName": "O13" }, "pin2": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#11", + "pinName": "O5" }, "name": "unnamedWire#48", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#11", + "pinName": "O4" }, "pin2": { "compName": "Splitter#0", @@ -1553,8 +1590,8 @@ "pinName": "O11" }, "pin2": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#11", + "pinName": "O3" }, "name": "unnamedWire#50", "path": [] @@ -1565,16 +1602,16 @@ "pinName": "O10" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#11", + "pinName": "O2" }, "name": "unnamedWire#51", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#11", + "pinName": "O1" }, "pin2": { "compName": "Splitter#0", @@ -1589,8 +1626,8 @@ "pinName": "O8" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#11", + "pinName": "O0" }, "name": "unnamedWire#53", "path": [] @@ -1618,8 +1655,8 @@ "pinName": "" }, "pin2": { - "compName": "Merger#1", - "pinName": "I3" + "compName": "Splitter#12", + "pinName": "O3" }, "name": "unnamedWire#55", "path": [ @@ -1635,16 +1672,16 @@ "pinName": "" }, "pin2": { - "compName": "Merger#2", - "pinName": "I3" + "compName": "Splitter#13", + "pinName": "O3" }, "name": "unnamedWire#56", "path": [] }, { "pin1": { - "compName": "Merger#2", - "pinName": "I2" + "compName": "Splitter#13", + "pinName": "O2" }, "pin2": { "compName": "Splitter#0", @@ -1659,16 +1696,16 @@ "pinName": "O1" }, "pin2": { - "compName": "Merger#2", - "pinName": "I1" + "compName": "Splitter#13", + "pinName": "O1" }, "name": "unnamedWire#58", "path": [] }, { "pin1": { - "compName": "Merger#2", - "pinName": "I0" + "compName": "Splitter#13", + "pinName": "O0" }, "pin2": { "compName": "Splitter#0", @@ -1691,8 +1728,8 @@ }, { "pin1": { - "compName": "Merger#1", - "pinName": "I0" + "compName": "Splitter#12", + "pinName": "O0" }, "pin2": { "compName": "Splitter#0", @@ -1707,16 +1744,16 @@ "pinName": "O5" }, "pin2": { - "compName": "Merger#1", - "pinName": "I1" + "compName": "Splitter#12", + "pinName": "O1" }, "name": "unnamedWire#61", "path": [] }, { "pin1": { - "compName": "Merger#1", - "pinName": "I2" + "compName": "Splitter#12", + "pinName": "O2" }, "pin2": { "compName": "Splitter#0", @@ -1835,8 +1872,8 @@ }, { "pin1": { - "compName": "Merger#2", - "pinName": "O" + "compName": "Splitter#13", + "pinName": "I" }, "pin2": { "compName": "Splitter#2", @@ -1847,8 +1884,8 @@ }, { "pin1": { - "compName": "Merger#1", - "pinName": "O" + "compName": "Splitter#12", + "pinName": "I" }, "pin2": { "compName": "Splitter#1", @@ -1863,16 +1900,16 @@ "pinName": "Y1" }, "pin2": { - "compName": "Merger#3", - "pinName": "I3" + "compName": "Splitter#14", + "pinName": "O3" }, "name": "unnamedWire#73", "path": [] }, { "pin1": { - "compName": "Merger#3", - "pinName": "I2" + "compName": "Splitter#14", + "pinName": "O2" }, "pin2": { "compName": "mux1_4#0", @@ -1887,16 +1924,16 @@ "pinName": "Y3" }, "pin2": { - "compName": "Merger#3", - "pinName": "I1" + "compName": "Splitter#14", + "pinName": "O1" }, "name": "unnamedWire#75", "path": [] }, { "pin1": { - "compName": "Merger#3", - "pinName": "I0" + "compName": "Splitter#14", + "pinName": "O0" }, "pin2": { "compName": "mux1_4#0", @@ -1911,16 +1948,16 @@ "pinName": "Y1" }, "pin2": { - "compName": "Merger#4", - "pinName": "I3" + "compName": "Splitter#15", + "pinName": "O3" }, "name": "unnamedWire#77", "path": [] }, { "pin1": { - "compName": "Merger#4", - "pinName": "I2" + "compName": "Splitter#15", + "pinName": "O2" }, "pin2": { "compName": "mux1_4#1", @@ -1935,8 +1972,8 @@ "pinName": "Y3" }, "pin2": { - "compName": "Merger#4", - "pinName": "I1" + "compName": "Splitter#15", + "pinName": "O1" }, "name": "unnamedWire#79", "path": [] @@ -1955,8 +1992,8 @@ }, { "pin1": { - "compName": "Merger#4", - "pinName": "I0" + "compName": "Splitter#15", + "pinName": "O0" }, "pin2": { "compName": "mux1_4#1", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901.json index 6f0ac00f..de38b1a0 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901.json @@ -424,15 +424,6 @@ { "id": "WireCrossPoint", "name": "WireCrossPoint#10", - "pos": { - "x": 334.0, - "y": 394.0 - }, - "params": 1 - }, - { - "id": "WireCrossPoint", - "name": "WireCrossPoint#11", "pos": { "x": 229.0, "y": 909.0 @@ -441,7 +432,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#12", + "name": "WireCrossPoint#11", "pos": { "x": 234.0, "y": 919.0 @@ -450,7 +441,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#13", + "name": "WireCrossPoint#12", "pos": { "x": 239.0, "y": 929.0 @@ -459,7 +450,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#14", + "name": "WireCrossPoint#13", "pos": { "x": 244.0, "y": 939.0 @@ -468,7 +459,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#15", + "name": "WireCrossPoint#14", "pos": { "x": 319.0, "y": 909.0 @@ -477,7 +468,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#16", + "name": "WireCrossPoint#15", "pos": { "x": 334.0, "y": 939.0 @@ -486,7 +477,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#17", + "name": "WireCrossPoint#16", "pos": { "x": 134.0, "y": 1039.0 @@ -495,7 +486,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#18", + "name": "WireCrossPoint#17", "pos": { "x": 139.0, "y": 1049.0 @@ -504,7 +495,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#19", + "name": "WireCrossPoint#18", "pos": { "x": 379.0, "y": 529.0 @@ -513,7 +504,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#20", + "name": "WireCrossPoint#19", "pos": { "x": 394.0, "y": 544.0 @@ -522,7 +513,16 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#21", + "name": "WireCrossPoint#2", + "pos": { + "x": 254.0, + "y": 749.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#20", "pos": { "x": 434.0, "y": 734.0 @@ -531,7 +531,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#22", + "name": "WireCrossPoint#21", "pos": { "x": 354.0, "y": 504.0 @@ -540,7 +540,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#23", + "name": "WireCrossPoint#22", "pos": { "x": 359.0, "y": 509.0 @@ -549,7 +549,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#24", + "name": "WireCrossPoint#23", "pos": { "x": 364.0, "y": 514.0 @@ -558,7 +558,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#25", + "name": "WireCrossPoint#24", "pos": { "x": 369.0, "y": 519.0 @@ -567,7 +567,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#26", + "name": "WireCrossPoint#25", "pos": { "x": 354.0, "y": 449.0 @@ -576,7 +576,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#27", + "name": "WireCrossPoint#26", "pos": { "x": 359.0, "y": 459.0 @@ -585,7 +585,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#28", + "name": "WireCrossPoint#27", "pos": { "x": 364.0, "y": 469.0 @@ -594,7 +594,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#29", + "name": "WireCrossPoint#28", "pos": { "x": 369.0, "y": 479.0 @@ -603,25 +603,25 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#3", + "name": "WireCrossPoint#29", "pos": { - "x": 254.0, - "y": 749.0 + "x": 104.0, + "y": 769.0 }, "params": 1 }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#30", + "name": "WireCrossPoint#3", "pos": { - "x": 104.0, - "y": 769.0 + "x": 134.0, + "y": 729.0 }, "params": 1 }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#31", + "name": "WireCrossPoint#30", "pos": { "x": 109.0, "y": 779.0 @@ -630,7 +630,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#32", + "name": "WireCrossPoint#31", "pos": { "x": 114.0, "y": 789.0 @@ -639,7 +639,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#33", + "name": "WireCrossPoint#32", "pos": { "x": 109.0, "y": 809.0 @@ -648,7 +648,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#34", + "name": "WireCrossPoint#33", "pos": { "x": 114.0, "y": 819.0 @@ -657,7 +657,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#35", + "name": "WireCrossPoint#34", "pos": { "x": 119.0, "y": 829.0 @@ -666,7 +666,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#36", + "name": "WireCrossPoint#35", "pos": { "x": 104.0, "y": 799.0 @@ -675,7 +675,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#37", + "name": "WireCrossPoint#36", "pos": { "x": 109.0, "y": 839.0 @@ -684,7 +684,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#38", + "name": "WireCrossPoint#37", "pos": { "x": 114.0, "y": 849.0 @@ -693,7 +693,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#39", + "name": "WireCrossPoint#38", "pos": { "x": 119.0, "y": 859.0 @@ -702,25 +702,25 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#4", + "name": "WireCrossPoint#39", "pos": { - "x": 134.0, - "y": 729.0 + "x": 414.0, + "y": 449.0 }, "params": 1 }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#40", + "name": "WireCrossPoint#4", "pos": { - "x": 414.0, - "y": 449.0 + "x": 129.0, + "y": 739.0 }, "params": 1 }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#41", + "name": "WireCrossPoint#40", "pos": { "x": 99.0, "y": 964.0 @@ -729,7 +729,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#42", + "name": "WireCrossPoint#41", "pos": { "x": 99.0, "y": 764.0 @@ -738,7 +738,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#44", + "name": "WireCrossPoint#42", "pos": { "x": 124.0, "y": 889.0 @@ -747,7 +747,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#45", + "name": "WireCrossPoint#43", "pos": { "x": 364.0, "y": 889.0 @@ -756,7 +756,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#46", + "name": "WireCrossPoint#44", "pos": { "x": 134.0, "y": 894.0 @@ -765,7 +765,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#47", + "name": "WireCrossPoint#45", "pos": { "x": 409.0, "y": 894.0 @@ -774,7 +774,7 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#48", + "name": "WireCrossPoint#46", "pos": { "x": 424.0, "y": 1079.0 @@ -785,8 +785,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#5", "pos": { - "x": 129.0, - "y": 739.0 + "x": 124.0, + "y": 749.0 }, "params": 1 }, @@ -794,8 +794,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#6", "pos": { - "x": 124.0, - "y": 749.0 + "x": 349.0, + "y": 364.0 }, "params": 1 }, @@ -803,8 +803,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#7", "pos": { - "x": 349.0, - "y": 364.0 + "x": 344.0, + "y": 374.0 }, "params": 1 }, @@ -812,8 +812,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#8", "pos": { - "x": 344.0, - "y": 374.0 + "x": 339.0, + "y": 384.0 }, "params": 1 }, @@ -821,8 +821,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#9", "pos": { - "x": 339.0, - "y": 384.0 + "x": 334.0, + "y": 394.0 }, "params": 1 }, @@ -985,7 +985,7 @@ "pinName": "F3" }, "pin2": { - "compName": "WireCrossPoint#24", + "compName": "WireCrossPoint#23", "pinName": "" }, "name": "unnamedWire#100", @@ -1010,11 +1010,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#19", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#25", + "compName": "WireCrossPoint#24", "pinName": "" }, "name": "unnamedWire#101", @@ -1027,11 +1027,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#22", + "compName": "WireCrossPoint#21", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#26", + "compName": "WireCrossPoint#25", "pinName": "" }, "name": "unnamedWire#102", @@ -1039,11 +1039,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#23", + "compName": "WireCrossPoint#22", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#27", + "compName": "WireCrossPoint#26", "pinName": "" }, "name": "unnamedWire#103", @@ -1051,11 +1051,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#24", + "compName": "WireCrossPoint#23", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#28", + "compName": "WireCrossPoint#27", "pinName": "" }, "name": "unnamedWire#104", @@ -1063,11 +1063,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#25", + "compName": "WireCrossPoint#24", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#29", + "compName": "WireCrossPoint#28", "pinName": "" }, "name": "unnamedWire#105", @@ -1075,7 +1075,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#26", + "compName": "WireCrossPoint#25", "pinName": "" }, "pin2": { @@ -1087,7 +1087,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#27", + "compName": "WireCrossPoint#26", "pinName": "" }, "pin2": { @@ -1099,7 +1099,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#28", + "compName": "WireCrossPoint#27", "pinName": "" }, "pin2": { @@ -1111,7 +1111,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#29", + "compName": "WireCrossPoint#28", "pinName": "" }, "pin2": { @@ -1135,7 +1135,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#26", + "compName": "WireCrossPoint#25", "pinName": "" }, "pin2": { @@ -1152,7 +1152,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#27", + "compName": "WireCrossPoint#26", "pinName": "" }, "pin2": { @@ -1169,7 +1169,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#28", + "compName": "WireCrossPoint#27", "pinName": "" }, "pin2": { @@ -1186,7 +1186,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#29", + "compName": "WireCrossPoint#28", "pinName": "" }, "pin2": { @@ -1203,11 +1203,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#22", + "compName": "WireCrossPoint#21", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#30", + "compName": "WireCrossPoint#29", "pinName": "" }, "name": "unnamedWire#114", @@ -1220,11 +1220,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#23", + "compName": "WireCrossPoint#22", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#31", + "compName": "WireCrossPoint#30", "pinName": "" }, "name": "unnamedWire#115", @@ -1237,11 +1237,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#24", + "compName": "WireCrossPoint#23", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#32", + "compName": "WireCrossPoint#31", "pinName": "" }, "name": "unnamedWire#116", @@ -1258,7 +1258,7 @@ "pinName": "A1" }, "pin2": { - "compName": "WireCrossPoint#41", + "compName": "WireCrossPoint#40", "pinName": "" }, "name": "unnamedWire#117", @@ -1271,7 +1271,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#30", + "compName": "WireCrossPoint#29", "pinName": "" }, "pin2": { @@ -1283,7 +1283,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#31", + "compName": "WireCrossPoint#30", "pinName": "" }, "pin2": { @@ -1312,7 +1312,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#32", + "compName": "WireCrossPoint#31", "pinName": "" }, "pin2": { @@ -1324,11 +1324,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#31", + "compName": "WireCrossPoint#30", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#33", + "compName": "WireCrossPoint#32", "pinName": "" }, "name": "unnamedWire#121", @@ -1336,11 +1336,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#32", + "compName": "WireCrossPoint#31", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#34", + "compName": "WireCrossPoint#33", "pinName": "" }, "name": "unnamedWire#122", @@ -1348,11 +1348,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#25", + "compName": "WireCrossPoint#24", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#35", + "compName": "WireCrossPoint#34", "pinName": "" }, "name": "unnamedWire#123", @@ -1365,11 +1365,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#30", + "compName": "WireCrossPoint#29", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#36", + "compName": "WireCrossPoint#35", "pinName": "" }, "name": "unnamedWire#124", @@ -1377,7 +1377,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#36", + "compName": "WireCrossPoint#35", "pinName": "" }, "pin2": { @@ -1389,7 +1389,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#33", + "compName": "WireCrossPoint#32", "pinName": "" }, "pin2": { @@ -1401,7 +1401,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#34", + "compName": "WireCrossPoint#33", "pinName": "" }, "pin2": { @@ -1413,7 +1413,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#35", + "compName": "WireCrossPoint#34", "pinName": "" }, "pin2": { @@ -1425,11 +1425,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#33", + "compName": "WireCrossPoint#32", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#37", + "compName": "WireCrossPoint#36", "pinName": "" }, "name": "unnamedWire#129", @@ -1441,7 +1441,7 @@ "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#3", + "compName": "WireCrossPoint#2", "pinName": "" }, "name": "unnamedWire#13", @@ -1458,11 +1458,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#34", + "compName": "WireCrossPoint#33", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#38", + "compName": "WireCrossPoint#37", "pinName": "" }, "name": "unnamedWire#130", @@ -1470,11 +1470,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#35", + "compName": "WireCrossPoint#34", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#39", + "compName": "WireCrossPoint#38", "pinName": "" }, "name": "unnamedWire#131", @@ -1482,7 +1482,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#37", + "compName": "WireCrossPoint#36", "pinName": "" }, "pin2": { @@ -1494,7 +1494,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#38", + "compName": "WireCrossPoint#37", "pinName": "" }, "pin2": { @@ -1506,7 +1506,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#39", + "compName": "WireCrossPoint#38", "pinName": "" }, "pin2": { @@ -1518,7 +1518,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#16", + "compName": "WireCrossPoint#15", "pinName": "" }, "pin2": { @@ -1530,7 +1530,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#36", + "compName": "WireCrossPoint#35", "pinName": "" }, "pin2": { @@ -1547,7 +1547,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#37", + "compName": "WireCrossPoint#36", "pinName": "" }, "pin2": { @@ -1564,7 +1564,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#38", + "compName": "WireCrossPoint#37", "pinName": "" }, "pin2": { @@ -1581,7 +1581,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#39", + "compName": "WireCrossPoint#38", "pinName": "" }, "pin2": { @@ -1598,7 +1598,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#3", + "compName": "WireCrossPoint#2", "pinName": "" }, "pin2": { @@ -1933,7 +1933,7 @@ "pinName": "Y" }, "pin2": { - "compName": "WireCrossPoint#40", + "compName": "WireCrossPoint#39", "pinName": "" }, "name": "unnamedWire#153", @@ -1941,7 +1941,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#40", + "compName": "WireCrossPoint#39", "pinName": "" }, "pin2": { @@ -1958,7 +1958,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#40", + "compName": "WireCrossPoint#39", "pinName": "" }, "pin2": { @@ -2004,7 +2004,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#41", + "compName": "WireCrossPoint#40", "pinName": "" }, "pin2": { @@ -2029,7 +2029,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#19", + "compName": "WireCrossPoint#18", "pinName": "" }, "pin2": { @@ -2041,7 +2041,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#3", + "compName": "WireCrossPoint#2", "pinName": "" }, "pin2": { @@ -2058,7 +2058,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#42", + "compName": "WireCrossPoint#41", "pinName": "" }, "pin2": { @@ -2075,7 +2075,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#42", + "compName": "WireCrossPoint#41", "pinName": "" }, "pin2": { @@ -2096,7 +2096,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#19", "pinName": "" }, "pin2": { @@ -2117,11 +2117,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#44", + "compName": "WireCrossPoint#42", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#6", + "compName": "WireCrossPoint#5", "pinName": "" }, "name": "unnamedWire#164", @@ -2129,7 +2129,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#45", + "compName": "WireCrossPoint#43", "pinName": "" }, "pin2": { @@ -2150,7 +2150,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#45", + "compName": "WireCrossPoint#43", "pinName": "" }, "pin2": { @@ -2162,11 +2162,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#45", + "compName": "WireCrossPoint#43", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#44", + "compName": "WireCrossPoint#42", "pinName": "" }, "name": "unnamedWire#167", @@ -2174,11 +2174,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#46", + "compName": "WireCrossPoint#44", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#4", + "compName": "WireCrossPoint#3", "pinName": "" }, "name": "unnamedWire#168", @@ -2186,11 +2186,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#46", + "compName": "WireCrossPoint#44", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#47", + "compName": "WireCrossPoint#45", "pinName": "" }, "name": "unnamedWire#169", @@ -2198,7 +2198,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#3", + "compName": "WireCrossPoint#2", "pinName": "" }, "pin2": { @@ -2227,7 +2227,7 @@ "pinName": "EN" }, "pin2": { - "compName": "WireCrossPoint#47", + "compName": "WireCrossPoint#45", "pinName": "" }, "name": "unnamedWire#170", @@ -2235,7 +2235,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#19", "pinName": "" }, "pin2": { @@ -2256,7 +2256,7 @@ "pinName": "C4" }, "pin2": { - "compName": "WireCrossPoint#48", + "compName": "WireCrossPoint#46", "pinName": "" }, "name": "unnamedWire#172", @@ -2273,7 +2273,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#48", + "compName": "WireCrossPoint#46", "pinName": "" }, "pin2": { @@ -2290,7 +2290,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#48", + "compName": "WireCrossPoint#46", "pinName": "" }, "pin2": { @@ -2311,7 +2311,7 @@ "pinName": "LSH" }, "pin2": { - "compName": "WireCrossPoint#4", + "compName": "WireCrossPoint#3", "pinName": "" }, "name": "unnamedWire#18", @@ -2336,7 +2336,7 @@ "pinName": "NSH" }, "pin2": { - "compName": "WireCrossPoint#5", + "compName": "WireCrossPoint#4", "pinName": "" }, "name": "unnamedWire#19", @@ -2390,7 +2390,7 @@ "pinName": "RSH" }, "pin2": { - "compName": "WireCrossPoint#6", + "compName": "WireCrossPoint#5", "pinName": "" }, "name": "unnamedWire#20", @@ -2411,7 +2411,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#4", + "compName": "WireCrossPoint#3", "pinName": "" }, "pin2": { @@ -2423,7 +2423,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#5", + "compName": "WireCrossPoint#4", "pinName": "" }, "pin2": { @@ -2435,7 +2435,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#6", + "compName": "WireCrossPoint#5", "pinName": "" }, "pin2": { @@ -2447,7 +2447,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#46", + "compName": "WireCrossPoint#44", "pinName": "" }, "pin2": { @@ -2464,7 +2464,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#5", + "compName": "WireCrossPoint#4", "pinName": "" }, "pin2": { @@ -2485,7 +2485,7 @@ "pinName": "SC" }, "pin2": { - "compName": "WireCrossPoint#44", + "compName": "WireCrossPoint#42", "pinName": "" }, "name": "unnamedWire#26", @@ -3057,7 +3057,7 @@ "pinName": "Q1" }, "pin2": { - "compName": "WireCrossPoint#7", + "compName": "WireCrossPoint#6", "pinName": "" }, "name": "unnamedWire#48", @@ -3082,7 +3082,7 @@ "pinName": "Q2" }, "pin2": { - "compName": "WireCrossPoint#8", + "compName": "WireCrossPoint#7", "pinName": "" }, "name": "unnamedWire#49", @@ -3132,7 +3132,7 @@ "pinName": "Q3" }, "pin2": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "name": "unnamedWire#50", @@ -3157,7 +3157,7 @@ "pinName": "Q4" }, "pin2": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "name": "unnamedWire#51", @@ -3178,7 +3178,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#7", + "compName": "WireCrossPoint#6", "pinName": "" }, "pin2": { @@ -3190,7 +3190,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#8", + "compName": "WireCrossPoint#7", "pinName": "" }, "pin2": { @@ -3202,7 +3202,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "pin2": { @@ -3214,7 +3214,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "pin2": { @@ -3226,7 +3226,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#7", + "compName": "WireCrossPoint#6", "pinName": "" }, "pin2": { @@ -3243,7 +3243,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#8", + "compName": "WireCrossPoint#7", "pinName": "" }, "pin2": { @@ -3260,7 +3260,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "pin2": { @@ -3277,7 +3277,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "pin2": { @@ -3407,7 +3407,7 @@ "pinName": "Q1" }, "pin2": { - "compName": "WireCrossPoint#11", + "compName": "WireCrossPoint#10", "pinName": "" }, "name": "unnamedWire#64", @@ -3419,7 +3419,7 @@ "pinName": "Q2" }, "pin2": { - "compName": "WireCrossPoint#12", + "compName": "WireCrossPoint#11", "pinName": "" }, "name": "unnamedWire#65", @@ -3431,7 +3431,7 @@ "pinName": "Q3" }, "pin2": { - "compName": "WireCrossPoint#13", + "compName": "WireCrossPoint#12", "pinName": "" }, "name": "unnamedWire#66", @@ -3443,7 +3443,7 @@ "pinName": "Q4" }, "pin2": { - "compName": "WireCrossPoint#14", + "compName": "WireCrossPoint#13", "pinName": "" }, "name": "unnamedWire#67", @@ -3451,11 +3451,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#11", + "compName": "WireCrossPoint#10", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#15", + "compName": "WireCrossPoint#14", "pinName": "" }, "name": "unnamedWire#68", @@ -3463,7 +3463,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#15", + "compName": "WireCrossPoint#14", "pinName": "" }, "pin2": { @@ -3500,11 +3500,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#14", + "compName": "WireCrossPoint#13", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#16", + "compName": "WireCrossPoint#15", "pinName": "" }, "name": "unnamedWire#70", @@ -3516,7 +3516,7 @@ "pinName": "Qn" }, "pin2": { - "compName": "WireCrossPoint#41", + "compName": "WireCrossPoint#40", "pinName": "" }, "name": "unnamedWire#71", @@ -3533,11 +3533,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#12", + "compName": "WireCrossPoint#11", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#17", + "compName": "WireCrossPoint#16", "pinName": "" }, "name": "unnamedWire#72", @@ -3562,11 +3562,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#13", + "compName": "WireCrossPoint#12", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#18", + "compName": "WireCrossPoint#17", "pinName": "" }, "name": "unnamedWire#73", @@ -3591,7 +3591,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#17", + "compName": "WireCrossPoint#16", "pinName": "" }, "pin2": { @@ -3603,7 +3603,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#18", + "compName": "WireCrossPoint#17", "pinName": "" }, "pin2": { @@ -3615,7 +3615,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#14", + "compName": "WireCrossPoint#13", "pinName": "" }, "pin2": { @@ -3644,7 +3644,7 @@ "pinName": "RAMn" }, "pin2": { - "compName": "WireCrossPoint#42", + "compName": "WireCrossPoint#41", "pinName": "" }, "name": "unnamedWire#78", @@ -3661,7 +3661,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#11", + "compName": "WireCrossPoint#10", "pinName": "" }, "pin2": { @@ -3719,7 +3719,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#15", + "compName": "WireCrossPoint#14", "pinName": "" }, "pin2": { @@ -3736,7 +3736,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#12", + "compName": "WireCrossPoint#11", "pinName": "" }, "pin2": { @@ -3757,7 +3757,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#13", + "compName": "WireCrossPoint#12", "pinName": "" }, "pin2": { @@ -3778,7 +3778,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#16", + "compName": "WireCrossPoint#15", "pinName": "" }, "pin2": { @@ -3795,7 +3795,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#17", + "compName": "WireCrossPoint#16", "pinName": "" }, "pin2": { @@ -3812,7 +3812,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#18", + "compName": "WireCrossPoint#17", "pinName": "" }, "pin2": { @@ -3948,7 +3948,7 @@ "pinName": "F1" }, "pin2": { - "compName": "WireCrossPoint#19", + "compName": "WireCrossPoint#18", "pinName": "" }, "name": "unnamedWire#92", @@ -3969,7 +3969,7 @@ "pinName": "F4" }, "pin2": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#19", "pinName": "" }, "name": "unnamedWire#93", @@ -3990,7 +3990,7 @@ "pinName": "OUT" }, "pin2": { - "compName": "WireCrossPoint#21", + "compName": "WireCrossPoint#20", "pinName": "" }, "name": "unnamedWire#94", @@ -3998,7 +3998,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#47", + "compName": "WireCrossPoint#45", "pinName": "" }, "pin2": { @@ -4010,7 +4010,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#21", + "compName": "WireCrossPoint#20", "pinName": "" }, "pin2": { @@ -4043,7 +4043,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#21", + "compName": "WireCrossPoint#20", "pinName": "" }, "pin2": { @@ -4064,11 +4064,11 @@ }, { "pin1": { - "compName": "WireCrossPoint#19", + "compName": "WireCrossPoint#18", "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#22", + "compName": "WireCrossPoint#21", "pinName": "" }, "name": "unnamedWire#98", @@ -4085,7 +4085,7 @@ "pinName": "F2" }, "pin2": { - "compName": "WireCrossPoint#23", + "compName": "WireCrossPoint#22", "pinName": "" }, "name": "unnamedWire#99", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904.json index 836fe5c0..769a0a4a 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904.json @@ -280,51 +280,6 @@ "y": 95.0 } }, - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 20.0, - "y": 235.0 - }, - "params": 6 - }, - { - "id": "Merger", - "name": "Merger#1", - "pos": { - "x": 20.0, - "y": 185.0 - }, - "params": 5 - }, - { - "id": "Merger", - "name": "Merger#2", - "pos": { - "x": 15.0, - "y": 65.0 - }, - "params": 4 - }, - { - "id": "Merger", - "name": "Merger#3", - "pos": { - "x": 520.0, - "y": 90.0 - }, - "params": 4 - }, - { - "id": "Merger", - "name": "Merger#4", - "pos": { - "x": 20.0, - "y": 165.0 - }, - "params": 2 - }, { "id": "NandGate", "name": "NandGate#0", @@ -440,7 +395,10 @@ "x": 5.0, "y": 165.0 }, - "params": 13 + "params": { + "logicWidth": 13, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -449,7 +407,10 @@ "x": 575.0, "y": 40.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -458,7 +419,10 @@ "x": 445.0, "y": 300.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -467,7 +431,10 @@ "x": 455.0, "y": 635.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -476,7 +443,10 @@ "x": 455.0, "y": 710.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -485,7 +455,10 @@ "x": 135.0, "y": 645.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -494,7 +467,10 @@ "x": 310.0, "y": 645.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -503,7 +479,58 @@ "x": 430.0, "y": 535.0 }, - "params": 2 + "params": { + "logicWidth": 2, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#16", + "pos": { + "x": 20.0, + "y": 235.0 + }, + "params": { + "logicWidth": 6, + "orientation": "LEFT" + } + }, + { + "id": "Splitter", + "name": "Splitter#17", + "pos": { + "x": 20.0, + "y": 185.0 + }, + "params": { + "logicWidth": 5, + "orientation": "LEFT" + } + }, + { + "id": "Splitter", + "name": "Splitter#18", + "pos": { + "x": 15.0, + "y": 65.0 + }, + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } + }, + { + "id": "Splitter", + "name": "Splitter#19", + "pos": { + "x": 520.0, + "y": 90.0 + }, + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "Splitter", @@ -512,7 +539,22 @@ "x": 440.0, "y": 90.0 }, - "params": 2 + "params": { + "logicWidth": 2, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#20", + "pos": { + "x": 20.0, + "y": 165.0 + }, + "params": { + "logicWidth": 2, + "orientation": "LEFT" + } }, { "id": "Splitter", @@ -521,7 +563,10 @@ "x": 465.0, "y": 100.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -530,7 +575,10 @@ "x": 425.0, "y": 150.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -539,7 +587,10 @@ "x": 425.0, "y": 190.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -548,7 +599,10 @@ "x": 320.0, "y": 310.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -557,7 +611,10 @@ "x": 445.0, "y": 340.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -566,7 +623,10 @@ "x": 445.0, "y": 380.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -575,7 +635,10 @@ "x": 255.0, "y": 430.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "TriStateBuffer", @@ -1220,8 +1283,8 @@ "pinName": "O6" }, "pin2": { - "compName": "Merger#1", - "pinName": "I0" + "compName": "Splitter#17", + "pinName": "O0" }, "name": "unnamedWire#10", "path": [] @@ -1353,8 +1416,8 @@ }, { "pin1": { - "compName": "Merger#1", - "pinName": "I1" + "compName": "Splitter#17", + "pinName": "O1" }, "pin2": { "compName": "Splitter#0", @@ -1528,8 +1591,8 @@ "pinName": "O8" }, "pin2": { - "compName": "Merger#1", - "pinName": "I2" + "compName": "Splitter#17", + "pinName": "O2" }, "name": "unnamedWire#12", "path": [] @@ -1680,8 +1743,8 @@ }, { "pin1": { - "compName": "Merger#1", - "pinName": "I3" + "compName": "Splitter#17", + "pinName": "O3" }, "pin2": { "compName": "Splitter#0", @@ -1878,8 +1941,8 @@ "pinName": "O11" }, "pin2": { - "compName": "Merger#4", - "pinName": "I0" + "compName": "Splitter#20", + "pinName": "O0" }, "name": "unnamedWire#139", "path": [] @@ -1890,16 +1953,16 @@ "pinName": "O10" }, "pin2": { - "compName": "Merger#1", - "pinName": "I4" + "compName": "Splitter#17", + "pinName": "O4" }, "name": "unnamedWire#14", "path": [] }, { "pin1": { - "compName": "Merger#4", - "pinName": "I1" + "compName": "Splitter#20", + "pinName": "O1" }, "pin2": { "compName": "Splitter#0", @@ -1910,8 +1973,8 @@ }, { "pin1": { - "compName": "Merger#4", - "pinName": "O" + "compName": "Splitter#20", + "pinName": "I" }, "pin2": { "compName": "Am2904RegCTInstrDecode#0", @@ -2093,8 +2156,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#16", + "pinName": "I" }, "pin2": { "compName": "Am2904RegCTInstrDecode#0", @@ -2292,8 +2355,8 @@ "pinName": "I" }, "pin2": { - "compName": "Merger#1", - "pinName": "O" + "compName": "Splitter#17", + "pinName": "I" }, "name": "unnamedWire#16", "path": [ @@ -2465,8 +2528,8 @@ "pinName": "IOVR" }, "pin2": { - "compName": "Merger#2", - "pinName": "I0" + "compName": "Splitter#18", + "pinName": "O0" }, "name": "unnamedWire#17", "path": [ @@ -2641,8 +2704,8 @@ "pinName": "IN" }, "pin2": { - "compName": "Merger#2", - "pinName": "I1" + "compName": "Splitter#18", + "pinName": "O1" }, "name": "unnamedWire#18", "path": [ @@ -2810,8 +2873,8 @@ }, { "pin1": { - "compName": "Merger#2", - "pinName": "I2" + "compName": "Splitter#18", + "pinName": "O2" }, "pin2": { "compName": "_submodelinterface", @@ -3051,8 +3114,8 @@ "pinName": "IZ" }, "pin2": { - "compName": "Merger#2", - "pinName": "I3" + "compName": "Splitter#18", + "pinName": "O3" }, "name": "unnamedWire#20", "path": [ @@ -3448,8 +3511,8 @@ }, { "pin1": { - "compName": "Merger#2", - "pinName": "O" + "compName": "Splitter#18", + "pinName": "I" }, "pin2": { "compName": "WireCrossPoint#1", @@ -4095,8 +4158,8 @@ "pinName": "O0" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#16", + "pinName": "O0" }, "name": "unnamedWire#4", "path": [] @@ -4275,8 +4338,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#16", + "pinName": "O1" }, "pin2": { "compName": "Splitter#0", @@ -4478,8 +4541,8 @@ "pinName": "O2" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#16", + "pinName": "O2" }, "name": "unnamedWire#6", "path": [] @@ -4631,8 +4694,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#16", + "pinName": "O3" }, "pin2": { "compName": "Splitter#0", @@ -4819,8 +4882,8 @@ "pinName": "O4" }, "pin2": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#16", + "pinName": "O4" }, "name": "unnamedWire#8", "path": [] @@ -4945,8 +5008,8 @@ }, { "pin1": { - "compName": "Merger#3", - "pinName": "I0" + "compName": "Splitter#19", + "pinName": "O0" }, "pin2": { "compName": "mux1_4#0", @@ -4957,8 +5020,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#16", + "pinName": "O5" }, "pin2": { "compName": "Splitter#0", @@ -4973,16 +5036,16 @@ "pinName": "Y3" }, "pin2": { - "compName": "Merger#3", - "pinName": "I1" + "compName": "Splitter#19", + "pinName": "O1" }, "name": "unnamedWire#90", "path": [] }, { "pin1": { - "compName": "Merger#3", - "pinName": "I2" + "compName": "Splitter#19", + "pinName": "O2" }, "pin2": { "compName": "mux1_4#0", @@ -4997,8 +5060,8 @@ "pinName": "Y1" }, "pin2": { - "compName": "Merger#3", - "pinName": "I3" + "compName": "Splitter#19", + "pinName": "O3" }, "name": "unnamedWire#92", "path": [] @@ -5009,8 +5072,8 @@ "pinName": "" }, "pin2": { - "compName": "Merger#3", - "pinName": "O" + "compName": "Splitter#19", + "pinName": "I" }, "name": "unnamedWire#93", "path": [] diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json index a5b084d7..927d41f8 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json @@ -114,15 +114,6 @@ "innerScale": 0.2, "submodel": { "components": [ - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 385.0, - "y": 85.0 - }, - "params": 4 - }, { "id": "NandGate", "name": "NandGate#0", @@ -139,7 +130,10 @@ "x": 5.0, "y": 35.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -148,7 +142,10 @@ "x": 5.0, "y": 135.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -157,7 +154,10 @@ "x": 45.0, "y": 340.0 }, - "params": 3 + "params": { + "logicWidth": 3, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -166,7 +166,22 @@ "x": 5.0, "y": 235.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#4", + "pos": { + "x": 385.0, + "y": 85.0 + }, + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "WireCrossPoint", @@ -738,16 +753,16 @@ "pinName": "" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#4", + "pinName": "O2" }, "name": "unnamedWire#27", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#4", + "pinName": "O3" }, "pin2": { "compName": "WireCrossPoint#1", @@ -1128,8 +1143,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#4", + "pinName": "I" }, "pin2": { "compName": "_submodelinterface", @@ -1434,8 +1449,8 @@ "pinName": "" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#4", + "pinName": "O0" }, "name": "unnamedWire#7", "path": [] @@ -1624,8 +1639,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#4", + "pinName": "O1" }, "pin2": { "compName": "WireCrossPoint#3", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json index ab443041..2c007e54 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json @@ -148,7 +148,10 @@ "x": 5.0, "y": 110.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "WireCrossPoint", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json index 7faf69d3..3b859b24 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json @@ -105,15 +105,6 @@ "innerScale": 0.2, "submodel": { "components": [ - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 230.0, - "y": 30.0 - }, - "params": 4 - }, { "id": "NandGate", "name": "NandGate#0", @@ -148,7 +139,10 @@ "x": 5.0, "y": 135.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -157,7 +151,10 @@ "x": 5.0, "y": 185.0 }, - "params": 4 + "params": { + "logicWidth": 4, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -166,7 +163,22 @@ "x": 5.0, "y": 95.0 }, - "params": 2 + "params": { + "logicWidth": 2, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#3", + "pos": { + "x": 230.0, + "y": 30.0 + }, + "params": { + "logicWidth": 4, + "orientation": "LEFT" + } }, { "id": "WireCrossPoint", @@ -262,16 +274,16 @@ "pinName": "Q1" }, "pin2": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#3", + "pinName": "O3" }, "name": "unnamedWire#0", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#3", + "pinName": "O2" }, "pin2": { "compName": "dff4_finewe#0", @@ -307,8 +319,8 @@ "pinName": "" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#3", + "pinName": "O0" }, "name": "unnamedWire#11", "path": [] @@ -443,8 +455,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#3", + "pinName": "O1" }, "pin2": { "compName": "dff4_finewe#0", @@ -810,8 +822,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#3", + "pinName": "I" }, "pin2": { "compName": "_submodelinterface", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json index 55256c7e..9163fc3c 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json @@ -204,15 +204,6 @@ }, "params": 1 }, - { - "id": "WireCrossPoint", - "name": "WireCrossPoint#10", - "pos": { - "x": 199.0, - "y": 209.0 - }, - "params": 1 - }, { "id": "WireCrossPoint", "name": "WireCrossPoint#2", @@ -269,13 +260,22 @@ }, { "id": "WireCrossPoint", - "name": "WireCrossPoint#9", + "name": "WireCrossPoint#8", "pos": { "x": 234.0, "y": 69.0 }, "params": 1 }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#9", + "pos": { + "x": 199.0, + "y": 209.0 + }, + "params": 1 + }, { "id": "dff12", "name": "dff12#0", @@ -285,12 +285,13 @@ } }, { - "id": "inc12", - "name": "inc12#0", + "id": "inc", + "name": "inc#0", "pos": { "x": 240.0, "y": 140.0 - } + }, + "params": 12 }, { "id": "nor12", @@ -494,7 +495,7 @@ "pinName": "" }, "pin2": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "A" }, "name": "unnamedWire#18", @@ -769,7 +770,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "pin2": { @@ -790,7 +791,7 @@ "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "name": "unnamedWire#36", @@ -834,7 +835,7 @@ }, { "pin1": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "Y" }, "pin2": { @@ -858,7 +859,7 @@ }, { "pin1": { - "compName": "inc12#0", + "compName": "inc#0", "pinName": "CI" }, "pin2": { @@ -966,7 +967,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#9", + "compName": "WireCrossPoint#8", "pinName": "" }, "pin2": { @@ -994,7 +995,7 @@ "pinName": "_OE" }, "pin2": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "name": "unnamedWire#53", @@ -1002,7 +1003,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "pin2": { @@ -1018,7 +1019,7 @@ "pinName": "A" }, "pin2": { - "compName": "WireCrossPoint#10", + "compName": "WireCrossPoint#9", "pinName": "" }, "name": "unnamedWire#57", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff12_we.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff12_we.json index 20f06642..1f151375 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff12_we.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff12_we.json @@ -43,22 +43,28 @@ "submodel": { "components": [ { - "id": "Merger", - "name": "Merger#0", + "id": "Splitter", + "name": "Splitter#0", "pos": { - "x": 250.0, - "y": 45.0 + "x": 70.0, + "y": 65.0 }, - "params": 12 + "params": { + "logicWidth": 12, + "orientation": "RIGHT" + } }, { "id": "Splitter", - "name": "Splitter#0", + "name": "Splitter#1", "pos": { - "x": 70.0, - "y": 65.0 + "x": 250.0, + "y": 45.0 }, - "params": 12 + "params": { + "logicWidth": 12, + "orientation": "LEFT" + } }, { "id": "TextComponent", @@ -797,8 +803,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I11" + "compName": "Splitter#1", + "pinName": "O11" }, "pin2": { "compName": "dff#2", @@ -822,8 +828,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I10" + "compName": "Splitter#1", + "pinName": "O10" }, "name": "unnamedWire#54", "path": [ @@ -839,8 +845,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I9" + "compName": "Splitter#1", + "pinName": "O9" }, "pin2": { "compName": "dff#3", @@ -864,8 +870,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I8" + "compName": "Splitter#1", + "pinName": "O8" }, "name": "unnamedWire#56", "path": [ @@ -881,8 +887,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I7" + "compName": "Splitter#1", + "pinName": "O7" }, "pin2": { "compName": "dff#4", @@ -906,8 +912,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I6" + "compName": "Splitter#1", + "pinName": "O6" }, "name": "unnamedWire#58", "path": [ @@ -923,8 +929,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#1", + "pinName": "O5" }, "pin2": { "compName": "dff#11", @@ -956,8 +962,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#1", + "pinName": "O4" }, "pin2": { "compName": "dff#10", @@ -968,8 +974,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#1", + "pinName": "O3" }, "pin2": { "compName": "dff#8", @@ -993,8 +999,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#1", + "pinName": "O2" }, "name": "unnamedWire#62", "path": [ @@ -1010,8 +1016,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#1", + "pinName": "O1" }, "pin2": { "compName": "dff#7", @@ -1035,8 +1041,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#1", + "pinName": "O0" }, "name": "unnamedWire#64", "path": [ @@ -1052,8 +1058,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#1", + "pinName": "I" }, "pin2": { "compName": "WireCrossPoint#5", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_invwe.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_invwe.json index 11bc97cc..e6cda444 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_invwe.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_invwe.json @@ -43,22 +43,28 @@ "submodel": { "components": [ { - "id": "Merger", - "name": "Merger#0", + "id": "Splitter", + "name": "Splitter#0", "pos": { - "x": 275.0, - "y": 50.0 + "x": 75.0, + "y": 70.0 }, - "params": 16 + "params": { + "logicWidth": 16, + "orientation": "RIGHT" + } }, { "id": "Splitter", - "name": "Splitter#0", + "name": "Splitter#1", "pos": { - "x": 75.0, - "y": 70.0 + "x": 275.0, + "y": 50.0 }, - "params": 16 + "params": { + "logicWidth": 16, + "orientation": "LEFT" + } }, { "id": "WireCrossPoint", @@ -978,8 +984,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I15" + "compName": "Splitter#1", + "pinName": "O15" }, "pin2": { "compName": "dff#0", @@ -1024,8 +1030,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I14" + "compName": "Splitter#1", + "pinName": "O14" }, "name": "unnamedWire#50", "path": [ @@ -1041,8 +1047,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I13" + "compName": "Splitter#1", + "pinName": "O13" }, "pin2": { "compName": "dff#3", @@ -1062,8 +1068,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I12" + "compName": "Splitter#1", + "pinName": "O12" }, "pin2": { "compName": "dff#2", @@ -1083,8 +1089,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I11" + "compName": "Splitter#1", + "pinName": "O11" }, "pin2": { "compName": "dff#6", @@ -1108,8 +1114,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I10" + "compName": "Splitter#1", + "pinName": "O10" }, "name": "unnamedWire#54", "path": [ @@ -1125,8 +1131,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I9" + "compName": "Splitter#1", + "pinName": "O9" }, "pin2": { "compName": "dff#7", @@ -1141,16 +1147,16 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I8" + "compName": "Splitter#1", + "pinName": "O8" }, "name": "unnamedWire#56", "path": [] }, { "pin1": { - "compName": "Merger#0", - "pinName": "I7" + "compName": "Splitter#1", + "pinName": "O7" }, "pin2": { "compName": "dff#8", @@ -1174,8 +1180,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I6" + "compName": "Splitter#1", + "pinName": "O6" }, "name": "unnamedWire#58", "path": [ @@ -1191,8 +1197,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#1", + "pinName": "O5" }, "pin2": { "compName": "dff#15", @@ -1233,8 +1239,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#1", + "pinName": "O4" }, "pin2": { "compName": "dff#14", @@ -1254,8 +1260,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#1", + "pinName": "O3" }, "pin2": { "compName": "dff#12", @@ -1279,8 +1285,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#1", + "pinName": "O2" }, "name": "unnamedWire#62", "path": [ @@ -1296,8 +1302,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#1", + "pinName": "O1" }, "pin2": { "compName": "dff#11", @@ -1321,8 +1327,8 @@ "pinName": "Q" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#1", + "pinName": "O0" }, "name": "unnamedWire#64", "path": [ @@ -1338,8 +1344,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#1", + "pinName": "I" }, "pin2": { "compName": "WireCrossPoint#7", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_we.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_we.json new file mode 100644 index 00000000..3fc94f94 --- /dev/null +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16_we.json @@ -0,0 +1,1474 @@ +{ + "width": 60.0, + "height": 60.0, + "interfacePins": [ + { + "location": { + "x": 0.0, + "y": 5.0 + }, + "name": "C", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 0.0, + "y": 35.0 + }, + "name": "D", + "logicWidth": 16, + "usage": "INPUT" + }, + { + "location": { + "x": 60.0, + "y": 25.0 + }, + "name": "Q", + "logicWidth": 16, + "usage": "TRISTATE" + }, + { + "location": { + "x": 0.0, + "y": 20.0 + }, + "name": "WE", + "logicWidth": 1, + "usage": "INPUT" + } + ], + "innerScale": 0.2, + "submodel": { + "components": [ + { + "id": "Splitter", + "name": "Splitter#0", + "pos": { + "x": 75.0, + "y": 70.0 + }, + "params": { + "logicWidth": 16, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#1", + "pos": { + "x": 275.0, + "y": 50.0 + }, + "params": { + "logicWidth": 16, + "orientation": "LEFT" + } + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#0", + "pos": { + "x": 134.0, + "y": 19.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#1", + "pos": { + "x": 134.0, + "y": 49.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#10", + "pos": { + "x": 184.0, + "y": 119.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#11", + "pos": { + "x": 184.0, + "y": 209.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#12", + "pos": { + "x": 184.0, + "y": 89.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#13", + "pos": { + "x": 184.0, + "y": 149.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#14", + "pos": { + "x": 184.0, + "y": 179.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#2", + "pos": { + "x": 134.0, + "y": 79.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#3", + "pos": { + "x": 134.0, + "y": 109.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#4", + "pos": { + "x": 134.0, + "y": 169.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#5", + "pos": { + "x": 134.0, + "y": 199.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#6", + "pos": { + "x": 134.0, + "y": 139.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#7", + "pos": { + "x": 289.0, + "y": 124.0 + }, + "params": 16 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#8", + "pos": { + "x": 184.0, + "y": 59.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#9", + "pos": { + "x": 184.0, + "y": 29.0 + }, + "params": 1 + }, + { + "id": "dff", + "name": "dff#0", + "pos": { + "x": 140.0, + "y": 15.0 + } + }, + { + "id": "dff", + "name": "dff#1", + "pos": { + "x": 190.0, + "y": 25.0 + } + }, + { + "id": "dff", + "name": "dff#10", + "pos": { + "x": 190.0, + "y": 235.0 + } + }, + { + "id": "dff", + "name": "dff#11", + "pos": { + "x": 140.0, + "y": 225.0 + } + }, + { + "id": "dff", + "name": "dff#12", + "pos": { + "x": 140.0, + "y": 195.0 + } + }, + { + "id": "dff", + "name": "dff#13", + "pos": { + "x": 190.0, + "y": 145.0 + } + }, + { + "id": "dff", + "name": "dff#14", + "pos": { + "x": 190.0, + "y": 175.0 + } + }, + { + "id": "dff", + "name": "dff#15", + "pos": { + "x": 140.0, + "y": 165.0 + } + }, + { + "id": "dff", + "name": "dff#2", + "pos": { + "x": 190.0, + "y": 55.0 + } + }, + { + "id": "dff", + "name": "dff#3", + "pos": { + "x": 140.0, + "y": 45.0 + } + }, + { + "id": "dff", + "name": "dff#4", + "pos": { + "x": 190.0, + "y": 85.0 + } + }, + { + "id": "dff", + "name": "dff#5", + "pos": { + "x": 190.0, + "y": 115.0 + } + }, + { + "id": "dff", + "name": "dff#6", + "pos": { + "x": 140.0, + "y": 75.0 + } + }, + { + "id": "dff", + "name": "dff#7", + "pos": { + "x": 140.0, + "y": 105.0 + } + }, + { + "id": "dff", + "name": "dff#8", + "pos": { + "x": 140.0, + "y": 135.0 + } + }, + { + "id": "dff", + "name": "dff#9", + "pos": { + "x": 190.0, + "y": 205.0 + } + }, + { + "id": "mux1_16", + "name": "mux1_16#0", + "pos": { + "x": 15.0, + "y": 95.0 + } + } + ], + "wires": [ + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O15" + }, + "pin2": { + "compName": "dff#0", + "pinName": "D" + }, + "name": "unnamedWire#0", + "path": [ + { + "x": 90.0, + "y": 70.0 + }, + { + "x": 90.0, + "y": 30.0 + } + ] + }, + { + "pin1": { + "compName": "dff#1", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O14" + }, + "name": "unnamedWire#1", + "path": [ + { + "x": 95.0, + "y": 40.0 + }, + { + "x": 95.0, + "y": 80.0 + } + ] + }, + { + "pin1": { + "compName": "dff#15", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O5" + }, + "name": "unnamedWire#10", + "path": [ + { + "x": 120.0, + "y": 180.0 + }, + { + "x": 120.0, + "y": 170.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O4" + }, + "pin2": { + "compName": "dff#14", + "pinName": "D" + }, + "name": "unnamedWire#11", + "path": [ + { + "x": 115.0, + "y": 180.0 + }, + { + "x": 115.0, + "y": 190.0 + } + ] + }, + { + "pin1": { + "compName": "dff#12", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O3" + }, + "name": "unnamedWire#12", + "path": [ + { + "x": 110.0, + "y": 210.0 + }, + { + "x": 110.0, + "y": 190.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O2" + }, + "pin2": { + "compName": "dff#9", + "pinName": "D" + }, + "name": "unnamedWire#13", + "path": [ + { + "x": 105.0, + "y": 200.0 + }, + { + "x": 105.0, + "y": 220.0 + } + ] + }, + { + "pin1": { + "compName": "dff#11", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O1" + }, + "name": "unnamedWire#14", + "path": [ + { + "x": 100.0, + "y": 240.0 + }, + { + "x": 100.0, + "y": 210.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O0" + }, + "pin2": { + "compName": "dff#10", + "pinName": "D" + }, + "name": "unnamedWire#15", + "path": [ + { + "x": 95.0, + "y": 220.0 + }, + { + "x": 95.0, + "y": 250.0 + } + ] + }, + { + "pin1": { + "compName": "mux1_16#0", + "pinName": "Y" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "I" + }, + "name": "unnamedWire#16", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "dff#0", + "pinName": "C" + }, + "name": "unnamedWire#17", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "name": "unnamedWire#18", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "dff#3", + "pinName": "C" + }, + "name": "unnamedWire#19", + "path": [] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O13" + }, + "pin2": { + "compName": "dff#3", + "pinName": "D" + }, + "name": "unnamedWire#2", + "path": [ + { + "x": 100.0, + "y": 90.0 + }, + { + "x": 100.0, + "y": 60.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "name": "unnamedWire#20", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "dff#6", + "pinName": "C" + }, + "name": "unnamedWire#21", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#22", + "path": [] + }, + { + "pin1": { + "compName": "dff#7", + "pinName": "C" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#23", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "name": "unnamedWire#24", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "pin2": { + "compName": "dff#8", + "pinName": "C" + }, + "name": "unnamedWire#25", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "name": "unnamedWire#26", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "dff#15", + "pinName": "C" + }, + "name": "unnamedWire#27", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "name": "unnamedWire#28", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "pin2": { + "compName": "dff#12", + "pinName": "C" + }, + "name": "unnamedWire#29", + "path": [] + }, + { + "pin1": { + "compName": "dff#2", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O12" + }, + "name": "unnamedWire#3", + "path": [ + { + "x": 105.0, + "y": 70.0 + }, + { + "x": 105.0, + "y": 100.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "pin2": { + "compName": "dff#11", + "pinName": "C" + }, + "name": "unnamedWire#30", + "path": [ + { + "x": 135.0, + "y": 230.0 + } + ] + }, + { + "pin1": { + "compName": "dff#10", + "pinName": "C" + }, + "pin2": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "name": "unnamedWire#31", + "path": [ + { + "x": 185.0, + "y": 240.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "pin2": { + "compName": "dff#9", + "pinName": "C" + }, + "name": "unnamedWire#32", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "name": "unnamedWire#33", + "path": [] + }, + { + "pin1": { + "compName": "dff#14", + "pinName": "C" + }, + "pin2": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "name": "unnamedWire#34", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "name": "unnamedWire#35", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "pin2": { + "compName": "dff#13", + "pinName": "C" + }, + "name": "unnamedWire#36", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "name": "unnamedWire#37", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "pin2": { + "compName": "dff#5", + "pinName": "C" + }, + "name": "unnamedWire#38", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "name": "unnamedWire#39", + "path": [] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O11" + }, + "pin2": { + "compName": "dff#6", + "pinName": "D" + }, + "name": "unnamedWire#4", + "path": [ + { + "x": 110.0, + "y": 110.0 + }, + { + "x": 110.0, + "y": 90.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "pin2": { + "compName": "dff#4", + "pinName": "C" + }, + "name": "unnamedWire#40", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "name": "unnamedWire#41", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "pin2": { + "compName": "dff#2", + "pinName": "C" + }, + "name": "unnamedWire#42", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "name": "unnamedWire#43", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "pin2": { + "compName": "dff#1", + "pinName": "C" + }, + "name": "unnamedWire#44", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "name": "unnamedWire#45", + "path": [ + { + "x": 135.0, + "y": 10.0 + }, + { + "x": 185.0, + "y": 10.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "WE" + }, + "pin2": { + "compName": "mux1_16#0", + "pinName": "S" + }, + "name": "unnamedWire#47", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "C" + }, + "name": "unnamedWire#48", + "path": [ + { + "x": 35.0, + "y": 20.0 + }, + { + "x": 35.0, + "y": 25.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O15" + }, + "pin2": { + "compName": "dff#0", + "pinName": "Q" + }, + "name": "unnamedWire#49", + "path": [ + { + "x": 265.0, + "y": 50.0 + }, + { + "x": 265.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "dff#4", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O10" + }, + "name": "unnamedWire#5", + "path": [ + { + "x": 115.0, + "y": 100.0 + }, + { + "x": 115.0, + "y": 120.0 + } + ] + }, + { + "pin1": { + "compName": "dff#1", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O14" + }, + "name": "unnamedWire#50", + "path": [ + { + "x": 260.0, + "y": 30.0 + }, + { + "x": 260.0, + "y": 60.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O13" + }, + "pin2": { + "compName": "dff#3", + "pinName": "Q" + }, + "name": "unnamedWire#51", + "path": [ + { + "x": 255.0, + "y": 70.0 + }, + { + "x": 255.0, + "y": 50.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O12" + }, + "pin2": { + "compName": "dff#2", + "pinName": "Q" + }, + "name": "unnamedWire#52", + "path": [ + { + "x": 250.0, + "y": 80.0 + }, + { + "x": 250.0, + "y": 60.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O11" + }, + "pin2": { + "compName": "dff#6", + "pinName": "Q" + }, + "name": "unnamedWire#53", + "path": [ + { + "x": 245.0, + "y": 90.0 + }, + { + "x": 245.0, + "y": 80.0 + } + ] + }, + { + "pin1": { + "compName": "dff#4", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O10" + }, + "name": "unnamedWire#54", + "path": [ + { + "x": 240.0, + "y": 90.0 + }, + { + "x": 240.0, + "y": 100.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O9" + }, + "pin2": { + "compName": "dff#7", + "pinName": "Q" + }, + "name": "unnamedWire#55", + "path": [] + }, + { + "pin1": { + "compName": "dff#5", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O8" + }, + "name": "unnamedWire#56", + "path": [] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O7" + }, + "pin2": { + "compName": "dff#8", + "pinName": "Q" + }, + "name": "unnamedWire#57", + "path": [ + { + "x": 235.0, + "y": 130.0 + }, + { + "x": 235.0, + "y": 140.0 + } + ] + }, + { + "pin1": { + "compName": "dff#13", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O6" + }, + "name": "unnamedWire#58", + "path": [ + { + "x": 240.0, + "y": 150.0 + }, + { + "x": 240.0, + "y": 140.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O5" + }, + "pin2": { + "compName": "dff#15", + "pinName": "Q" + }, + "name": "unnamedWire#59", + "path": [ + { + "x": 245.0, + "y": 150.0 + }, + { + "x": 245.0, + "y": 170.0 + } + ] + }, + { + "pin1": { + "compName": "dff#7", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O9" + }, + "name": "unnamedWire#6", + "path": [ + { + "x": 120.0, + "y": 120.0 + }, + { + "x": 120.0, + "y": 130.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O4" + }, + "pin2": { + "compName": "dff#14", + "pinName": "Q" + }, + "name": "unnamedWire#60", + "path": [ + { + "x": 250.0, + "y": 160.0 + }, + { + "x": 250.0, + "y": 180.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O3" + }, + "pin2": { + "compName": "dff#12", + "pinName": "Q" + }, + "name": "unnamedWire#61", + "path": [ + { + "x": 255.0, + "y": 170.0 + }, + { + "x": 255.0, + "y": 200.0 + } + ] + }, + { + "pin1": { + "compName": "dff#9", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O2" + }, + "name": "unnamedWire#62", + "path": [ + { + "x": 260.0, + "y": 210.0 + }, + { + "x": 260.0, + "y": 180.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O1" + }, + "pin2": { + "compName": "dff#11", + "pinName": "Q" + }, + "name": "unnamedWire#63", + "path": [ + { + "x": 265.0, + "y": 190.0 + }, + { + "x": 265.0, + "y": 230.0 + } + ] + }, + { + "pin1": { + "compName": "dff#10", + "pinName": "Q" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O0" + }, + "name": "unnamedWire#64", + "path": [ + { + "x": 270.0, + "y": 240.0 + }, + { + "x": 270.0, + "y": 200.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "I" + }, + "pin2": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "name": "unnamedWire#65", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "Q" + }, + "name": "unnamedWire#66", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "pin2": { + "compName": "mux1_16#0", + "pinName": "I0" + }, + "name": "unnamedWire#67", + "path": [ + { + "x": 290.0, + "y": 275.0 + }, + { + "x": 10.0, + "y": 275.0 + }, + { + "x": 10.0, + "y": 120.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "D" + }, + "pin2": { + "compName": "mux1_16#0", + "pinName": "I1" + }, + "name": "unnamedWire#68", + "path": [ + { + "x": 5.0, + "y": 175.0 + }, + { + "x": 5.0, + "y": 185.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O8" + }, + "pin2": { + "compName": "dff#5", + "pinName": "D" + }, + "name": "unnamedWire#7", + "path": [ + { + "x": 125.0, + "y": 140.0 + }, + { + "x": 125.0, + "y": 130.0 + } + ] + }, + { + "pin1": { + "compName": "dff#8", + "pinName": "D" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O7" + }, + "name": "unnamedWire#8", + "path": [] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "O6" + }, + "pin2": { + "compName": "dff#13", + "pinName": "D" + }, + "name": "unnamedWire#9", + "path": [] + } + ], + "version": "0.1.1" + }, + "symbolRendererSnippetID": "simpleRectangularLike", + "symbolRendererParams": { + "centerText": "D flip flop\n16 bit", + "centerTextHeight": 5.0, + "horizontalComponentCenter": 30.0, + "pinLabelHeight": 3.5, + "pinLabelMargin": 0.5 + }, + "outlineRendererSnippetID": "default", + "highLevelStateHandlerSnippetID": "default", + "version": "0.1.5" +} \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_12.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_12.json index faeaeb56..9f1da98e 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_12.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_12.json @@ -42,15 +42,6 @@ "innerScale": 0.2, "submodel": { "components": [ - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 235.0, - "y": 95.0 - }, - "params": 12 - }, { "id": "NandGate", "name": "NandGate#0", @@ -67,7 +58,10 @@ "x": 5.0, "y": 45.0 }, - "params": 12 + "params": { + "logicWidth": 12, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -76,7 +70,22 @@ "x": 5.0, "y": 245.0 }, - "params": 12 + "params": { + "logicWidth": 12, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#2", + "pos": { + "x": 235.0, + "y": 95.0 + }, + "params": { + "logicWidth": 12, + "orientation": "LEFT" + } }, { "id": "WireCrossPoint", @@ -434,8 +443,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I11" + "compName": "Splitter#2", + "pinName": "O11" }, "name": "unnamedWire#103", "path": [ @@ -455,8 +464,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I10" + "compName": "Splitter#2", + "pinName": "O10" }, "name": "unnamedWire#104", "path": [ @@ -472,8 +481,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I9" + "compName": "Splitter#2", + "pinName": "O9" }, "pin2": { "compName": "sel1#1", @@ -497,8 +506,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I8" + "compName": "Splitter#2", + "pinName": "O8" }, "name": "unnamedWire#106", "path": [ @@ -514,8 +523,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I7" + "compName": "Splitter#2", + "pinName": "O7" }, "pin2": { "compName": "sel1#6", @@ -539,8 +548,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I6" + "compName": "Splitter#2", + "pinName": "O6" }, "name": "unnamedWire#108", "path": [ @@ -556,8 +565,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#2", + "pinName": "O5" }, "pin2": { "compName": "sel1#7", @@ -593,8 +602,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#2", + "pinName": "O4" }, "name": "unnamedWire#110", "path": [ @@ -610,8 +619,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#2", + "pinName": "O3" }, "pin2": { "compName": "sel1#10", @@ -635,8 +644,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#2", + "pinName": "O2" }, "name": "unnamedWire#112", "path": [ @@ -652,8 +661,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#2", + "pinName": "O1" }, "pin2": { "compName": "sel1#4", @@ -677,8 +686,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#2", + "pinName": "O0" }, "name": "unnamedWire#114", "path": [ @@ -694,8 +703,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#2", + "pinName": "I" }, "pin2": { "compName": "_submodelinterface", diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_16.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_16.json index c282fa50..e29bbbf0 100644 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_16.json +++ b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux1_16.json @@ -42,15 +42,6 @@ "innerScale": 0.2, "submodel": { "components": [ - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 260.0, - "y": 175.0 - }, - "params": 16 - }, { "id": "NandGate", "name": "NandGate#0", @@ -67,7 +58,10 @@ "x": 5.0, "y": 50.0 }, - "params": 16 + "params": { + "logicWidth": 16, + "orientation": "RIGHT" + } }, { "id": "Splitter", @@ -76,7 +70,22 @@ "x": 5.0, "y": 375.0 }, - "params": 16 + "params": { + "logicWidth": 16, + "orientation": "RIGHT" + } + }, + { + "id": "Splitter", + "name": "Splitter#2", + "pos": { + "x": 260.0, + "y": 175.0 + }, + "params": { + "logicWidth": 16, + "orientation": "LEFT" + } }, { "id": "WireCrossPoint", @@ -534,8 +543,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I14" + "compName": "Splitter#2", + "pinName": "O14" }, "pin2": { "compName": "sel1#1", @@ -559,8 +568,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I13" + "compName": "Splitter#2", + "pinName": "O13" }, "name": "unnamedWire#101", "path": [ @@ -576,8 +585,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I12" + "compName": "Splitter#2", + "pinName": "O12" }, "pin2": { "compName": "sel1#3", @@ -601,8 +610,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I11" + "compName": "Splitter#2", + "pinName": "O11" }, "name": "unnamedWire#103", "path": [ @@ -622,8 +631,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I10" + "compName": "Splitter#2", + "pinName": "O10" }, "name": "unnamedWire#104", "path": [ @@ -639,8 +648,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I9" + "compName": "Splitter#2", + "pinName": "O9" }, "pin2": { "compName": "sel1#5", @@ -664,8 +673,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I8" + "compName": "Splitter#2", + "pinName": "O8" }, "name": "unnamedWire#106", "path": [ @@ -681,8 +690,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I7" + "compName": "Splitter#2", + "pinName": "O7" }, "pin2": { "compName": "sel1#10", @@ -706,8 +715,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I6" + "compName": "Splitter#2", + "pinName": "O6" }, "name": "unnamedWire#108", "path": [ @@ -723,8 +732,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I5" + "compName": "Splitter#2", + "pinName": "O5" }, "pin2": { "compName": "sel1#11", @@ -760,8 +769,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I4" + "compName": "Splitter#2", + "pinName": "O4" }, "name": "unnamedWire#110", "path": [ @@ -777,8 +786,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I3" + "compName": "Splitter#2", + "pinName": "O3" }, "pin2": { "compName": "sel1#14", @@ -802,8 +811,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I2" + "compName": "Splitter#2", + "pinName": "O2" }, "name": "unnamedWire#112", "path": [ @@ -819,8 +828,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "I1" + "compName": "Splitter#2", + "pinName": "O1" }, "pin2": { "compName": "sel1#8", @@ -844,8 +853,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I0" + "compName": "Splitter#2", + "pinName": "O0" }, "name": "unnamedWire#114", "path": [ @@ -861,8 +870,8 @@ }, { "pin1": { - "compName": "Merger#0", - "pinName": "O" + "compName": "Splitter#2", + "pinName": "I" }, "pin2": { "compName": "_submodelinterface", @@ -2343,8 +2352,8 @@ "pinName": "Y" }, "pin2": { - "compName": "Merger#0", - "pinName": "I15" + "compName": "Splitter#2", + "pinName": "O15" }, "name": "unnamedWire#99", "path": [ diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc.java new file mode 100644 index 00000000..981c8488 --- /dev/null +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc.java @@ -0,0 +1,78 @@ +package net.mograsim.logic.model.am2900.components; + +import static net.mograsim.logic.core.types.Bit.U; +import static net.mograsim.logic.core.types.Bit.X; +import static net.mograsim.logic.core.types.Bit.Z; +import static net.mograsim.logic.core.types.Bit.ZERO; + +import java.util.Arrays; +import java.util.Map; + +import net.mograsim.logic.core.types.Bit; +import net.mograsim.logic.core.wires.CoreWire.ReadEnd; +import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd; +import net.mograsim.logic.model.model.LogicModelModifiable; +import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedModelComponent; +import net.mograsim.logic.model.model.wires.Pin; +import net.mograsim.logic.model.model.wires.PinUsage; +import net.mograsim.logic.model.serializing.IdentifyParams; +import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; +import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.PinNamesParams.Position; + +public class Modelinc extends SimpleRectangularHardcodedModelComponent +{ + private final int logicWidth; + + public Modelinc(LogicModelModifiable model, String name, int logicWidth) + { + super(model, "inc", name, "Incrementer", false); + this.logicWidth = logicWidth; + setSize(40, 20); + addPin(new Pin(model, this, "A", logicWidth, PinUsage.INPUT, 20, 20), Position.TOP); + addPin(new Pin(model, this, "CI", 1, PinUsage.INPUT, 40, 10), Position.LEFT); + addPin(new Pin(model, this, "Y", logicWidth, PinUsage.OUTPUT, 20, 0), Position.BOTTOM); + + init(); + } + + @Override + public Object recalculate(Object lastState, Map readEnds, Map readWriteEnds) + { + Bit[] ABits = readEnds.get("A").getValues().getBits(); + Bit CIVal = readEnds.get("CI").getValue(); + Bit[] YBits = new Bit[logicWidth]; + if (CIVal == X) + Arrays.fill(YBits, X); + else if (CIVal == U) + Arrays.fill(YBits, U); + else if (CIVal == Z) + Arrays.fill(YBits, X); + else if (CIVal == ZERO) + YBits = ABits; + else + { + Bit carry = Bit.ONE; + // TODO extract to helper. This code almost also exists in ModelAm2910RegCntr. + for (int i = logicWidth - 1; i >= 0; i--) + { + Bit a = ABits[i]; + YBits[i] = a.xor(carry); + carry = a.and(carry); + } + } + readWriteEnds.get("Y").feedSignals(YBits); + return null; + } + + @Override + public Integer getParamsForSerializing(IdentifyParams idParams) + { + return logicWidth; + } + + static + { + IndirectModelComponentCreator.setComponentSupplier(Modelinc.class.getCanonicalName(), + (m, p, n) -> new Modelinc(m, n, p.getAsInt())); + } +} \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc12.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc12.java deleted file mode 100644 index 05d2eee5..00000000 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modelinc12.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.mograsim.logic.model.am2900.components; - -import static net.mograsim.logic.core.types.Bit.U; -import static net.mograsim.logic.core.types.Bit.X; -import static net.mograsim.logic.core.types.Bit.Z; -import static net.mograsim.logic.core.types.Bit.ZERO; - -import java.util.Arrays; -import java.util.Map; - -import net.mograsim.logic.core.types.Bit; -import net.mograsim.logic.core.wires.CoreWire.ReadEnd; -import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd; -import net.mograsim.logic.model.model.LogicModelModifiable; -import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedModelComponent; -import net.mograsim.logic.model.model.wires.Pin; -import net.mograsim.logic.model.model.wires.PinUsage; -import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; -import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.PinNamesParams.Position; - -public class Modelinc12 extends SimpleRectangularHardcodedModelComponent -{ - public Modelinc12(LogicModelModifiable model, String name) - { - super(model, "inc12", name, "Incrementer", false); - setSize(40, 20); - addPin(new Pin(model, this, "A", 12, PinUsage.INPUT, 20, 20), Position.TOP); - addPin(new Pin(model, this, "CI", 1, PinUsage.INPUT, 40, 10), Position.LEFT); - addPin(new Pin(model, this, "Y", 12, PinUsage.OUTPUT, 20, 0), Position.BOTTOM); - - init(); - } - - @Override - public Object recalculate(Object lastState, Map readEnds, Map readWriteEnds) - { - Bit[] ABits = readEnds.get("A").getValues().getBits(); - Bit CIVal = readEnds.get("CI").getValue(); - Bit[] YBits = new Bit[12]; - if (CIVal == X) - Arrays.fill(YBits, X); - else if (CIVal == U) - Arrays.fill(YBits, U); - else if (CIVal == Z) - Arrays.fill(YBits, X); - else if (CIVal == ZERO) - YBits = ABits; - else - { - Bit carry = Bit.ONE; - // TODO extract to helper. This code almost also exists in ModelAm2910RegCntr. - for (int i = 11; i >= 0; i--) - { - Bit a = ABits[i]; - YBits[i] = a.xor(carry); - carry = a.and(carry); - } - } - readWriteEnds.get("Y").feedSignals(YBits); - return null; - } - - static - { - IndirectModelComponentCreator.setComponentSupplier(Modelinc12.class.getCanonicalName(), (m, p, n) -> new Modelinc12(m, n)); - } -} \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java index 05ebf456..0c101bb4 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java @@ -62,7 +62,7 @@ public class ModelAm2910RegCntr extends SimpleRectangularHardcodedModelComponent else if (WE.getValue() == ONE) { Bit carry = Bit.ZERO; - // TODO extract to helper. This code almost also exists in Modelinc12. + // TODO extract to helper. This code almost also exists in Modelinc. for (int i = 11; i >= 0; i--) { Bit a = QC[i]; diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json index 6ab00c44..4ecaf4a2 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json @@ -7,7 +7,7 @@ mograsim version: 0.1.3 "Am2910SP": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910SP", "dff12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff12", "dff4_finewe": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff4_finewe", - "inc12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelinc12", + "inc": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelinc", "nor12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelnor12", "ram5_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelram5_12", "sel4_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelsel4_12", @@ -32,6 +32,7 @@ mograsim version: 0.1.3 "demux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/demux2.json", "dff": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff.json", "dff12_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff12_we.json", + "dff16_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_we.json", "dff16_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_invwe.json", "dff4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4.json", "dff4_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4_invwe.json", diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONs.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONs.java new file mode 100644 index 00000000..c9486cc8 --- /dev/null +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONs.java @@ -0,0 +1,284 @@ +package net.mograsim.logic.model.examples; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Scanner; +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import net.haspamelodica.swt.helper.swtobjectwrappers.Point; +import net.mograsim.logic.model.am2900.Am2900Loader; +import net.mograsim.logic.model.model.LogicModelModifiable; +import net.mograsim.logic.model.model.components.ModelComponent; +import net.mograsim.logic.model.model.components.submodels.SubmodelComponent; +import net.mograsim.logic.model.model.components.submodels.SubmodelInterface; +import net.mograsim.logic.model.model.wires.ModelWire; +import net.mograsim.logic.model.model.wires.ModelWireCrossPoint; +import net.mograsim.logic.model.model.wires.MovablePin; +import net.mograsim.logic.model.model.wires.Pin; +import net.mograsim.logic.model.model.wires.PinUsage; +import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent; +import net.mograsim.logic.model.serializing.IdentifyParams; +import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; +import net.mograsim.logic.model.serializing.SubmodelComponentSerializer; +import net.mograsim.logic.model.snippets.highlevelstatehandlers.DefaultHighLevelStateHandler; + +public class ReserializeJSONs +{ + public static double GRIDSIZE = 2.5; + public static boolean changePinUsages = false; + public static boolean changeComponentNames = false; + public static boolean snapWCPs = true; + public static boolean warnNonSnappedPoints = true; + + public static void main(String[] args) throws IOException + { + Am2900Loader.setup(); + try (Scanner sysin = new Scanner(System.in)) + { + System.out.print("Directory to search for JSONs in / JSON file to reserialize >"); + Path root = Paths.get(sysin.nextLine()); + if (!Files.exists(root)) + throw new IllegalArgumentException("Path doesn't exist"); + if (Files.isRegularFile(root)) + reserializeJSON(root, sysin); + else + { + System.out.print("Recursive? >"); + boolean recursive = Boolean.valueOf(sysin.nextLine()); + try (Stream jsons = recursive ? Files.walk(root) : Files.list(root)) + { + jsons.filter(Files::isRegularFile).filter(p -> p.getFileName().toString().endsWith(".json")) + .forEach(j -> reserializeJSON(j, sysin)); + } + } + } + } + + public static void reserializeJSON(Path componentPath, Scanner sysin) + { + try + { + DeserializedSubmodelComponent comp = (DeserializedSubmodelComponent) IndirectModelComponentCreator + .createComponent(new LogicModelModifiable(), "jsonfile:" + componentPath.toString()); + System.out.println("Reserializing " + componentPath); + if (changePinUsages) + comp.getSupermodelPins().entrySet().stream().sorted(Comparator.comparing(Entry::getKey)).map(Entry::getValue).forEach(pin -> + { + PinUsage usage = null; + while (usage == null) + try + { + System.out.print(" Usage for interface pin " + pin.name + " (empty: " + pin.usage + ") >"); + String usageStr = sysin.nextLine().toUpperCase(); + usage = usageStr.equals("") ? pin.usage + : usageStr.equals("I") ? PinUsage.INPUT + : usageStr.equals("O") ? PinUsage.OUTPUT + : usageStr.equals("T") ? PinUsage.TRISTATE : PinUsage.valueOf(usageStr); + } + catch (@SuppressWarnings("unused") IllegalArgumentException e) + { + System.err.println(" Illegal usage"); + } + setInterfacePinUsage(comp, pin, usage); + }); + LogicModelModifiable submodelModifiable = comp.getSubmodelModifiable(); + Map componentNameRemapping = new HashMap<>(); + if (changeComponentNames) + { + componentNameRemapping.put(SubmodelComponent.SUBMODEL_INTERFACE_NAME, SubmodelComponent.SUBMODEL_INTERFACE_NAME); + LogicModelModifiable tempModel = new LogicModelModifiable(); + IdentifyParams iP = new IdentifyParams(); + submodelModifiable.getComponentsByName().entrySet().stream() + .filter(e -> !e.getKey().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)) + .sorted(Comparator.comparing(Entry::getKey, ReserializeJSONs::compareStringsWithIntegers)).forEach(e -> + { + String oldName = e.getKey(); + ModelComponent subcomp = e.getValue(); + String defaultName = tempModel.getDefaultComponentName(subcomp); + String newName = null; + while (newName == null) + { + System.out.print(" New name for component " + oldName + " of type " + subcomp.getIDForSerializing(iP) + + " (empty: " + defaultName + ") >"); + newName = sysin.nextLine(); + if (newName.equals("")) + newName = defaultName; + if (tempModel.getComponentsByName().containsKey(newName)) + { + System.err.println(" There already is a component with that name"); + newName = null; + } + } + componentNameRemapping.put(oldName, newName); + IndirectModelComponentCreator.createComponent(tempModel, subcomp.getIDForSerializing(iP), + subcomp.getParamsForSerializingJSON(iP), newName).moveTo(subcomp.getPosX(), subcomp.getPosY()); + }); + SubmodelInterface tempSubmodelInterface = new SubmodelInterface(tempModel); + for (Pin p : submodelModifiable.getComponentsByName().get(SubmodelComponent.SUBMODEL_INTERFACE_NAME).getPins().values()) + tempSubmodelInterface + .addPin(new Pin(tempModel, tempSubmodelInterface, p.name, p.logicWidth, p.usage, p.getRelX(), p.getRelY())); + for (ModelWire w : submodelModifiable.getWiresByName().values()) + createWire(componentNameRemapping::get, tempModel, w); + + Optional o; + while ((o = submodelModifiable.getComponentsByName().values().stream() + .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)).findAny()).isPresent()) + submodelModifiable.destroyComponent(o.get()); + + tempModel.getComponentsByName().values().stream() + .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)) + .forEach(c -> IndirectModelComponentCreator.createComponent(submodelModifiable, c.getIDForSerializing(iP), + c.getParamsForSerializingJSON(iP), c.getName()).moveTo(c.getPosX(), c.getPosY())); + for (ModelWire w : tempModel.getWiresByName().values()) + createWire(Function.identity(), submodelModifiable, w); + } + if (snapWCPs) + submodelModifiable.getComponentsByName().values().stream().filter(c -> c instanceof ModelWireCrossPoint).forEach(c -> + { + double x = c.getPosX(); + double y = c.getPosY(); + c.moveTo(x % GRIDSIZE == 0 ? x - 1 : x, y % GRIDSIZE == 0 ? y - 1 : y); + }); + if (warnNonSnappedPoints) + { + if (comp.getWidth() % GRIDSIZE != 0 || comp.getHeight() % GRIDSIZE != 0) + System.out.println(" Size is not snapped to grid: " + comp.getWidth() + "," + comp.getHeight()); + submodelModifiable.getComponentsByName().values().forEach(c -> + { + double x = c.getPosX(); + double y = c.getPosY(); + if (c instanceof ModelWireCrossPoint) + { + x++; + y++; + } + if (x % GRIDSIZE != 0 || y % GRIDSIZE != 0) + System.out.println(" Component " + c.getName() + " (type " + c.getIDForSerializing(new IdentifyParams()) + + ") is not snapped to grid: " + x + "," + y); + }); + submodelModifiable.getWiresByName().values().stream().forEach(w -> + { + Point[] p = w.getPath(); + if (p != null) + for (int i = 0; i < p.length; i++) + if (p[i].x % GRIDSIZE != 0 || p[i].y % GRIDSIZE != 0) + System.out.println( + " Wire " + w.name + " path point #" + i + " is not snapped to grid: " + p[i].x + "," + p[i].y); + }); + comp.getPins().values().forEach(p -> + { + if (p.getRelX() % GRIDSIZE != 0 || p.getRelY() % GRIDSIZE != 0) + System.out.println(" Interface point " + p.name + " is not snapped to grid: " + p.getRelX() + "," + p.getRelY()); + }); + } + SubmodelComponentSerializer.serialize(comp, componentPath.toString()); + if (changeComponentNames && (comp.getHighLevelStateHandler() == null + || !(comp.getHighLevelStateHandler() instanceof DefaultHighLevelStateHandler))) + { + System.out.println(" A non-default HighLevelStateHandler was detected. Check for changes there manually."); + System.out.print(" Empty line to continue to next component, old component name to get new component name >"); + for (String line = sysin.nextLine(); !line.equals(""); line = sysin.nextLine()) + System.out.println(" " + line + "->" + componentNameRemapping.get(line) + " >"); + } + } + catch (Exception e) + { + System.err.println("An error occurred visiting " + componentPath + ":"); + e.printStackTrace(); + } + } + + private static ModelWire createWire(Function componentNameRemapping, LogicModelModifiable tempModelForDefaultNames, + ModelWire w) + { + return new ModelWire(tempModelForDefaultNames, w.name, + getRemappedPin(componentNameRemapping, tempModelForDefaultNames, w.getPin1()), + getRemappedPin(componentNameRemapping, tempModelForDefaultNames, w.getPin2()), w.getPath()); + } + + private static Pin getRemappedPin(Function componentNameRemapping, LogicModelModifiable tempModelForDefaultNames, + Pin pin) + { + return tempModelForDefaultNames.getComponentsByName().get(componentNameRemapping.apply(pin.component.getName())).getPin(pin.name); + } + + private static int compareStringsWithIntegers(String a, String b) + { + int aLoc = 0; + int bLoc = 0; + for (;;) + { + if (aLoc == a.length()) + { + if (bLoc == b.length()) + return 0; + return -1; + } + if (bLoc == b.length()) + return 1; + int aInt = 0; + int aIntLen = 0; + char nextCharA; + for (;;) + { + nextCharA = a.charAt(aLoc++); + if (nextCharA < '0' || nextCharA > '9') + break; + aIntLen++; + aInt = aInt * 10 + nextCharA - '0'; + if (aLoc == a.length()) + break; + } + int bInt = 0; + int bIntLen = 0; + char nextCharB; + for (;;) + { + nextCharB = b.charAt(bLoc++); + if (nextCharB < '0' || nextCharB > '9') + break; + bIntLen++; + bInt = bInt * 10 + nextCharB - '0'; + if (bLoc == b.length()) + break; + } + if (aIntLen != 0) + { + if (bIntLen == 0) + return -1; + int comp = Integer.compare(aInt, bInt); + if (comp != 0) + return comp; + } else + { + if (bIntLen != 0) + return 1; + int comp = Character.compare(nextCharA, nextCharB); + if (comp != 0) + return comp; + } + } + } + + private static void setInterfacePinUsage(DeserializedSubmodelComponent comp, Pin interfacePin, PinUsage usage) + { + Set wiresConnectedToPin = comp.submodel.getWiresByName().values().stream() + .filter(w -> w.getPin1() == interfacePin || w.getPin2() == interfacePin).collect(Collectors.toSet()); + LogicModelModifiable submodelModifiable = comp.getSubmodelModifiable(); + wiresConnectedToPin.forEach(submodelModifiable::destroyWire); + comp.removeSubmodelInterface(interfacePin.name); + comp.addSubmodelInterface(new MovablePin(submodelModifiable, comp, interfacePin.name, interfacePin.logicWidth, usage, + interfacePin.getRelX(), interfacePin.getRelY())); + wiresConnectedToPin.forEach(w -> new ModelWire(submodelModifiable, w.getPin1(), w.getPin2())); + } +} \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONsSettingUsages.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONsSettingUsages.java deleted file mode 100644 index 0788589c..00000000 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONsSettingUsages.java +++ /dev/null @@ -1,282 +0,0 @@ -package net.mograsim.logic.model.examples; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.Scanner; -import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import net.haspamelodica.swt.helper.swtobjectwrappers.Point; -import net.mograsim.logic.model.am2900.Am2900Loader; -import net.mograsim.logic.model.model.LogicModelModifiable; -import net.mograsim.logic.model.model.components.ModelComponent; -import net.mograsim.logic.model.model.components.submodels.SubmodelComponent; -import net.mograsim.logic.model.model.components.submodels.SubmodelInterface; -import net.mograsim.logic.model.model.wires.ModelWire; -import net.mograsim.logic.model.model.wires.ModelWireCrossPoint; -import net.mograsim.logic.model.model.wires.MovablePin; -import net.mograsim.logic.model.model.wires.Pin; -import net.mograsim.logic.model.model.wires.PinUsage; -import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent; -import net.mograsim.logic.model.serializing.IdentifyParams; -import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; -import net.mograsim.logic.model.serializing.SubmodelComponentSerializer; -import net.mograsim.logic.model.snippets.highlevelstatehandlers.DefaultHighLevelStateHandler; - -public class ReserializeJSONsSettingUsages -{ - public static double GRIDSIZE = 2.5; - public static boolean changePinUsages = false; - public static boolean changeComponentNames = false; - public static boolean snapWCPs = true; - public static boolean warnNonSnappedPoints = true; - - public static void main(String[] args) throws IOException - { - Am2900Loader.setup(); - try (Scanner sysin = new Scanner(System.in)) - { - System.out.print("Directory to search for JSONs in / JSON file to reserialize >"); - Path root = Paths.get(sysin.nextLine()); - if (!Files.exists(root)) - throw new IllegalArgumentException("Path doesn't exist"); - if (Files.isRegularFile(root)) - reserializeJSON(root, sysin); - else - { - System.out.print("Recursive? >"); - boolean recursive = Boolean.valueOf(sysin.nextLine()); - try (Stream jsons = recursive ? Files.walk(root) : Files.list(root)) - { - jsons.filter(Files::isRegularFile).filter(p -> p.getFileName().toString().endsWith(".json")) - .forEach(j -> reserializeJSON(j, sysin)); - } - } - } - } - - public static void reserializeJSON(Path componentPath, Scanner sysin) - { - try - { - DeserializedSubmodelComponent comp = (DeserializedSubmodelComponent) IndirectModelComponentCreator - .createComponent(new LogicModelModifiable(), "jsonfile:" + componentPath.toString()); - System.out.println("Reserializing " + componentPath); - if (changePinUsages) - comp.getSupermodelPins().entrySet().stream().sorted(Comparator.comparing(Entry::getKey)).map(Entry::getValue).forEach(pin -> - { - PinUsage usage = null; - while (usage == null) - try - { - System.out.print(" Usage for interface pin " + pin.name + " (empty: " + pin.usage + ") >"); - String usageStr = sysin.nextLine().toUpperCase(); - usage = usageStr.equals("") ? pin.usage - : usageStr.equals("I") ? PinUsage.INPUT - : usageStr.equals("O") ? PinUsage.OUTPUT - : usageStr.equals("T") ? PinUsage.TRISTATE : PinUsage.valueOf(usageStr); - } - catch (@SuppressWarnings("unused") IllegalArgumentException e) - { - System.err.println(" Illegal usage"); - } - setInterfacePinUsage(comp, pin, usage); - }); - LogicModelModifiable submodelModifiable = comp.getSubmodelModifiable(); - Map componentNameRemapping = new HashMap<>(); - if (changeComponentNames) - { - componentNameRemapping.put(SubmodelComponent.SUBMODEL_INTERFACE_NAME, SubmodelComponent.SUBMODEL_INTERFACE_NAME); - LogicModelModifiable tempModel = new LogicModelModifiable(); - IdentifyParams iP = new IdentifyParams(); - submodelModifiable.getComponentsByName().entrySet().stream() - .filter(e -> !e.getKey().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)) - .sorted(Comparator.comparing(Entry::getKey, ReserializeJSONsSettingUsages::compareStringsWithIntegers)).forEach(e -> - { - String oldName = e.getKey(); - ModelComponent subcomp = e.getValue(); - String defaultName = tempModel.getDefaultComponentName(subcomp); - String newName = null; - while (newName == null) - { - System.out.print(" New name for component " + oldName + " of type " + subcomp.getIDForSerializing(iP) - + " (empty: " + defaultName + ") >"); - newName = sysin.nextLine(); - if (newName.equals("")) - newName = defaultName; - if (tempModel.getComponentsByName().containsKey(newName)) - { - System.err.println(" There already is a component with that name"); - newName = null; - } - } - componentNameRemapping.put(oldName, newName); - IndirectModelComponentCreator.createComponent(tempModel, subcomp.getIDForSerializing(iP), - subcomp.getParamsForSerializingJSON(iP), newName).moveTo(subcomp.getPosX(), subcomp.getPosY()); - }); - SubmodelInterface tempSubmodelInterface = new SubmodelInterface(tempModel); - for (Pin p : submodelModifiable.getComponentsByName().get(SubmodelComponent.SUBMODEL_INTERFACE_NAME).getPins().values()) - tempSubmodelInterface - .addPin(new Pin(tempModel, tempSubmodelInterface, p.name, p.logicWidth, p.usage, p.getRelX(), p.getRelY())); - for (ModelWire w : submodelModifiable.getWiresByName().values()) - createWire(componentNameRemapping::get, tempModel, w); - - Optional o; - while ((o = submodelModifiable.getComponentsByName().values().stream() - .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)).findAny()).isPresent()) - submodelModifiable.destroyComponent(o.get()); - - tempModel.getComponentsByName().values().stream() - .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)) - .forEach(c -> IndirectModelComponentCreator.createComponent(submodelModifiable, c.getIDForSerializing(iP), - c.getParamsForSerializingJSON(iP), c.getName()).moveTo(c.getPosX(), c.getPosY())); - for (ModelWire w : tempModel.getWiresByName().values()) - createWire(Function.identity(), submodelModifiable, w); - } - if (snapWCPs) - submodelModifiable.getComponentsByName().values().stream().filter(c -> c instanceof ModelWireCrossPoint).forEach(c -> - { - double x = c.getPosX(); - double y = c.getPosY(); - c.moveTo(x % GRIDSIZE == 0 ? x - 1 : x, y % GRIDSIZE == 0 ? y - 1 : y); - }); - if (warnNonSnappedPoints) - { - submodelModifiable.getComponentsByName().values().forEach(c -> - { - double x = c.getPosX(); - double y = c.getPosY(); - if (c instanceof ModelWireCrossPoint) - { - x++; - y++; - } - if (x % GRIDSIZE != 0 || y % GRIDSIZE != 0) - System.out.println(" Component " + c.getName() + " (type " + c.getIDForSerializing(new IdentifyParams()) - + ") is not snapped to grid: " + x + "," + y); - }); - submodelModifiable.getWiresByName().values().stream().forEach(w -> - { - Point[] p = w.getPath(); - if (p != null) - for (int i = 0; i < p.length; i++) - if (p[i].x % GRIDSIZE != 0 || p[i].y % GRIDSIZE != 0) - System.out.println( - " Wire " + w.name + " path point #" + i + " is not snapped to grid: " + p[i].x + "," + p[i].y); - }); - comp.getPins().values().forEach(p -> - { - if (p.getRelX() % GRIDSIZE != 0 || p.getRelY() % GRIDSIZE != 0) - System.out.println(" Interface point " + p.name + " is not snapped to grid: " + p.getRelX() + "," + p.getRelY()); - }); - } - SubmodelComponentSerializer.serialize(comp, componentPath.toString()); - if (changeComponentNames && (comp.getHighLevelStateHandler() == null - || !(comp.getHighLevelStateHandler() instanceof DefaultHighLevelStateHandler))) - { - System.out.println(" A non-default HighLevelStateHandler was detected. Check for changes there manually."); - System.out.print(" Empty line to continue to next component, old component name to get new component name >"); - for (String line = sysin.nextLine(); !line.equals(""); line = sysin.nextLine()) - System.out.println(" " + line + "->" + componentNameRemapping.get(line) + " >"); - } - } - catch (Exception e) - { - System.err.println("An error occurred visiting " + componentPath + ":"); - e.printStackTrace(); - } - } - - private static ModelWire createWire(Function componentNameRemapping, LogicModelModifiable tempModelForDefaultNames, - ModelWire w) - { - return new ModelWire(tempModelForDefaultNames, w.name, - getRemappedPin(componentNameRemapping, tempModelForDefaultNames, w.getPin1()), - getRemappedPin(componentNameRemapping, tempModelForDefaultNames, w.getPin2()), w.getPath()); - } - - private static Pin getRemappedPin(Function componentNameRemapping, LogicModelModifiable tempModelForDefaultNames, - Pin pin) - { - return tempModelForDefaultNames.getComponentsByName().get(componentNameRemapping.apply(pin.component.getName())).getPin(pin.name); - } - - private static int compareStringsWithIntegers(String a, String b) - { - int aLoc = 0; - int bLoc = 0; - for (;;) - { - if (aLoc == a.length()) - { - if (bLoc == b.length()) - return 0; - return -1; - } - if (bLoc == b.length()) - return 1; - int aInt = 0; - int aIntLen = 0; - char nextCharA; - for (;;) - { - nextCharA = a.charAt(aLoc++); - if (nextCharA < '0' || nextCharA > '9') - break; - aIntLen++; - aInt = aInt * 10 + nextCharA - '0'; - if (aLoc == a.length()) - break; - } - int bInt = 0; - int bIntLen = 0; - char nextCharB; - for (;;) - { - nextCharB = b.charAt(bLoc++); - if (nextCharB < '0' || nextCharB > '9') - break; - bIntLen++; - bInt = bInt * 10 + nextCharB - '0'; - if (bLoc == b.length()) - break; - } - if (aIntLen != 0) - { - if (bIntLen == 0) - return -1; - int comp = Integer.compare(aInt, bInt); - if (comp != 0) - return comp; - } else - { - if (bIntLen != 0) - return 1; - int comp = Character.compare(nextCharA, nextCharB); - if (comp != 0) - return comp; - } - } - } - - private static void setInterfacePinUsage(DeserializedSubmodelComponent comp, Pin interfacePin, PinUsage usage) - { - Set wiresConnectedToPin = comp.submodel.getWiresByName().values().stream() - .filter(w -> w.getPin1() == interfacePin || w.getPin2() == interfacePin).collect(Collectors.toSet()); - LogicModelModifiable submodelModifiable = comp.getSubmodelModifiable(); - wiresConnectedToPin.forEach(submodelModifiable::destroyWire); - comp.removeSubmodelInterface(interfacePin.name); - comp.addSubmodelInterface(new MovablePin(submodelModifiable, comp, interfacePin.name, interfacePin.logicWidth, usage, - interfacePin.getRelX(), interfacePin.getRelY())); - wiresConnectedToPin.forEach(w -> new ModelWire(submodelModifiable, w.getPin1(), w.getPin2())); - } -} \ No newline at end of file diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java index 9171ee83..d543c543 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java @@ -168,17 +168,30 @@ public abstract class ModelComponent implements JSONSerializable * Returns the pin with the given name of this component. * * @throws IllegalArgumentException if there is no pin with the given name + * @see #getPinOrNull(String) * * @author Daniel Kirschten */ public Pin getPin(String name) { - Pin pin = pinsByName.get(name); + Pin pin = getPinOrNull(name); if (pin == null) throw new IllegalArgumentException("No pin with the name " + name); return pin; } + /** + * Returns the pin with the given name of this component, or null if there is no such pin. + * + * @see #getPin(String) + * + * @author Daniel Kirschten + */ + public Pin getPinOrNull(String name) + { + return pinsByName.get(name); + } + // high-level access /** diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelMerger.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelMerger.java index 71523921..6efc9ad3 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelMerger.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelMerger.java @@ -8,6 +8,8 @@ import net.mograsim.logic.core.types.BitVectorFormatter; import net.mograsim.logic.core.wires.CoreWire.ReadEnd; import net.mograsim.logic.model.model.LogicModelModifiable; import net.mograsim.logic.model.model.components.ModelComponent; +import net.mograsim.logic.model.model.components.Orientation; +import net.mograsim.logic.model.model.components.atomic.ModelSplitter.SplitterParams; import net.mograsim.logic.model.model.wires.Pin; import net.mograsim.logic.model.model.wires.PinUsage; import net.mograsim.logic.model.modeladapter.LogicCoreAdapter; @@ -18,6 +20,7 @@ import net.mograsim.preferences.ColorDefinition; import net.mograsim.preferences.ColorManager; import net.mograsim.preferences.Preferences; +//TODO delete this legacy class public class ModelMerger extends ModelComponent { private static final double width = 10; @@ -41,8 +44,8 @@ public class ModelMerger extends ModelComponent setSize(width, (logicWidth - 1) * heightPerPin); double inputHeight = (logicWidth - 1) * heightPerPin; for (int i = 0; i < logicWidth; i++, inputHeight -= 10) - addPin(new Pin(model, this, "I" + i, 1, PinUsage.TRISTATE, 0, inputHeight)); - addPin(this.outputPin = new Pin(model, this, "O", logicWidth, PinUsage.TRISTATE, width, (logicWidth - 1) * heightPerPin / 2)); + addPin(new Pin(model, this, "O" + i, 1, PinUsage.TRISTATE, 0, inputHeight)); + addPin(this.outputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, width, (logicWidth - 1) * heightPerPin / 2)); inputEnds = new ReadEnd[logicWidth]; init(); @@ -81,16 +84,26 @@ public class ModelMerger extends ModelComponent gc.setLineCap(oldLineCap); } + @Override + public Pin getPin(String name) + { + Pin pin = getPinOrNull(name); + return pin == null ? getPin(name.replace('O', 'i').replace('I', 'O').replace('i', 'I')) : pin; + } + @Override public String getIDForSerializing(IdentifyParams idParams) { - return "Merger"; + return "Splitter"; } @Override - public Integer getParamsForSerializing(IdentifyParams idParams) + public SplitterParams getParamsForSerializing(IdentifyParams idParams) { - return logicWidth; + SplitterParams splitterParams = new SplitterParams(); + splitterParams.logicWidth = logicWidth; + splitterParams.orientation = Orientation.LEFT; + return splitterParams; } public void setCoreModelBinding(ReadEnd[] inputEnds, ReadEnd outputEnd) diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java index 708a4ad0..962f2acc 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java @@ -8,12 +8,15 @@ import net.mograsim.logic.core.types.BitVectorFormatter; import net.mograsim.logic.core.wires.CoreWire.ReadEnd; import net.mograsim.logic.model.model.LogicModelModifiable; import net.mograsim.logic.model.model.components.ModelComponent; +import net.mograsim.logic.model.model.components.Orientation; +import net.mograsim.logic.model.model.components.OrientationCalculator; import net.mograsim.logic.model.model.wires.Pin; import net.mograsim.logic.model.model.wires.PinUsage; import net.mograsim.logic.model.modeladapter.LogicCoreAdapter; import net.mograsim.logic.model.modeladapter.componentadapters.SplitterAdapter; import net.mograsim.logic.model.serializing.IdentifyParams; import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; +import net.mograsim.logic.model.util.JsonHandler; import net.mograsim.preferences.ColorDefinition; import net.mograsim.preferences.ColorManager; import net.mograsim.preferences.Preferences; @@ -23,26 +26,31 @@ public class ModelSplitter extends ModelComponent private static final double width = 10; private static final double heightPerPin = 10; + private final double heightWithoutOC; public final int logicWidth; + private final OrientationCalculator oc; private final Pin inputPin; private ReadEnd inputEnd; private final ReadEnd[] outputEnds; - public ModelSplitter(LogicModelModifiable model, int logicWidth) + public ModelSplitter(LogicModelModifiable model, SplitterParams params) { - this(model, logicWidth, null); + this(model, params, null); } - public ModelSplitter(LogicModelModifiable model, int logicWidth, String name) + public ModelSplitter(LogicModelModifiable model, SplitterParams params, String name) { super(model, name, false); - this.logicWidth = logicWidth; - setSize(width, (logicWidth - 1) * heightPerPin); - addPin(this.inputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, 0, (logicWidth - 1) * heightPerPin / 2)); + this.logicWidth = params.logicWidth; + this.oc = new OrientationCalculator(toggleLeftDownAlt(params.orientation), width, + this.heightWithoutOC = (logicWidth - 1) * heightPerPin); + setSize(oc.width(), oc.height()); + double inLineY = (logicWidth - 1) * heightPerPin / 2; + addPin(this.inputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, oc.newX(0, inLineY), oc.newY(0, inLineY))); double outputHeight = (logicWidth - 1) * heightPerPin; for (int i = 0; i < logicWidth; i++, outputHeight -= 10) - addPin(new Pin(model, this, "O" + i, 1, PinUsage.TRISTATE, width, outputHeight)); + addPin(new Pin(model, this, "O" + i, 1, PinUsage.TRISTATE, oc.newX(width, outputHeight), oc.newY(width, outputHeight))); outputEnds = new ReadEnd[logicWidth]; init(); @@ -59,16 +67,18 @@ public class ModelSplitter extends ModelComponent gc.setForeground(ColorManager.current().toColor(c)); gc.setLineWidth( Preferences.current().getDouble("net.mograsim.logic.model.linewidth.wire." + (logicWidth == 1 ? "singlebit" : "multibit"))); - double inLineY = posY + (logicWidth - 1) * heightPerPin / 2; - gc.drawLine(posX, inLineY, posX + width / 2, inLineY); + double inLineY = heightWithoutOC / 2; + gc.drawLine(posX + oc.newX(0, inLineY), posY + oc.newY(0, inLineY), posX + oc.newX(width / 2, inLineY), + posY + oc.newY(width / 2, inLineY)); gc.setLineWidth(Preferences.current().getDouble("net.mograsim.logic.model.linewidth.wire.singlebit")); - double outputHeight = posY; + double outputHeight = 0; for (int i = 0; i < logicWidth; i++, outputHeight += 10) { c = BitVectorFormatter.formatAsColor(outputEnds[i]); if (c != null) gc.setForeground(ColorManager.current().toColor(c)); - gc.drawLine(posX + width / 2, outputHeight, posX + width, outputHeight); + gc.drawLine(posX + oc.newX(width / 2, outputHeight), posY + oc.newY(width / 2, outputHeight), + posX + oc.newX(width, outputHeight), posY + oc.newY(width, outputHeight)); } gc.setForeground(Preferences.current().getColor("net.mograsim.logic.model.color.foreground")); int oldLineCap = gc.getLineCap(); @@ -76,7 +86,8 @@ public class ModelSplitter extends ModelComponent // TODO find better "replacement" for JOIN_BEVEL // TODO it looks weird that the vertical line is thinner than the single multibit wire. gc.setLineCap(lineJoin == SWT.JOIN_MITER ? SWT.CAP_SQUARE : lineJoin == SWT.JOIN_ROUND ? SWT.CAP_ROUND : SWT.CAP_SQUARE); - gc.drawLine(posX + width / 2, posY, posX + width / 2, posY + heightPerPin * (logicWidth - 1)); + gc.drawLine(posX + oc.newX(width / 2, 0), posY + oc.newY(width / 2, 0), posX + oc.newX(width / 2, heightWithoutOC), + posY + oc.newY(width / 2, heightWithoutOC)); gc.setLineWidth(Preferences.current().getDouble("net.mograsim.logic.model.linewidth.default")); gc.setLineCap(oldLineCap); } @@ -88,9 +99,12 @@ public class ModelSplitter extends ModelComponent } @Override - public Integer getParamsForSerializing(IdentifyParams idParams) + public SplitterParams getParamsForSerializing(IdentifyParams idParams) { - return logicWidth; + SplitterParams splitterParams = new SplitterParams(); + splitterParams.logicWidth = logicWidth; + splitterParams.orientation = toggleLeftDownAlt(oc.getOrientation()); + return splitterParams; } public void setCoreModelBinding(ReadEnd inputEnd, ReadEnd[] outputEnds) @@ -104,10 +118,48 @@ public class ModelSplitter extends ModelComponent return inputPin; } + /** + * Used to leave bit order intuitive (MSB left or on top) + */ + private static Orientation toggleLeftDownAlt(Orientation orientation) + { + // TODO if we upgrade to Java 12, replace with switch-expression + switch (orientation) + { + case LEFT: + return Orientation.LEFT_ALT; + case LEFT_ALT: + return Orientation.LEFT; + case DOWN: + return Orientation.DOWN_ALT; + case DOWN_ALT: + return Orientation.DOWN; + default: + return orientation; + } + } + + public static class SplitterParams + { + public int logicWidth; + public Orientation orientation; + } + static { LogicCoreAdapter.addComponentAdapter(new SplitterAdapter()); - IndirectModelComponentCreator.setComponentSupplier(ModelSplitter.class.getCanonicalName(), - (m, p, n) -> new ModelSplitter(m, p.getAsInt(), n)); + IndirectModelComponentCreator.setComponentSupplier(ModelSplitter.class.getCanonicalName(), (m, p, n) -> + { + // TODO remove legacy params parsing + SplitterParams params; + if (p.isJsonPrimitive()) + { + params = new SplitterParams(); + params.logicWidth = p.getAsInt(); + params.orientation = Orientation.RIGHT; + } else + params = JsonHandler.fromJsonTree(p, SplitterParams.class); + return new ModelSplitter(m, params, n); + }); } } \ No newline at end of file diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SubmodelComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SubmodelComponent.java index 5aa5e38c..9388e2fb 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SubmodelComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SubmodelComponent.java @@ -167,7 +167,7 @@ public abstract class SubmodelComponent extends ModelComponent default: throw new IllegalArgumentException("Unknown enum constant: " + supermodelPin.usage); } - MovablePin submodelPin = new MovablePin(model, submodelInterface, name, supermodelPin.logicWidth, submodelPinUsage, + MovablePin submodelPin = new MovablePin(submodelModifiable, submodelInterface, name, supermodelPin.logicWidth, submodelPinUsage, supermodelPin.getRelX() / submodelScale, supermodelPin.getRelY() / submodelScale); submodelPin.addPinMovedListener(p ->