From da41b8caf9b5b0016ecc029a5988d0b81766ef2c Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Sun, 8 Sep 2019 23:35:40 +0200 Subject: [PATCH] Further work in JSONs: -layouted Am2904 -ReserializeJSONsSettingUsages now can snap WCPs properly and reports all components, wire points, and interface pins not snapped to grid -relayouted Am2910 a bit -deleted obsolete mux2_4 --- .../logic/model/am2900/components/Am2900.json | 46 +- .../am2900/components/am2904/Am2904.json | 922 ++++++++++++++---- .../am2900/components/am2910/Am2910.json | 421 +++----- .../logic/model/am2900/components/mux2_4.json | 700 ------------- .../am2900/standardComponentIDMapping.json | 1 - .../ReserializeJSONsSettingUsages.java | 62 +- 6 files changed, 925 insertions(+), 1227 deletions(-) delete mode 100644 net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json 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 a6ac7ece..7afc8a7a 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 @@ -322,7 +322,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#0", "pos": { - "x": 200.0, + "x": 199.0, "y": 236.0 }, "params": 1 @@ -331,7 +331,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#1", "pos": { - "x": 400.0, + "x": 399.0, "y": 231.0 }, "params": 1 @@ -340,8 +340,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#10", "pos": { - "x": 415.0, - "y": 220.0 + "x": 414.0, + "y": 219.0 }, "params": 4 }, @@ -349,8 +349,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#11", "pos": { - "x": 410.0, - "y": 225.0 + "x": 409.0, + "y": 224.0 }, "params": 4 }, @@ -359,7 +359,7 @@ "name": "WireCrossPoint#12", "pos": { "x": 266.0, - "y": 555.0 + "y": 554.0 }, "params": 1 }, @@ -367,8 +367,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#13", "pos": { - "x": 245.0, - "y": 490.0 + "x": 244.0, + "y": 489.0 }, "params": 1 }, @@ -376,8 +376,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#14", "pos": { - "x": 355.0, - "y": 505.0 + "x": 354.0, + "y": 504.0 }, "params": 12 }, @@ -385,7 +385,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#2", "pos": { - "x": 470.0, + "x": 469.0, "y": 231.0 }, "params": 1 @@ -394,7 +394,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#3", "pos": { - "x": 535.0, + "x": 534.0, "y": 231.0 }, "params": 1 @@ -403,7 +403,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#4", "pos": { - "x": 230.0, + "x": 229.0, "y": 176.0 }, "params": 1 @@ -412,7 +412,7 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#5", "pos": { - "x": 235.0, + "x": 234.0, "y": 281.0 }, "params": 1 @@ -421,8 +421,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#6", "pos": { - "x": 525.0, - "y": 225.0 + "x": 524.0, + "y": 224.0 }, "params": 4 }, @@ -430,8 +430,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#7", "pos": { - "x": 530.0, - "y": 220.0 + "x": 529.0, + "y": 219.0 }, "params": 4 }, @@ -439,8 +439,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#8", "pos": { - "x": 465.0, - "y": 220.0 + "x": 464.0, + "y": 219.0 }, "params": 4 }, @@ -448,8 +448,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#9", "pos": { - "x": 460.0, - "y": 225.0 + "x": 459.0, + "y": 224.0 }, "params": 4 }, 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 a204e434..f6e571b8 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 @@ -1,6 +1,6 @@ { "width": 120.0, - "height": 178.0, + "height": 155.0, "interfacePins": [ { "location": { @@ -23,7 +23,7 @@ { "location": { "x": 120.0, - "y": 54.0 + "y": 55.0 }, "name": "CT", "logicWidth": 1, @@ -41,7 +41,7 @@ { "location": { "x": 0.0, - "y": 42.0 + "y": 45.0 }, "name": "I", "logicWidth": 13, @@ -86,7 +86,7 @@ { "location": { "x": 120.0, - "y": 128.0 + "y": 125.0 }, "name": "QIO0", "logicWidth": 1, @@ -95,7 +95,7 @@ { "location": { "x": 0.0, - "y": 128.0 + "y": 125.0 }, "name": "QIOn", "logicWidth": 1, @@ -113,7 +113,7 @@ { "location": { "x": 0.0, - "y": 119.0 + "y": 120.0 }, "name": "SIOn", "logicWidth": 1, @@ -211,7 +211,7 @@ }, { "location": { - "x": 113.0, + "x": 110.0, "y": 0.0 }, "name": "_OECT", @@ -285,7 +285,7 @@ "name": "Merger#0", "pos": { "x": 20.0, - "y": 220.0 + "y": 235.0 }, "params": 6 }, @@ -294,7 +294,7 @@ "name": "Merger#1", "pos": { "x": 20.0, - "y": 170.0 + "y": 185.0 }, "params": 5 }, @@ -321,7 +321,7 @@ "name": "Merger#4", "pos": { "x": 20.0, - "y": 150.0 + "y": 165.0 }, "params": 2 }, @@ -438,7 +438,7 @@ "name": "Splitter#0", "pos": { "x": 5.0, - "y": 150.0 + "y": 165.0 }, "params": 13 }, @@ -464,8 +464,8 @@ "id": "Splitter", "name": "Splitter#11", "pos": { - "x": 405.0, - "y": 585.0 + "x": 455.0, + "y": 635.0 }, "params": 3 }, @@ -473,8 +473,8 @@ "id": "Splitter", "name": "Splitter#12", "pos": { - "x": 410.0, - "y": 665.0 + "x": 455.0, + "y": 710.0 }, "params": 3 }, @@ -482,8 +482,8 @@ "id": "Splitter", "name": "Splitter#13", "pos": { - "x": 265.0, - "y": 725.0 + "x": 135.0, + "y": 645.0 }, "params": 3 }, @@ -491,8 +491,8 @@ "id": "Splitter", "name": "Splitter#14", "pos": { - "x": 90.0, - "y": 730.0 + "x": 310.0, + "y": 645.0 }, "params": 3 }, @@ -593,8 +593,8 @@ "id": "TriStateBuffer", "name": "TriStateBuffer#1", "pos": { - "x": 10.0, - "y": 650.0 + "x": 400.0, + "y": 635.0 }, "params": { "logicWidth": 1, @@ -605,8 +605,8 @@ "id": "TriStateBuffer", "name": "TriStateBuffer#2", "pos": { - "x": 10.0, - "y": 605.0 + "x": 240.0, + "y": 635.0 }, "params": { "logicWidth": 1, @@ -617,8 +617,8 @@ "id": "TriStateBuffer", "name": "TriStateBuffer#3", "pos": { - "x": 560.0, - "y": 595.0 + "x": 550.0, + "y": 625.0 }, "params": { "logicWidth": 1, @@ -629,8 +629,8 @@ "id": "TriStateBuffer", "name": "TriStateBuffer#4", "pos": { - "x": 565.0, - "y": 655.0 + "x": 550.0, + "y": 650.0 }, "params": { "logicWidth": 1, @@ -642,7 +642,7 @@ "name": "TriStateBuffer#5", "pos": { "x": 575.0, - "y": 260.0 + "y": 265.0 }, "params": { "logicWidth": 1, @@ -653,8 +653,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#0", "pos": { - "x": 275.0, - "y": 60.0 + "x": 274.0, + "y": 59.0 }, "params": 1 }, @@ -662,8 +662,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#1", "pos": { - "x": 190.0, - "y": 140.0 + "x": 189.0, + "y": 139.0 }, "params": 4 }, @@ -671,8 +671,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#10", "pos": { - "x": 180.0, - "y": 55.0 + "x": 179.0, + "y": 54.0 }, "params": 1 }, @@ -680,8 +680,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#11", "pos": { - "x": 180.0, - "y": 15.0 + "x": 179.0, + "y": 14.0 }, "params": 1 }, @@ -689,8 +689,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#12", "pos": { - "x": 180.0, - "y": 35.0 + "x": 179.0, + "y": 34.0 }, "params": 1 }, @@ -698,8 +698,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#13", "pos": { - "x": 450.0, - "y": 65.0 + "x": 449.0, + "y": 64.0 }, "params": 1 }, @@ -707,8 +707,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#14", "pos": { - "x": 535.0, - "y": 110.0 + "x": 534.0, + "y": 109.0 }, "params": 4 }, @@ -716,8 +716,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#15", "pos": { - "x": 335.0, - "y": 175.0 + "x": 334.0, + "y": 174.0 }, "params": 4 }, @@ -725,8 +725,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#16", "pos": { - "x": 385.0, - "y": 165.0 + "x": 384.0, + "y": 164.0 }, "params": 4 }, @@ -734,8 +734,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#17", "pos": { - "x": 350.0, - "y": 440.0 + "x": 349.0, + "y": 439.0 }, "params": 1 }, @@ -743,8 +743,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#18", "pos": { - "x": 35.0, - "y": 640.0 + "x": 434.0, + "y": 674.0 }, "params": 1 }, @@ -752,8 +752,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#19", "pos": { - "x": 35.0, - "y": 595.0 + "x": 264.0, + "y": 619.0 }, "params": 1 }, @@ -761,8 +761,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#2", "pos": { - "x": 330.0, - "y": 125.0 + "x": 329.0, + "y": 124.0 }, "params": 4 }, @@ -770,8 +770,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#20", "pos": { - "x": 585.0, - "y": 590.0 + "x": 289.0, + "y": 609.0 }, "params": 1 }, @@ -779,8 +779,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#21", "pos": { - "x": 585.0, - "y": 640.0 + "x": 294.0, + "y": 614.0 }, "params": 1 }, @@ -788,8 +788,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#22", "pos": { - "x": 270.0, - "y": 515.0 + "x": 359.0, + "y": 514.0 }, "params": 1 }, @@ -797,8 +797,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#23", "pos": { - "x": 325.0, - "y": 640.0 + "x": 359.0, + "y": 594.0 }, "params": 1 }, @@ -806,8 +806,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#24", "pos": { - "x": 285.0, - "y": 745.0 + "x": 149.0, + "y": 664.0 }, "params": 1 }, @@ -815,8 +815,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#25", "pos": { - "x": 285.0, - "y": 755.0 + "x": 149.0, + "y": 674.0 }, "params": 1 }, @@ -824,8 +824,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#26", "pos": { - "x": 290.0, - "y": 805.0 + "x": 299.0, + "y": 584.0 }, "params": 1 }, @@ -833,8 +833,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#27", "pos": { - "x": 470.0, - "y": 400.0 + "x": 464.0, + "y": 399.0 }, "params": 1 }, @@ -842,8 +842,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#28", "pos": { - "x": 465.0, - "y": 350.0 + "x": 459.0, + "y": 349.0 }, "params": 1 }, @@ -851,8 +851,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#29", "pos": { - "x": 550.0, - "y": 570.0 + "x": 559.0, + "y": 619.0 }, "params": 1 }, @@ -860,8 +860,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#3", "pos": { - "x": 405.0, - "y": 120.0 + "x": 404.0, + "y": 119.0 }, "params": 4 }, @@ -869,8 +869,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#30", "pos": { - "x": 85.0, - "y": 590.0 + "x": 249.0, + "y": 629.0 }, "params": 1 }, @@ -878,8 +878,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#31", "pos": { - "x": 550.0, - "y": 240.0 + "x": 549.0, + "y": 239.0 }, "params": 1 }, @@ -887,8 +887,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#32", "pos": { - "x": 405.0, - "y": 170.0 + "x": 404.0, + "y": 169.0 }, "params": 4 }, @@ -896,17 +896,89 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#33", "pos": { - "x": 390.0, - "y": 210.0 + "x": 389.0, + "y": 209.0 }, "params": 4 }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#34", + "pos": { + "x": 439.0, + "y": 684.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#35", + "pos": { + "x": 429.0, + "y": 664.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#36", + "pos": { + "x": 429.0, + "y": 619.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#37", + "pos": { + "x": 434.0, + "y": 644.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#38", + "pos": { + "x": 579.0, + "y": 609.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#39", + "pos": { + "x": 429.0, + "y": 609.0 + }, + "params": 1 + }, { "id": "WireCrossPoint", "name": "WireCrossPoint#4", "pos": { - "x": 225.0, - "y": 15.0 + "x": 224.0, + "y": 14.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#40", + "pos": { + "x": 584.0, + "y": 624.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#41", + "pos": { + "x": 434.0, + "y": 614.0 }, "params": 1 }, @@ -914,8 +986,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#5", "pos": { - "x": 570.0, - "y": 55.0 + "x": 569.0, + "y": 54.0 }, "params": 4 }, @@ -923,8 +995,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#6", "pos": { - "x": 135.0, - "y": 20.0 + "x": 134.0, + "y": 19.0 }, "params": 1 }, @@ -932,8 +1004,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#7", "pos": { - "x": 320.0, - "y": 40.0 + "x": 319.0, + "y": 39.0 }, "params": 1 }, @@ -941,8 +1013,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#8", "pos": { - "x": 320.0, - "y": 20.0 + "x": 319.0, + "y": 19.0 }, "params": 1 }, @@ -950,8 +1022,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#9", "pos": { - "x": 320.0, - "y": 60.0 + "x": 319.0, + "y": 59.0 }, "params": 1 }, @@ -968,7 +1040,7 @@ "name": "mux1#0", "pos": { "x": 495.0, - "y": 275.0 + "y": 280.0 } }, { @@ -1031,24 +1103,24 @@ "id": "mux2", "name": "mux2#0", "pos": { - "x": 435.0, - "y": 575.0 + "x": 470.0, + "y": 625.0 } }, { "id": "mux2", "name": "mux2#1", "pos": { - "x": 435.0, - "y": 655.0 + "x": 470.0, + "y": 700.0 } }, { "id": "mux2", "name": "mux2#2", "pos": { - "x": 120.0, - "y": 720.0 + "x": 325.0, + "y": 635.0 } }, { @@ -1063,8 +1135,8 @@ "id": "mux3", "name": "mux3#1", "pos": { - "x": 300.0, - "y": 715.0 + "x": 155.0, + "y": 635.0 } }, { @@ -1080,7 +1152,7 @@ "name": "xor#0", "pos": { "x": 535.0, - "y": 265.0 + "y": 270.0 } }, { @@ -1088,7 +1160,7 @@ "name": "xor#1", "pos": { "x": 475.0, - "y": 315.0 + "y": 320.0 } }, { @@ -1103,8 +1175,8 @@ "id": "xor", "name": "xor#3", "pos": { - "x": 250.0, - "y": 820.0 + "x": 115.0, + "y": 740.0 } } ], @@ -1581,7 +1653,7 @@ "path": [ { "x": 230.0, - "y": 280.0 + "y": 285.0 } ] }, @@ -1602,7 +1674,7 @@ }, { "x": 420.0, - "y": 290.0 + "y": 295.0 } ] }, @@ -1631,15 +1703,15 @@ "path": [ { "x": 415.0, - "y": 270.0 + "y": 275.0 }, { "x": 415.0, - "y": 285.0 + "y": 280.0 }, { "x": 220.0, - "y": 285.0 + "y": 280.0 } ] }, @@ -1656,19 +1728,19 @@ "path": [ { "x": 515.0, - "y": 320.0 + "y": 325.0 }, { "x": 515.0, - "y": 310.0 + "y": 315.0 }, { "x": 490.0, - "y": 310.0 + "y": 315.0 }, { "x": 490.0, - "y": 300.0 + "y": 305.0 } ] }, @@ -1849,7 +1921,7 @@ "path": [ { "x": 105.0, - "y": 155.0 + "y": 170.0 }, { "x": 105.0, @@ -1888,6 +1960,10 @@ { "x": 270.0, "y": 500.0 + }, + { + "x": 270.0, + "y": 515.0 } ] }, @@ -1932,11 +2008,19 @@ "y": 510.0 }, { - "x": 460.0, + "x": 480.0, "y": 510.0 }, { - "x": 460.0, + "x": 480.0, + "y": 350.0 + }, + { + "x": 470.0, + "y": 350.0 + }, + { + "x": 470.0, "y": 310.0 } ] @@ -2020,7 +2104,7 @@ "path": [ { "x": 105.0, - "y": 245.0 + "y": 260.0 }, { "x": 105.0, @@ -2145,15 +2229,24 @@ }, { "pin1": { - "compName": "_submodelinterface", - "pinName": "QIOn" + "compName": "mux1#4", + "pinName": "I1" }, "pin2": { - "compName": "WireCrossPoint#18", + "compName": "WireCrossPoint#36", "pinName": "" }, "name": "unnamedWire#157", - "path": [] + "path": [ + { + "x": 485.0, + "y": 555.0 + }, + { + "x": 485.0, + "y": 620.0 + } + ] }, { "pin1": { @@ -2165,11 +2258,20 @@ "pinName": "SIOn" }, "name": "unnamedWire#158", - "path": [] + "path": [ + { + "x": 55.0, + "y": 620.0 + }, + { + "x": 55.0, + "y": 600.0 + } + ] }, { "pin1": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#38", "pinName": "" }, "pin2": { @@ -2177,7 +2279,12 @@ "pinName": "SIO0" }, "name": "unnamedWire#159", - "path": [] + "path": [ + { + "x": 580.0, + "y": 600.0 + } + ] }, { "pin1": { @@ -2196,53 +2303,68 @@ }, { "x": 75.0, - "y": 190.0 + "y": 205.0 } ] }, { "pin1": { - "compName": "_submodelinterface", - "pinName": "QIO0" + "compName": "mux1#5", + "pinName": "I1" }, "pin2": { - "compName": "WireCrossPoint#21", + "compName": "WireCrossPoint#41", "pinName": "" }, "name": "unnamedWire#160", - "path": [] + "path": [ + { + "x": 435.0, + "y": 565.0 + } + ] }, { "pin1": { - "compName": "TriStateBuffer#1", - "pinName": "OUT" + "compName": "WireCrossPoint#37", + "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#18", - "pinName": "" + "compName": "_submodelinterface", + "pinName": "QIOn" }, "name": "unnamedWire#161", - "path": [] + "path": [ + { + "x": 435.0, + "y": 625.0 + } + ] }, { "pin1": { - "compName": "TriStateBuffer#2", + "compName": "TriStateBuffer#3", "pinName": "OUT" }, "pin2": { - "compName": "WireCrossPoint#19", + "compName": "WireCrossPoint#38", "pinName": "" }, "name": "unnamedWire#162", - "path": [] + "path": [ + { + "x": 580.0, + "y": 635.0 + } + ] }, { "pin1": { - "compName": "TriStateBuffer#3", - "pinName": "OUT" + "compName": "WireCrossPoint#38", + "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#39", "pinName": "" }, "name": "unnamedWire#163", @@ -2250,8 +2372,8 @@ }, { "pin1": { - "compName": "TriStateBuffer#4", - "pinName": "OUT" + "compName": "WireCrossPoint#41", + "pinName": "" }, "pin2": { "compName": "WireCrossPoint#21", @@ -2282,7 +2404,24 @@ "pinName": "I" }, "name": "unnamedWire#166", - "path": [] + "path": [ + { + "x": 165.0, + "y": 500.0 + }, + { + "x": 165.0, + "y": 575.0 + }, + { + "x": 450.0, + "y": 575.0 + }, + { + "x": 450.0, + "y": 645.0 + } + ] }, { "pin1": { @@ -2347,8 +2486,8 @@ "pinName": "" }, "pin2": { - "compName": "mux2#0", - "pinName": "I01" + "compName": "WireCrossPoint#36", + "pinName": "" }, "name": "unnamedWire#170", "path": [] @@ -2444,7 +2583,16 @@ "pinName": "IN" }, "name": "unnamedWire#177", - "path": [] + "path": [ + { + "x": 545.0, + "y": 710.0 + }, + { + "x": 545.0, + "y": 660.0 + } + ] }, { "pin1": { @@ -2456,16 +2604,33 @@ "pinName": "QIO0_MUX" }, "name": "unnamedWire#178", - "path": [] + "path": [ + { + "x": 445.0, + "y": 720.0 + }, + { + "x": 445.0, + "y": 580.0 + }, + { + "x": 175.0, + "y": 580.0 + }, + { + "x": 175.0, + "y": 520.0 + } + ] }, { "pin1": { - "compName": "WireCrossPoint#19", + "compName": "WireCrossPoint#36", "pinName": "" }, "pin2": { - "compName": "mux2#1", - "pinName": "I01" + "compName": "WireCrossPoint#35", + "pinName": "" }, "name": "unnamedWire#179", "path": [] @@ -2501,31 +2666,41 @@ "pinName": "I10" }, "name": "unnamedWire#180", - "path": [] + "path": [ + { + "x": 435.0, + "y": 750.0 + } + ] }, { "pin1": { - "compName": "WireCrossPoint#23", + "compName": "WireCrossPoint#35", "pinName": "" }, "pin2": { - "compName": "mux2#1", - "pinName": "I11" + "compName": "mux2#0", + "pinName": "I01" }, "name": "unnamedWire#181", "path": [] }, { "pin1": { - "compName": "mux2#0", - "pinName": "I11" + "compName": "WireCrossPoint#34", + "pinName": "" }, "pin2": { - "compName": "WireCrossPoint#23", - "pinName": "" + "compName": "mux2#1", + "pinName": "I11" }, "name": "unnamedWire#182", - "path": [] + "path": [ + { + "x": 440.0, + "y": 760.0 + } + ] }, { "pin1": { @@ -2585,7 +2760,12 @@ "pinName": "" }, "name": "unnamedWire#187", - "path": [] + "path": [ + { + "x": 150.0, + "y": 685.0 + } + ] }, { "pin1": { @@ -2597,7 +2777,24 @@ "pinName": "SIOn_MUX" }, "name": "unnamedWire#188", - "path": [] + "path": [ + { + "x": 130.0, + "y": 655.0 + }, + { + "x": 130.0, + "y": 580.0 + }, + { + "x": 170.0, + "y": 580.0 + }, + { + "x": 170.0, + "y": 510.0 + } + ] }, { "pin1": { @@ -2645,7 +2842,16 @@ "pinName": "" }, "name": "unnamedWire#191", - "path": [] + "path": [ + { + "x": 105.0, + "y": 695.0 + }, + { + "x": 105.0, + "y": 610.0 + } + ] }, { "pin1": { @@ -2657,7 +2863,16 @@ "pinName": "I011" }, "name": "unnamedWire#192", - "path": [] + "path": [ + { + "x": 110.0, + "y": 615.0 + }, + { + "x": 110.0, + "y": 705.0 + } + ] }, { "pin1": { @@ -2669,7 +2884,16 @@ "pinName": "" }, "name": "unnamedWire#193", - "path": [] + "path": [ + { + "x": 115.0, + "y": 715.0 + }, + { + "x": 115.0, + "y": 595.0 + } + ] }, { "pin1": { @@ -2695,8 +2919,16 @@ "name": "unnamedWire#195", "path": [ { - "x": 470.0, - "y": 445.0 + "x": 465.0, + "y": 495.0 + }, + { + "x": 345.0, + "y": 495.0 + }, + { + "x": 345.0, + "y": 585.0 } ] }, @@ -2712,11 +2944,27 @@ "name": "unnamedWire#196", "path": [ { - "x": 475.0, - "y": 445.0 + "x": 125.0, + "y": 735.0 }, { - "x": 475.0, + "x": 125.0, + "y": 605.0 + }, + { + "x": 350.0, + "y": 605.0 + }, + { + "x": 350.0, + "y": 500.0 + }, + { + "x": 470.0, + "y": 500.0 + }, + { + "x": 470.0, "y": 360.0 } ] @@ -2731,7 +2979,12 @@ "pinName": "" }, "name": "unnamedWire#197", - "path": [] + "path": [ + { + "x": 290.0, + "y": 675.0 + } + ] }, { "pin1": { @@ -2743,7 +2996,12 @@ "pinName": "" }, "name": "unnamedWire#198", - "path": [] + "path": [ + { + "x": 295.0, + "y": 685.0 + } + ] }, { "pin1": { @@ -2755,7 +3013,16 @@ "pinName": "I101" }, "name": "unnamedWire#199", - "path": [] + "path": [ + { + "x": 120.0, + "y": 585.0 + }, + { + "x": 120.0, + "y": 725.0 + } + ] }, { "pin1": { @@ -2811,8 +3078,8 @@ "name": "unnamedWire#200", "path": [ { - "x": 470.0, - "y": 330.0 + "x": 465.0, + "y": 335.0 } ] }, @@ -2826,7 +3093,12 @@ "pinName": "I11" }, "name": "unnamedWire#201", - "path": [] + "path": [ + { + "x": 300.0, + "y": 695.0 + } + ] }, { "pin1": { @@ -2838,7 +3110,12 @@ "pinName": "OEn" }, "name": "unnamedWire#202", - "path": [] + "path": [ + { + "x": 250.0, + "y": 540.0 + } + ] }, { "pin1": { @@ -2850,7 +3127,20 @@ "pinName": "" }, "name": "unnamedWire#203", - "path": [] + "path": [ + { + "x": 390.0, + "y": 550.0 + }, + { + "x": 390.0, + "y": 585.0 + }, + { + "x": 560.0, + "y": 585.0 + } + ] }, { "pin1": { @@ -2864,8 +3154,8 @@ "name": "unnamedWire#204", "path": [ { - "x": 465.0, - "y": 320.0 + "x": 460.0, + "y": 325.0 } ] }, @@ -2881,8 +3171,24 @@ "name": "unnamedWire#205", "path": [ { - "x": 465.0, - "y": 445.0 + "x": 460.0, + "y": 490.0 + }, + { + "x": 340.0, + "y": 490.0 + }, + { + "x": 340.0, + "y": 600.0 + }, + { + "x": 100.0, + "y": 600.0 + }, + { + "x": 100.0, + "y": 745.0 } ] }, @@ -2898,11 +3204,27 @@ "name": "unnamedWire#206", "path": [ { - "x": 480.0, - "y": 445.0 + "x": 95.0, + "y": 755.0 }, { - "x": 480.0, + "x": 95.0, + "y": 590.0 + }, + { + "x": 355.0, + "y": 590.0 + }, + { + "x": 355.0, + "y": 505.0 + }, + { + "x": 475.0, + "y": 505.0 + }, + { + "x": 475.0, "y": 370.0 } ] @@ -2974,7 +3296,16 @@ "pinName": "QIOn_MUX" }, "name": "unnamedWire#210", - "path": [] + "path": [ + { + "x": 305.0, + "y": 655.0 + }, + { + "x": 305.0, + "y": 530.0 + } + ] }, { "pin1": { @@ -3034,7 +3365,20 @@ "pinName": "EN" }, "name": "unnamedWire#215", - "path": [] + "path": [ + { + "x": 575.0, + "y": 620.0 + }, + { + "x": 575.0, + "y": 645.0 + }, + { + "x": 560.0, + "y": 645.0 + } + ] }, { "pin1": { @@ -3095,7 +3439,12 @@ "pinName": "EN" }, "name": "unnamedWire#219", - "path": [] + "path": [ + { + "x": 410.0, + "y": 630.0 + } + ] }, { "pin1": { @@ -3118,6 +3467,23 @@ } ] }, + { + "pin1": { + "compName": "WireCrossPoint#23", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#34", + "pinName": "" + }, + "name": "unnamedWire#220", + "path": [ + { + "x": 440.0, + "y": 595.0 + } + ] + }, { "pin1": { "compName": "mux1#5", @@ -3151,7 +3517,7 @@ }, { "x": 230.0, - "y": 530.0 + "y": 525.0 }, { "x": 230.0, @@ -3173,39 +3539,37 @@ }, { "pin1": { - "compName": "mux1#4", - "pinName": "I1" - }, - "pin2": { "compName": "WireCrossPoint#19", "pinName": "" }, + "pin2": { + "compName": "TriStateBuffer#2", + "pinName": "OUT" + }, "name": "unnamedWire#223", - "path": [] + "path": [ + { + "x": 265.0, + "y": 645.0 + } + ] }, { "pin1": { - "compName": "mux1#5", - "pinName": "I0" + "compName": "TriStateBuffer#4", + "pinName": "OUT" }, "pin2": { - "compName": "WireCrossPoint#20", + "compName": "WireCrossPoint#40", "pinName": "" }, "name": "unnamedWire#224", - "path": [] - }, - { - "pin1": { - "compName": "WireCrossPoint#21", - "pinName": "" - }, - "pin2": { - "compName": "mux1#5", - "pinName": "I1" - }, - "name": "unnamedWire#225", - "path": [] + "path": [ + { + "x": 585.0, + "y": 660.0 + } + ] }, { "pin1": { @@ -3217,7 +3581,16 @@ "pinName": "I" }, "name": "unnamedWire#226", - "path": [] + "path": [ + { + "x": 410.0, + "y": 560.0 + }, + { + "x": 410.0, + "y": 540.0 + } + ] }, { "pin1": { @@ -3243,6 +3616,18 @@ "name": "unnamedWire#228", "path": [] }, + { + "pin1": { + "compName": "WireCrossPoint#34", + "pinName": "" + }, + "pin2": { + "compName": "mux2#0", + "pinName": "I11" + }, + "name": "unnamedWire#229", + "path": [] + }, { "pin1": { "compName": "WireCrossPoint#1", @@ -3255,6 +3640,47 @@ "name": "unnamedWire#23", "path": [] }, + { + "pin1": { + "compName": "WireCrossPoint#35", + "pinName": "" + }, + "pin2": { + "compName": "mux2#1", + "pinName": "I01" + }, + "name": "unnamedWire#230", + "path": [ + { + "x": 430.0, + "y": 740.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#18", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#37", + "pinName": "" + }, + "name": "unnamedWire#231", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#37", + "pinName": "" + }, + "pin2": { + "compName": "TriStateBuffer#1", + "pinName": "OUT" + }, + "name": "unnamedWire#232", + "path": [] + }, { "pin1": { "compName": "WireCrossPoint#31", @@ -3302,6 +3728,14 @@ { "x": 565.0, "y": 215.0 + }, + { + "x": 565.0, + "y": 25.0 + }, + { + "x": 550.0, + "y": 25.0 } ] }, @@ -3329,6 +3763,35 @@ "name": "unnamedWire#237", "path": [] }, + { + "pin1": { + "compName": "WireCrossPoint#39", + "pinName": "" + }, + "pin2": { + "compName": "mux1#5", + "pinName": "I0" + }, + "name": "unnamedWire#238", + "path": [ + { + "x": 430.0, + "y": 555.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#39", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#20", + "pinName": "" + }, + "name": "unnamedWire#239", + "path": [] + }, { "pin1": { "compName": "WireCrossPoint#15", @@ -3346,6 +3809,35 @@ } ] }, + { + "pin1": { + "compName": "WireCrossPoint#40", + "pinName": "" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "QIO0" + }, + "name": "unnamedWire#240", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#41", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#40", + "pinName": "" + }, + "name": "unnamedWire#242", + "path": [ + { + "x": 585.0, + "y": 615.0 + } + ] + }, { "pin1": { "compName": "Am2904MSR#0", 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 2a91d76d..55256c7e 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 @@ -1,10 +1,10 @@ { - "width": 72.0, - "height": 67.0, + "width": 60.0, + "height": 45.0, "interfacePins": [ { "location": { - "x": 60.0, + "x": 40.0, "y": 0.0 }, "name": "C", @@ -13,8 +13,8 @@ }, { "location": { - "x": 72.0, - "y": 40.0 + "x": 60.0, + "y": 30.0 }, "name": "CI", "logicWidth": 1, @@ -22,7 +22,7 @@ }, { "location": { - "x": 36.0, + "x": 30.0, "y": 0.0 }, "name": "D", @@ -32,7 +32,7 @@ { "location": { "x": 0.0, - "y": 50.0 + "y": 25.0 }, "name": "I", "logicWidth": 4, @@ -40,8 +40,8 @@ }, { "location": { - "x": 38.0, - "y": 67.0 + "x": 35.0, + "y": 45.0 }, "name": "Y", "logicWidth": 12, @@ -50,7 +50,7 @@ { "location": { "x": 0.0, - "y": 38.0 + "y": 10.0 }, "name": "_CC", "logicWidth": 1, @@ -59,7 +59,7 @@ { "location": { "x": 0.0, - "y": 44.0 + "y": 15.0 }, "name": "_CCEN", "logicWidth": 1, @@ -67,8 +67,8 @@ }, { "location": { - "x": 72.0, - "y": 14.0 + "x": 60.0, + "y": 5.0 }, "name": "_FULL", "logicWidth": 1, @@ -76,8 +76,8 @@ }, { "location": { - "x": 19.0, - "y": 67.0 + "x": 15.0, + "y": 45.0 }, "name": "_MAP", "logicWidth": 1, @@ -85,8 +85,8 @@ }, { "location": { - "x": 49.0, - "y": 67.0 + "x": 40.0, + "y": 45.0 }, "name": "_OE", "logicWidth": 1, @@ -94,8 +94,8 @@ }, { "location": { - "x": 13.0, - "y": 67.0 + "x": 10.0, + "y": 45.0 }, "name": "_PL", "logicWidth": 1, @@ -104,7 +104,7 @@ { "location": { "x": 0.0, - "y": 6.0 + "y": 5.0 }, "name": "_RLD", "logicWidth": 1, @@ -112,8 +112,8 @@ }, { "location": { - "x": 25.0, - "y": 67.0 + "x": 20.0, + "y": 45.0 }, "name": "_VECT", "logicWidth": 1, @@ -127,86 +127,32 @@ "id": "Am2910InstrPLA", "name": "Am2910InstrPLA#0", "pos": { - "x": 80.0, - "y": 155.0 + "x": 70.0, + "y": 90.0 } }, { "id": "Am2910RegCntr", "name": "Am2910RegCntr#0", "pos": { - "x": 160.0, - "y": 25.0 + "x": 130.0, + "y": 15.0 } }, { "id": "Am2910SP", "name": "Am2910SP#0", "pos": { - "x": 305.0, - "y": 55.0 + "x": 240.0, + "y": 10.0 } }, - { - "id": "BitDisplay", - "name": "BitDisplay#0", - "pos": { - "x": 160.0, - "y": 95.0 - }, - "params": 12 - }, - { - "id": "BitDisplay", - "name": "BitDisplay#1", - "pos": { - "x": 260.0, - "y": 115.0 - }, - "params": 12 - }, - { - "id": "BitDisplay", - "name": "BitDisplay#2", - "pos": { - "x": 345.0, - "y": 180.0 - }, - "params": 12 - }, - { - "id": "BitDisplay", - "name": "BitDisplay#3", - "pos": { - "x": 265.0, - "y": 150.0 - }, - "params": 12 - }, - { - "id": "BitDisplay", - "name": "BitDisplay#4", - "pos": { - "x": 260.0, - "y": 85.0 - }, - "params": 3 - }, - { - "id": "BitDisplay", - "name": "BitDisplay#5", - "pos": { - "x": 260.0, - "y": 70.0 - }, - "params": 3 - }, { "id": "NandGate", "name": "NandGate#0", "pos": { "x": 40.0, - "y": 185.0 + "y": 45.0 }, "params": 1 }, @@ -215,7 +161,7 @@ "name": "NandGate#1", "pos": { "x": 10.0, - "y": 210.0 + "y": 60.0 }, "params": 1 }, @@ -223,8 +169,8 @@ "id": "NandGate", "name": "NandGate#2", "pos": { - "x": 250.0, - "y": 305.0 + "x": 205.0, + "y": 195.0 }, "params": 1 }, @@ -232,8 +178,8 @@ "id": "TriStateBuffer", "name": "TriStateBuffer#0", "pos": { - "x": 180.0, - "y": 290.0 + "x": 165.0, + "y": 180.0 }, "params": { "logicWidth": 12, @@ -244,8 +190,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#0", "pos": { - "x": 324.0, - "y": 149.0 + "x": 259.0, + "y": 99.0 }, "params": 12 }, @@ -253,8 +199,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#1", "pos": { - "x": 294.0, - "y": 104.0 + "x": 224.0, + "y": 59.0 }, "params": 1 }, @@ -262,8 +208,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#10", "pos": { - "x": 244.0, - "y": 319.0 + "x": 199.0, + "y": 209.0 }, "params": 1 }, @@ -271,8 +217,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#2", "pos": { - "x": 189.0, - "y": 274.0 + "x": 174.0, + "y": 174.0 }, "params": 12 }, @@ -280,8 +226,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#3", "pos": { - "x": 179.0, - "y": 89.0 + "x": 164.0, + "y": 59.0 }, "params": 12 }, @@ -289,8 +235,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#4", "pos": { - "x": 179.0, - "y": 14.0 + "x": 149.0, + "y": 9.0 }, "params": 12 }, @@ -299,7 +245,7 @@ "name": "WireCrossPoint#5", "pos": { "x": 4.0, - "y": 219.0 + "y": 74.0 }, "params": 1 }, @@ -307,8 +253,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#6", "pos": { - "x": 299.0, - "y": 79.0 + "x": 234.0, + "y": 34.0 }, "params": 1 }, @@ -316,17 +262,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#7", "pos": { - "x": 299.0, - "y": 44.0 - }, - "params": 1 - }, - { - "id": "WireCrossPoint", - "name": "WireCrossPoint#8", - "pos": { - "x": 299.0, - "y": 169.0 + "x": 199.0, + "y": 34.0 }, "params": 1 }, @@ -334,8 +271,8 @@ "id": "WireCrossPoint", "name": "WireCrossPoint#9", "pos": { - "x": 299.0, - "y": 114.0 + "x": 234.0, + "y": 69.0 }, "params": 1 }, @@ -343,40 +280,40 @@ "id": "dff12", "name": "dff12#0", "pos": { - "x": 305.0, - "y": 160.0 + "x": 240.0, + "y": 105.0 } }, { "id": "inc12", "name": "inc12#0", "pos": { - "x": 305.0, - "y": 190.0 + "x": 240.0, + "y": 140.0 } }, { "id": "nor12", "name": "nor12#0", "pos": { - "x": 190.0, - "y": 80.0 + "x": 175.0, + "y": 50.0 } }, { "id": "ram5_12", "name": "ram5_12#0", "pos": { - "x": 305.0, - "y": 100.0 + "x": 240.0, + "y": 55.0 } }, { "id": "sel4_12", "name": "sel4_12#0", "pos": { - "x": 150.0, - "y": 175.0 + "x": 135.0, + "y": 110.0 } } ], @@ -417,16 +354,16 @@ "name": "unnamedWire#10", "path": [ { - "x": 230.0, - "y": 90.0 + "x": 215.0, + "y": 60.0 }, { - "x": 230.0, - "y": 120.0 + "x": 215.0, + "y": 75.0 }, { - "x": 95.0, - "y": 120.0 + "x": 85.0, + "y": 75.0 } ] }, @@ -442,12 +379,12 @@ "name": "unnamedWire#11", "path": [ { - "x": 115.0, - "y": 160.0 + "x": 105.0, + "y": 95.0 }, { - "x": 115.0, - "y": 45.0 + "x": 105.0, + "y": 35.0 } ] }, @@ -463,12 +400,12 @@ "name": "unnamedWire#12", "path": [ { - "x": 120.0, - "y": 170.0 + "x": 110.0, + "y": 105.0 }, { - "x": 120.0, - "y": 55.0 + "x": 110.0, + "y": 45.0 } ] }, @@ -484,8 +421,8 @@ "name": "unnamedWire#13", "path": [ { - "x": 295.0, - "y": 220.0 + "x": 225.0, + "y": 155.0 } ] }, @@ -501,12 +438,12 @@ "name": "unnamedWire#14", "path": [ { - "x": 290.0, - "y": 230.0 + "x": 230.0, + "y": 165.0 }, { - "x": 290.0, - "y": 70.0 + "x": 230.0, + "y": 25.0 } ] }, @@ -522,8 +459,8 @@ "name": "unnamedWire#15", "path": [ { - "x": 295.0, - "y": 60.0 + "x": 225.0, + "y": 15.0 } ] }, @@ -563,8 +500,8 @@ "name": "unnamedWire#18", "path": [ { - "x": 325.0, - "y": 275.0 + "x": 260.0, + "y": 175.0 } ] }, @@ -580,8 +517,8 @@ "name": "unnamedWire#19", "path": [ { - "x": 200.0, - "y": 130.0 + "x": 185.0, + "y": 85.0 } ] }, @@ -609,8 +546,8 @@ "name": "unnamedWire#20", "path": [ { - "x": 220.0, - "y": 150.0 + "x": 205.0, + "y": 100.0 } ] }, @@ -674,16 +611,16 @@ "name": "unnamedWire#25", "path": [ { - "x": 145.0, - "y": 15.0 + "x": 125.0, + "y": 10.0 }, { - "x": 145.0, - "y": 150.0 + "x": 125.0, + "y": 65.0 }, { - "x": 160.0, - "y": 150.0 + "x": 145.0, + "y": 65.0 } ] }, @@ -724,11 +661,11 @@ "path": [ { "x": 65.0, - "y": 195.0 + "y": 55.0 }, { "x": 65.0, - "y": 160.0 + "y": 95.0 } ] }, @@ -781,7 +718,7 @@ "path": [ { "x": 5.0, - "y": 215.0 + "y": 65.0 } ] }, @@ -795,12 +732,7 @@ "pinName": "B" }, "name": "unnamedWire#32", - "path": [ - { - "x": 5.0, - "y": 225.0 - } - ] + "path": [] }, { "pin1": { @@ -815,11 +747,11 @@ "path": [ { "x": 35.0, - "y": 220.0 + "y": 70.0 }, { "x": 35.0, - "y": 200.0 + "y": 60.0 } ] }, @@ -837,7 +769,7 @@ }, { "pin1": { - "compName": "WireCrossPoint#8", + "compName": "WireCrossPoint#9", "pinName": "" }, "pin2": { @@ -845,7 +777,12 @@ "pinName": "C" }, "name": "unnamedWire#35", - "path": [] + "path": [ + { + "x": 235.0, + "y": 115.0 + } + ] }, { "pin1": { @@ -943,12 +880,12 @@ "name": "unnamedWire#42", "path": [ { - "x": 85.0, - "y": 290.0 + "x": 75.0, + "y": 180.0 }, { - "x": 65.0, - "y": 290.0 + "x": 50.0, + "y": 180.0 } ] }, @@ -962,7 +899,16 @@ "pinName": "_MAP" }, "name": "unnamedWire#43", - "path": [] + "path": [ + { + "x": 85.0, + "y": 185.0 + }, + { + "x": 75.0, + "y": 185.0 + } + ] }, { "pin1": { @@ -976,12 +922,12 @@ "name": "unnamedWire#44", "path": [ { - "x": 105.0, - "y": 290.0 + "x": 95.0, + "y": 190.0 }, { - "x": 125.0, - "y": 290.0 + "x": 100.0, + "y": 190.0 } ] }, @@ -997,63 +943,15 @@ "name": "unnamedWire#45", "path": [ { - "x": 70.0, - "y": 250.0 + "x": 35.0, + "y": 125.0 }, { - "x": 70.0, - "y": 175.0 + "x": 35.0, + "y": 110.0 } ] }, - { - "pin1": { - "compName": "Am2910RegCntr#0", - "pinName": "Y" - }, - "pin2": { - "compName": "BitDisplay#0", - "pinName": "" - }, - "name": "unnamedWire#46", - "path": [] - }, - { - "pin1": { - "compName": "ram5_12#0", - "pinName": "Y" - }, - "pin2": { - "compName": "BitDisplay#1", - "pinName": "" - }, - "name": "unnamedWire#47", - "path": [] - }, - { - "pin1": { - "compName": "inc12#0", - "pinName": "Y" - }, - "pin2": { - "compName": "BitDisplay#2", - "pinName": "" - }, - "name": "unnamedWire#48", - "path": [] - }, - { - "pin1": { - "compName": "dff12#0", - "pinName": "Y" - }, - "pin2": { - "compName": "BitDisplay#3", - "pinName": "" - }, - "name": "unnamedWire#49", - "path": [] - }, { "pin1": { "compName": "dff12#0", @@ -1078,18 +976,6 @@ "name": "unnamedWire#50", "path": [] }, - { - "pin1": { - "compName": "WireCrossPoint#9", - "pinName": "" - }, - "pin2": { - "compName": "WireCrossPoint#8", - "pinName": "" - }, - "name": "unnamedWire#51", - "path": [] - }, { "pin1": { "compName": "TriStateBuffer#0", @@ -1114,30 +1000,6 @@ "name": "unnamedWire#53", "path": [] }, - { - "pin1": { - "compName": "Am2910SP#0", - "pinName": "A" - }, - "pin2": { - "compName": "BitDisplay#5", - "pinName": "" - }, - "name": "unnamedWire#54", - "path": [] - }, - { - "pin1": { - "compName": "Am2910SP#0", - "pinName": "B" - }, - "pin2": { - "compName": "BitDisplay#4", - "pinName": "" - }, - "name": "unnamedWire#55", - "path": [] - }, { "pin1": { "compName": "WireCrossPoint#10", @@ -1162,8 +1024,8 @@ "name": "unnamedWire#57", "path": [ { - "x": 245.0, - "y": 310.0 + "x": 200.0, + "y": 200.0 } ] }, @@ -1179,12 +1041,12 @@ "name": "unnamedWire#58", "path": [ { - "x": 275.0, - "y": 300.0 + "x": 230.0, + "y": 190.0 }, { - "x": 275.0, - "y": 315.0 + "x": 230.0, + "y": 205.0 } ] }, @@ -1234,7 +1096,12 @@ "pinName": "" }, "name": "unnamedWire#9", - "path": [] + "path": [ + { + "x": 150.0, + "y": 60.0 + } + ] } ], "version": "0.1.1" diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json deleted file mode 100644 index 6726b46c..00000000 --- a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json +++ /dev/null @@ -1,700 +0,0 @@ -{ - "width": 62.0, - "height": 90.0, - "interfacePins": [ - { - "location": { - "x": 0.0, - "y": 30.0 - }, - "name": "I00", - "logicWidth": 4, - "usage": "INPUT" - }, - { - "location": { - "x": 0.0, - "y": 40.0 - }, - "name": "I01", - "logicWidth": 4, - "usage": "INPUT" - }, - { - "location": { - "x": 0.0, - "y": 50.0 - }, - "name": "I10", - "logicWidth": 4, - "usage": "INPUT" - }, - { - "location": { - "x": 0.0, - "y": 60.0 - }, - "name": "I11", - "logicWidth": 4, - "usage": "INPUT" - }, - { - "location": { - "x": 0.0, - "y": 10.0 - }, - "name": "S0", - "logicWidth": 1, - "usage": "INPUT" - }, - { - "location": { - "x": 0.0, - "y": 20.0 - }, - "name": "S1", - "logicWidth": 1, - "usage": "INPUT" - }, - { - "location": { - "x": 62.0, - "y": 16.0 - }, - "name": "Y", - "logicWidth": 4, - "usage": "OUTPUT" - } - ], - "innerScale": 0.4, - "submodel": { - "components": [ - { - "id": "Merger", - "name": "Merger#0", - "pos": { - "x": 140.0, - "y": 25.0 - }, - "params": 4 - }, - { - "id": "Splitter", - "name": "Splitter#0", - "pos": { - "x": 25.0, - "y": 45.0 - }, - "params": 4 - }, - { - "id": "Splitter", - "name": "Splitter#1", - "pos": { - "x": 25.0, - "y": 85.0 - }, - "params": 4 - }, - { - "id": "Splitter", - "name": "Splitter#2", - "pos": { - "x": 25.0, - "y": 140.0 - }, - "params": 4 - }, - { - "id": "Splitter", - "name": "Splitter#3", - "pos": { - "x": 25.0, - "y": 180.0 - }, - "params": 4 - }, - { - "id": "WireCrossPoint", - "name": "WireCrossPoint#0", - "pos": { - "x": 19.0, - "y": 34.0 - }, - "params": 1 - }, - { - "id": "mux1_4", - "name": "mux1_4#0", - "pos": { - "x": 40.0, - "y": 30.0 - } - }, - { - "id": "mux1_4", - "name": "mux1_4#1", - "pos": { - "x": 40.0, - "y": 125.0 - } - }, - { - "id": "mux1_4", - "name": "mux1_4#2", - "pos": { - "x": 100.0, - "y": 20.0 - } - } - ], - "wires": [ - { - "pin1": { - "compName": "Splitter#2", - "pinName": "O0" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "I0_1" - }, - "name": "unnamedWire#0", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#1", - "pinName": "I0_2" - }, - "pin2": { - "compName": "Splitter#2", - "pinName": "O1" - }, - "name": "unnamedWire#1", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "I1_1" - }, - "pin2": { - "compName": "Splitter#1", - "pinName": "O0" - }, - "name": "unnamedWire#10", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#1", - "pinName": "O3" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "I1_4" - }, - "name": "unnamedWire#11", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "I0_4" - }, - "pin2": { - "compName": "Splitter#0", - "pinName": "O3" - }, - "name": "unnamedWire#12", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "I0_3" - }, - "pin2": { - "compName": "Splitter#0", - "pinName": "O2" - }, - "name": "unnamedWire#13", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "I0_2" - }, - "pin2": { - "compName": "Splitter#0", - "pinName": "O1" - }, - "name": "unnamedWire#14", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "I0_1" - }, - "pin2": { - "compName": "Splitter#0", - "pinName": "O0" - }, - "name": "unnamedWire#15", - "path": [] - }, - { - "pin1": { - "compName": "_submodelinterface", - "pinName": "S0" - }, - "pin2": { - "compName": "WireCrossPoint#0", - "pinName": "" - }, - "name": "unnamedWire#16", - "path": [ - { - "x": 20.0, - "y": 25.0 - } - ] - }, - { - "pin1": { - "compName": "WireCrossPoint#0", - "pinName": "" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "S0" - }, - "name": "unnamedWire#17", - "path": [] - }, - { - "pin1": { - "compName": "WireCrossPoint#0", - "pinName": "" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "S0" - }, - "name": "unnamedWire#18", - "path": [ - { - "x": 20.0, - "y": 130.0 - } - ] - }, - { - "pin1": { - "compName": "Splitter#0", - "pinName": "I" - }, - "pin2": { - "compName": "_submodelinterface", - "pinName": "I00" - }, - "name": "unnamedWire#19", - "path": [ - { - "x": 15.0, - "y": 60.0 - }, - { - "x": 15.0, - "y": 75.0 - } - ] - }, - { - "pin1": { - "compName": "Splitter#2", - "pinName": "O2" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "I0_3" - }, - "name": "unnamedWire#2", - "path": [] - }, - { - "pin1": { - "compName": "_submodelinterface", - "pinName": "I01" - }, - "pin2": { - "compName": "Splitter#1", - "pinName": "I" - }, - "name": "unnamedWire#20", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#2", - "pinName": "I" - }, - "pin2": { - "compName": "_submodelinterface", - "pinName": "I10" - }, - "name": "unnamedWire#21", - "path": [ - { - "x": 15.0, - "y": 155.0 - }, - { - "x": 15.0, - "y": 125.0 - } - ] - }, - { - "pin1": { - "compName": "_submodelinterface", - "pinName": "I11" - }, - "pin2": { - "compName": "Splitter#3", - "pinName": "I" - }, - "name": "unnamedWire#22", - "path": [ - { - "x": 10.0, - "y": 150.0 - }, - { - "x": 10.0, - "y": 195.0 - } - ] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "Y1" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "I0_1" - }, - "name": "unnamedWire#23", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "I0_2" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "Y2" - }, - "name": "unnamedWire#24", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#0", - "pinName": "Y3" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "I0_3" - }, - "name": "unnamedWire#25", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "I0_4" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "Y4" - }, - "name": "unnamedWire#26", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "I1_1" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "Y1" - }, - "name": "unnamedWire#27", - "path": [ - { - "x": 80.0, - "y": 75.0 - }, - { - "x": 80.0, - "y": 130.0 - } - ] - }, - { - "pin1": { - "compName": "mux1_4#1", - "pinName": "Y2" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "I1_2" - }, - "name": "unnamedWire#28", - "path": [ - { - "x": 85.0, - "y": 140.0 - }, - { - "x": 85.0, - "y": 85.0 - } - ] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "I1_3" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "Y3" - }, - "name": "unnamedWire#29", - "path": [ - { - "x": 90.0, - "y": 95.0 - }, - { - "x": 90.0, - "y": 150.0 - } - ] - }, - { - "pin1": { - "compName": "Splitter#3", - "pinName": "O0" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "I1_1" - }, - "name": "unnamedWire#3", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#1", - "pinName": "Y4" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "I1_4" - }, - "name": "unnamedWire#30", - "path": [ - { - "x": 95.0, - "y": 160.0 - }, - { - "x": 95.0, - "y": 105.0 - } - ] - }, - { - "pin1": { - "compName": "Merger#0", - "pinName": "O" - }, - "pin2": { - "compName": "_submodelinterface", - "pinName": "Y" - }, - "name": "unnamedWire#31", - "path": [] - }, - { - "pin1": { - "compName": "Merger#0", - "pinName": "I0" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "Y1" - }, - "name": "unnamedWire#32", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "Y2" - }, - "pin2": { - "compName": "Merger#0", - "pinName": "I1" - }, - "name": "unnamedWire#33", - "path": [] - }, - { - "pin1": { - "compName": "Merger#0", - "pinName": "I2" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "Y3" - }, - "name": "unnamedWire#34", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#2", - "pinName": "Y4" - }, - "pin2": { - "compName": "Merger#0", - "pinName": "I3" - }, - "name": "unnamedWire#35", - "path": [] - }, - { - "pin1": { - "compName": "_submodelinterface", - "pinName": "S1" - }, - "pin2": { - "compName": "mux1_4#2", - "pinName": "S0" - }, - "name": "unnamedWire#36", - "path": [ - { - "x": 15.0, - "y": 50.0 - }, - { - "x": 15.0, - "y": 20.0 - }, - { - "x": 60.0, - "y": 20.0 - }, - { - "x": 60.0, - "y": 25.0 - } - ] - }, - { - "pin1": { - "compName": "mux1_4#1", - "pinName": "I0_4" - }, - "pin2": { - "compName": "Splitter#2", - "pinName": "O3" - }, - "name": "unnamedWire#4", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#3", - "pinName": "O1" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "I1_2" - }, - "name": "unnamedWire#5", - "path": [] - }, - { - "pin1": { - "compName": "mux1_4#1", - "pinName": "I1_3" - }, - "pin2": { - "compName": "Splitter#3", - "pinName": "O2" - }, - "name": "unnamedWire#6", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#3", - "pinName": "O3" - }, - "pin2": { - "compName": "mux1_4#1", - "pinName": "I1_4" - }, - "name": "unnamedWire#7", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#1", - "pinName": "O2" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "I1_3" - }, - "name": "unnamedWire#8", - "path": [] - }, - { - "pin1": { - "compName": "Splitter#1", - "pinName": "O1" - }, - "pin2": { - "compName": "mux1_4#0", - "pinName": "I1_2" - }, - "name": "unnamedWire#9", - "path": [] - } - ], - "version": "0.1.1" - }, - "symbolRendererSnippetID": "simpleRectangularLike", - "symbolRendererParams": { - "centerText": "mux1_4", - "centerTextHeight": 5.0, - "horizontalComponentCenter": 17.5, - "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/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json index 3df19d71..6ab00c44 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 @@ -44,7 +44,6 @@ mograsim version: 0.1.3 "mux1_16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_16.json", "mux1_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_4.json", "mux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2.json", - "mux2_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2_4.json", "mux3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux3.json", "nand3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nand3.json", "not4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/not4.json", 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 index b91f27ed..0788589c 100644 --- 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 @@ -15,12 +15,14 @@ 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; @@ -32,8 +34,11 @@ import net.mograsim.logic.model.snippets.highlevelstatehandlers.DefaultHighLevel public class ReserializeJSONsSettingUsages { + public static double GRIDSIZE = 2.5; public static boolean changePinUsages = false; - public static boolean changeComponentNames = true; + public static boolean changeComponentNames = false; + public static boolean snapWCPs = true; + public static boolean warnNonSnappedPoints = true; public static void main(String[] args) throws IOException { @@ -105,9 +110,7 @@ public class ReserializeJSONsSettingUsages { System.out.print(" New name for component " + oldName + " of type " + subcomp.getIDForSerializing(iP) + " (empty: " + defaultName + ") >"); -// newName = sysin.nextLine(); - newName = ""; - System.out.println(); + newName = sysin.nextLine(); if (newName.equals("")) newName = defaultName; if (tempModel.getComponentsByName().containsKey(newName)) @@ -132,21 +135,58 @@ public class ReserializeJSONsSettingUsages .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())); + 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 >"); + 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) + " >"); + System.out.println(" " + line + "->" + componentNameRemapping.get(line) + " >"); } } catch (Exception e) -- 2.17.1