Merge branch 'development' of
authorFabian Stemmler <stemmler@in.tum.de>
Fri, 13 Sep 2019 14:16:07 +0000 (16:16 +0200)
committerFabian Stemmler <stemmler@in.tum.de>
Fri, 13 Sep 2019 14:16:07 +0000 (16:16 +0200)
https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into
development

Conflicts:
net.mograsim.machine/src/net/mograsim/machine/standard/memory/ModelMemoryWA.java
net.mograsim.machine/src/net/mograsim/machine/standard/memory/WordAddressableMemoryComponent.java

21 files changed:
net.mograsim.logic.core/src/net/mograsim/logic/core/components/BasicCoreComponent.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/CoreBitDisplay.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/CoreDemux.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/CoreMux.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/CoreTriStateBuffer.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/CoreNotGate.java
net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/MultiInputCoreGate.java
net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/Timeline.java
net.mograsim.logic.core/src/net/mograsim/logic/core/wires/CoreWire.java
net.mograsim.logic.core/test/net/mograsim/logic/core/tests/TestCoreBitDisplay.java
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2901/Am2901ALUInclSourceDecodeInclFunctionDecode.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/dff16.json
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/am2901/TestableAm2901Impl.java
net.mograsim.machine/META-INF/MANIFEST.MF
net.mograsim.machine/src/net/mograsim/machine/MachineLoader.java [new file with mode: 0644]
net.mograsim.machine/src/net/mograsim/machine/standard/memory/CoreWordAddressableMemory.java
net.mograsim.machine/src/net/mograsim/machine/standard/memory/ModelMemoryWA.java
net.mograsim.machine/src/net/mograsim/machine/standardComponentIDMapping.json [new file with mode: 0644]

index 9f3da4a..369a05f 100644 (file)
@@ -3,6 +3,7 @@ package net.mograsim.logic.core.components;
 import net.mograsim.logic.core.LogicObservable;
 import net.mograsim.logic.core.LogicObserver;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 
 /**
  * A basic component that recomputes all outputs (with a delay), when it is updated.
@@ -26,10 +27,12 @@ public abstract class BasicCoreComponent extends CoreComponent implements LogicO
        }
 
        @Override
-       public void update(LogicObservable initiator)
+       public final void update(LogicObservable initiator)
        {
-               timeline.addEvent(e -> compute(), processTime);
+               TimelineEventHandler delayedUpdates = compute();
+               if (delayedUpdates != null)
+                       timeline.addEvent(delayedUpdates, processTime);
        }
 
-       protected abstract void compute();
+       protected abstract TimelineEventHandler compute();
 }
index 8cd509c..345bc0a 100644 (file)
@@ -7,6 +7,7 @@ import java.util.List;
 import net.mograsim.logic.core.LogicObservable;
 import net.mograsim.logic.core.LogicObserver;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 import net.mograsim.logic.core.types.Bit;
 import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
@@ -28,10 +29,14 @@ public class CoreBitDisplay extends BasicCoreComponent implements LogicObservabl
        }
 
        @Override
-       protected void compute()
+       protected TimelineEventHandler compute()
        {
-               displayedValue = in.getValues();
-               notifyObservers();
+               BitVector newValues = in.getValues();
+               return e ->
+               {
+                       displayedValue = newValues;
+                       notifyObservers();
+               };
        }
 
        public BitVector getDisplayedValue()
index a5bb0fc..76982e0 100644 (file)
@@ -3,6 +3,8 @@ package net.mograsim.logic.core.components;
 import java.util.List;
 
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
+import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
@@ -53,19 +55,27 @@ public class CoreDemux extends BasicCoreComponent
        }
 
        @Override
-       public void compute()
+       public TimelineEventHandler compute()
        {
                int selectValue = select.hasNumericValue() ? (int) select.getUnsignedValue() : -1;
                if (selectValue >= outputs.length)
                        selectValue = -1;
 
-               if (selected != selectValue && selected != -1)
-                       outputs[selected].clearSignals();
+               boolean hasOldSelection = selected != selectValue && selected != -1;
+               int oldSelection = selected;
+               boolean hasNewSelection = selectValue != -1;
+               int newSelection = selectValue;
+               BitVector inputValues = in.getValues();
 
                selected = selectValue;
 
-               if (selectValue != -1)
-                       outputs[selectValue].feedSignals(in.getValues());
+               return e ->
+               {
+                       if (hasOldSelection)
+                               outputs[oldSelection].clearSignals();
+                       if (hasNewSelection)
+                               outputs[newSelection].feedSignals(inputValues);
+               };
        }
 
        @Override
index b85168d..a47ad6b 100644 (file)
@@ -6,6 +6,8 @@ import java.util.Collections;
 import java.util.List;
 
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
+import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
@@ -66,17 +68,16 @@ public class CoreMux extends BasicCoreComponent
        }
 
        @Override
-       public void compute()
+       public TimelineEventHandler compute()
        {
                int selectValue;
                if (!select.hasNumericValue() || (selectValue = (int) select.getUnsignedValue()) >= inputs.length)
                {
-                       out.clearSignals();
-                       return;
+                       return e -> out.clearSignals();
                }
 
-               ReadEnd active = inputs[selectValue];
-               out.feedSignals(active.getValues());
+               BitVector activeValues = inputs[selectValue].getValues();
+               return e -> out.feedSignals(activeValues);
        }
 
        @Override
index 6568d1b..4b7a339 100644 (file)
@@ -3,7 +3,9 @@ package net.mograsim.logic.core.components;
 import java.util.List;
 
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 import net.mograsim.logic.core.types.Bit;
+import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
 
@@ -28,12 +30,14 @@ public class CoreTriStateBuffer extends BasicCoreComponent
        }
 
        @Override
-       protected void compute()
+       protected TimelineEventHandler compute()
        {
                if (enable.getValue() == Bit.ONE)
-                       out.feedSignals(in.getValues());
-               else
-                       out.clearSignals();
+               {
+                       BitVector inValues = in.getValues();
+                       return e -> out.feedSignals(inValues);
+               }
+               return e -> out.clearSignals();
        }
 
        @Override
index 57f3a18..b7808be 100644 (file)
@@ -4,6 +4,8 @@ import java.util.List;
 
 import net.mograsim.logic.core.components.BasicCoreComponent;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
+import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
 
@@ -21,9 +23,10 @@ public class CoreNotGate extends BasicCoreComponent
        }
 
        @Override
-       protected void compute()
+       protected TimelineEventHandler compute()
        {
-               out.feedSignals(in.getValues().not());
+               BitVector values = in.getValues().not();
+               return e -> out.feedSignals(values);
        }
 
        public ReadEnd getIn()
index 59fc3cd..010ae74 100644 (file)
@@ -4,6 +4,7 @@ import java.util.List;
 
 import net.mograsim.logic.core.components.BasicCoreComponent;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 import net.mograsim.logic.core.types.BitVector.BitVectorMutator;
 import net.mograsim.logic.core.types.MutationOperation;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
@@ -53,11 +54,11 @@ public abstract class MultiInputCoreGate extends BasicCoreComponent
        }
 
        @Override
-       protected void compute()
+       public TimelineEventHandler compute()
        {
                BitVectorMutator mutator = BitVectorMutator.empty();
                for (ReadEnd w : in)
                        op.apply(mutator, w.getValues());
-               out.feedSignals(invert ? mutator.toBitVector().not() : mutator.toBitVector());
+               return e -> out.feedSignals(invert ? mutator.toBitVector().not() : mutator.toBitVector());
        }
 }
index 4e3146b..9c8659c 100644 (file)
@@ -18,6 +18,7 @@ public class Timeline
        private PriorityQueue<InnerEvent> events;
        private LongSupplier time;
        private long lastTimeUpdated = 0;
+       private long eventCounter = 0;
 
        private final List<Consumer<TimelineEvent>> eventAddedListener;
 
@@ -176,7 +177,7 @@ public class Timeline
        {
                long timing = getSimulationTime() + relativeTiming;
                TimelineEvent event = new TimelineEvent(timing);
-               events.add(new InnerEvent(function, event));
+               events.add(new InnerEvent(function, event, eventCounter++));
                eventAddedListener.forEach(l -> l.accept(event));
        }
 
@@ -184,6 +185,7 @@ public class Timeline
        {
                private final TimelineEventHandler function;
                private final TimelineEvent event;
+               private final long id;
 
                /**
                 * Creates an {@link InnerEvent}
@@ -191,10 +193,11 @@ public class Timeline
                 * @param function {@link TimelineEventHandler} to be executed when the {@link InnerEvent} occurs
                 * @param timing   Point in the MI simulation {@link Timeline}, at which the {@link InnerEvent} is executed;
                 */
-               InnerEvent(TimelineEventHandler function, TimelineEvent event)
+               InnerEvent(TimelineEventHandler function, TimelineEvent event, long id)
                {
                        this.function = function;
                        this.event = event;
+                       this.id = id;
                }
 
                public long getTiming()
@@ -217,7 +220,8 @@ public class Timeline
                @Override
                public int compareTo(InnerEvent o)
                {
-                       return timeCmp(getTiming(), o.getTiming());
+                       int c1;
+                       return (c1 = timeCmp(getTiming(), o.getTiming())) == 0 ? timeCmp(id, o.id) : c1;
                }
        }
 
index 8b71a0c..f130cd4 100644 (file)
@@ -124,7 +124,9 @@ public class CoreWire
         */
        public void forceValues(BitVector values)
        {
-               setNewValues(values);
+               bitsWithoutFusions = values.getBits();
+               invalidateCachedValuesForAllFusedWires();
+               notifyObservers();
        }
 
        /**
index 2e5e5fd..5056345 100644 (file)
@@ -6,6 +6,7 @@ import java.util.function.LongConsumer;
 
 import net.mograsim.logic.core.components.CoreBitDisplay;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 import net.mograsim.logic.core.types.Bit;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 
@@ -39,9 +40,13 @@ public final class TestCoreBitDisplay extends CoreBitDisplay
        }
 
        @Override
-       protected void compute()
+       protected TimelineEventHandler compute()
        {
-               super.compute();
-               System.out.println("update: value is " + getDisplayedValue());
+               TimelineEventHandler handler = super.compute();
+               return e ->
+               {
+                       handler.handle(e);
+                       System.out.println("update: value is " + getDisplayedValue());
+               };
        }
 }
index 61bea39..64c5b0b 100644 (file)
@@ -1,6 +1,6 @@
 {
-  "width": 442.0,
-  "height": 412.0,
+  "width": 460.0,
+  "height": 330.0,
   "interfacePins": [],
   "innerScale": 0.4,
   "submodel": {
@@ -9,7 +9,7 @@
         "id": "Am2901",
         "name": "Am2901#0",
         "pos": {
-          "x": 616.0,
+          "x": 615.0,
           "y": 370.0
         }
       },
@@ -17,7 +17,7 @@
         "id": "Am2901",
         "name": "Am2901#1",
         "pos": {
-          "x": 731.0,
+          "x": 740.0,
           "y": 370.0
         }
       },
@@ -25,7 +25,7 @@
         "id": "Am2901",
         "name": "Am2901#2",
         "pos": {
-          "x": 846.0,
+          "x": 865.0,
           "y": 370.0
         }
       },
@@ -33,7 +33,7 @@
         "id": "Am2901",
         "name": "Am2901#3",
         "pos": {
-          "x": 961.0,
+          "x": 1000.0,
           "y": 370.0
         }
       },
@@ -41,7 +41,7 @@
         "id": "Am2904",
         "name": "Am2904#0",
         "pos": {
-          "x": 441.0,
+          "x": 440.0,
           "y": 375.0
         }
       },
@@ -49,8 +49,8 @@
         "id": "Am2910",
         "name": "Am2910#0",
         "pos": {
-          "x": 296.0,
-          "y": 481.0
+          "x": 295.0,
+          "y": 480.0
         }
       },
       {
@@ -93,8 +93,8 @@
         "id": "Clock",
         "name": "Clock#0",
         "pos": {
-          "x": 351.0,
-          "y": 376.0
+          "x": 325.0,
+          "y": 310.0
         },
         "params": {
           "delta": 1000,
         "id": "FixedOutput",
         "name": "FixedOutput#0",
         "pos": {
-          "x": 527.0,
-          "y": 302.0
+          "x": 430.0,
+          "y": 240.0
         },
         "params": {
           "bits": [
         "id": "FixedOutput",
         "name": "FixedOutput#1",
         "pos": {
-          "x": 521.0,
+          "x": 525.0,
           "y": 350.0
         },
         "params": {
         "id": "FixedOutput",
         "name": "FixedOutput#2",
         "pos": {
-          "x": 266.0,
-          "y": 476.0
+          "x": 255.0,
+          "y": 475.0
         },
         "params": {
           "bits": [
         "id": "FixedOutput",
         "name": "FixedOutput#3",
         "pos": {
-          "x": 371.0,
-          "y": 526.0
+          "x": 345.0,
+          "y": 530.0
         },
         "params": {
           "bits": [
         "id": "FixedOutput",
         "name": "FixedOutput#4",
         "pos": {
-          "x": 336.0,
-          "y": 561.0
+          "x": 310.0,
+          "y": 540.0
         },
         "params": {
           "bits": [
         "id": "FixedOutput",
         "name": "FixedOutput#5",
         "pos": {
-          "x": 410.0,
+          "x": 365.0,
           "y": 475.0
         },
         "params": {
         "id": "FixedOutput",
         "name": "FixedOutput#6",
         "pos": {
-          "x": 411.0,
-          "y": 365.0
+          "x": 425.0,
+          "y": 340.0
         },
         "params": {
           "bits": [
         "id": "NandGate",
         "name": "NandGate#1",
         "pos": {
-          "x": 245.0,
-          "y": 254.0
+          "x": 225.0,
+          "y": 135.0
         },
         "params": 1
       },
         "id": "Splitter",
         "name": "Splitter#0",
         "pos": {
-          "x": 536.0,
-          "y": 146.0
+          "x": 445.0,
+          "y": 85.0
         },
         "params": {
           "logicWidth": 16,
         "id": "Splitter",
         "name": "Splitter#1",
         "pos": {
-          "x": 666.0,
-          "y": 150.0
+          "x": 500.0,
+          "y": 130.0
         },
         "params": {
           "logicWidth": 4,
           "orientation": "RIGHT"
         }
       },
-      {
-        "id": "Splitter",
-        "name": "Splitter#10",
-        "pos": {
-          "x": 1056.0,
-          "y": 365.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
       {
         "id": "Splitter",
         "name": "Splitter#11",
         "pos": {
-          "x": 556.0,
-          "y": 146.0
+          "x": 465.0,
+          "y": 85.0
         },
         "params": {
           "logicWidth": 8,
         "id": "Splitter",
         "name": "Splitter#12",
         "pos": {
-          "x": 556.0,
-          "y": 226.0
+          "x": 465.0,
+          "y": 165.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#13",
         "pos": {
-          "x": 556.0,
-          "y": 266.0
+          "x": 465.0,
+          "y": 205.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#14",
         "pos": {
-          "x": 721.0,
-          "y": 140.0
+          "x": 555.0,
+          "y": 120.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#15",
         "pos": {
-          "x": 721.0,
-          "y": 245.0
+          "x": 555.0,
+          "y": 215.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#19",
         "pos": {
-          "x": 551.0,
-          "y": 700.0
+          "x": 550.0,
+          "y": 725.0
         },
         "params": {
           "logicWidth": 13,
         "id": "Splitter",
         "name": "Splitter#2",
         "pos": {
-          "x": 666.0,
-          "y": 255.0
+          "x": 500.0,
+          "y": 225.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#23",
         "pos": {
-          "x": 621.0,
-          "y": 715.0
+          "x": 620.0,
+          "y": 740.0
         },
         "params": {
           "logicWidth": 6,
         "id": "Splitter",
         "name": "Splitter#24",
         "pos": {
-          "x": 581.0,
-          "y": 715.0
+          "x": 580.0,
+          "y": 740.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#25",
         "pos": {
-          "x": 551.0,
-          "y": 715.0
+          "x": 550.0,
+          "y": 740.0
         },
         "params": {
           "logicWidth": 2,
           "orientation": "DOWN_ALT"
         }
       },
-      {
-        "id": "Splitter",
-        "name": "Splitter#3",
-        "pos": {
-          "x": 711.0,
-          "y": 365.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
       {
         "id": "Splitter",
         "name": "Splitter#30",
         "id": "Splitter",
         "name": "Splitter#32",
         "pos": {
-          "x": 786.0,
-          "y": 750.0
+          "x": 785.0,
+          "y": 770.0
         },
         "params": {
           "logicWidth": 3,
         "id": "Splitter",
         "name": "Splitter#33",
         "pos": {
-          "x": 726.0,
-          "y": 750.0
+          "x": 725.0,
+          "y": 770.0
         },
         "params": {
           "logicWidth": 3,
         "id": "Splitter",
         "name": "Splitter#34",
         "pos": {
-          "x": 756.0,
-          "y": 750.0
+          "x": 755.0,
+          "y": 770.0
         },
         "params": {
           "logicWidth": 3,
         "id": "Splitter",
         "name": "Splitter#35",
         "pos": {
-          "x": 726.0,
-          "y": 730.0
+          "x": 725.0,
+          "y": 750.0
         },
         "params": {
           "logicWidth": 9,
         "id": "Splitter",
         "name": "Splitter#36",
         "pos": {
-          "x": 835.0,
-          "y": 255.0
+          "x": 785.0,
+          "y": 300.0
         },
         "params": {
           "logicWidth": 16,
         "id": "Splitter",
         "name": "Splitter#37",
         "pos": {
-          "x": 816.0,
-          "y": 560.0
+          "x": 785.0,
+          "y": 550.0
         },
         "params": {
           "logicWidth": 16,
         "id": "Splitter",
         "name": "Splitter#38",
         "pos": {
-          "x": 816.0,
-          "y": 545.0
+          "x": 785.0,
+          "y": 535.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#39",
         "pos": {
-          "x": 856.0,
-          "y": 545.0
+          "x": 825.0,
+          "y": 535.0
         },
         "params": {
           "logicWidth": 4,
           "orientation": "DOWN"
         }
       },
-      {
-        "id": "Splitter",
-        "name": "Splitter#4",
-        "pos": {
-          "x": 711.0,
-          "y": 405.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
       {
         "id": "Splitter",
         "name": "Splitter#40",
         "pos": {
-          "x": 896.0,
-          "y": 545.0
+          "x": 865.0,
+          "y": 535.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#41",
         "pos": {
-          "x": 936.0,
-          "y": 545.0
+          "x": 905.0,
+          "y": 535.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#42",
         "pos": {
-          "x": 835.0,
-          "y": 270.0
+          "x": 785.0,
+          "y": 315.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#43",
         "pos": {
-          "x": 875.0,
-          "y": 270.0
+          "x": 825.0,
+          "y": 315.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#44",
         "pos": {
-          "x": 915.0,
-          "y": 270.0
+          "x": 865.0,
+          "y": 315.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#45",
         "pos": {
-          "x": 955.0,
-          "y": 270.0
+          "x": 905.0,
+          "y": 315.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#46",
         "pos": {
-          "x": 195.0,
-          "y": 335.0
+          "x": 200.0,
+          "y": 200.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#47",
         "pos": {
-          "x": 665.0,
-          "y": 190.0
+          "x": 500.0,
+          "y": 170.0
         },
         "params": {
           "logicWidth": 4,
         "id": "Splitter",
         "name": "Splitter#49",
         "pos": {
-          "x": 665.0,
-          "y": 295.0
+          "x": 500.0,
+          "y": 265.0
         },
         "params": {
           "logicWidth": 4,
           "orientation": "RIGHT"
         }
       },
-      {
-        "id": "Splitter",
-        "name": "Splitter#5",
-        "pos": {
-          "x": 826.0,
-          "y": 365.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#6",
-        "pos": {
-          "x": 826.0,
-          "y": 405.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#7",
-        "pos": {
-          "x": 941.0,
-          "y": 405.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#8",
-        "pos": {
-          "x": 941.0,
-          "y": 365.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#9",
-        "pos": {
-          "x": 1056.0,
-          "y": 405.0
-        },
-        "params": {
-          "logicWidth": 4,
-          "orientation": "LEFT"
-        }
-      },
       {
         "id": "TextComponent",
         "name": "TextComponent#0",
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#0",
         "pos": {
-          "x": 990.0,
-          "y": 575.0
+          "x": 880.0,
+          "y": 560.0
         },
         "params": {
           "logicWidth": 16,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#1",
         "pos": {
-          "x": 990.0,
-          "y": 600.0
+          "x": 880.0,
+          "y": 585.0
         },
         "params": {
           "logicWidth": 16,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#2",
         "pos": {
-          "x": 355.0,
-          "y": 199.0
+          "x": 315.0,
+          "y": 90.0
         },
         "params": {
           "logicWidth": 16,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#3",
         "pos": {
-          "x": 355.0,
-          "y": 224.0
+          "x": 315.0,
+          "y": 125.0
         },
         "params": {
           "logicWidth": 16,
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 395.0,
-          "y": 366.0
+          "x": 494.0,
+          "y": 334.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 595.0,
-          "y": 361.0
+          "x": 604.0,
+          "y": 364.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#10",
         "pos": {
-          "x": 721.0,
-          "y": 350.0
+          "x": 709.0,
+          "y": 354.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#11",
         "pos": {
-          "x": 726.0,
-          "y": 355.0
+          "x": 714.0,
+          "y": 359.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#12",
         "pos": {
-          "x": 240.0,
-          "y": 259.0
+          "x": 219.0,
+          "y": 149.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#13",
         "pos": {
-          "x": 415.0,
-          "y": 15.0
+          "x": 364.0,
+          "y": 14.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#14",
         "pos": {
-          "x": 340.0,
-          "y": 214.0
+          "x": 309.0,
+          "y": 99.0
+        },
+        "params": 16
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "pos": {
+          "x": 784.0,
+          "y": 14.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#16",
         "pos": {
-          "x": 736.0,
-          "y": 745.0
+          "x": 734.0,
+          "y": 764.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#17",
         "pos": {
-          "x": 980.0,
-          "y": 585.0
+          "x": 874.0,
+          "y": 569.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#18",
         "pos": {
-          "x": 135.0,
-          "y": 15.0
+          "x": 139.0,
+          "y": 14.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#19",
         "pos": {
-          "x": 95.0,
-          "y": 30.0
+          "x": 94.0,
+          "y": 29.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 725.0,
-          "y": 360.0
+          "x": 729.0,
+          "y": 364.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#20",
         "pos": {
-          "x": 1035.0,
-          "y": 30.0
+          "x": 334.0,
+          "y": 334.0
         },
-        "params": 16
-      },
-      {
-        "id": "WireCrossPoint",
-        "name": "WireCrossPoint#21",
-        "pos": {
-          "x": 1030.0,
-          "y": 15.0
-        },
-        "params": 16
+        "params": 1
       },
       {
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#22",
         "pos": {
-          "x": 375.0,
-          "y": 15.0
+          "x": 339.0,
+          "y": 14.0
         },
         "params": 16
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#23",
         "pos": {
-          "x": 385.0,
-          "y": 30.0
+          "x": 344.0,
+          "y": 29.0
         },
         "params": 16
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#24",
+        "name": "WireCrossPoint#26",
         "pos": {
-          "x": 1045.0,
-          "y": 30.0
+          "x": 709.0,
+          "y": 499.0
         },
-        "params": 16
+        "params": 9
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#25",
+        "name": "WireCrossPoint#27",
         "pos": {
-          "x": 1045.0,
-          "y": 15.0
+          "x": 834.0,
+          "y": 499.0
         },
-        "params": 16
+        "params": 9
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#26",
+        "name": "WireCrossPoint#28",
         "pos": {
-          "x": 755.0,
-          "y": 505.0
+          "x": 959.0,
+          "y": 499.0
         },
         "params": 9
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#27",
+        "name": "WireCrossPoint#29",
         "pos": {
-          "x": 835.0,
-          "y": 505.0
+          "x": 94.0,
+          "y": 14.0
         },
-        "params": 9
+        "params": 16
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#28",
+        "name": "WireCrossPoint#3",
         "pos": {
-          "x": 950.0,
-          "y": 505.0
+          "x": 854.0,
+          "y": 364.0
         },
-        "params": 9
+        "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#29",
+        "name": "WireCrossPoint#30",
         "pos": {
-          "x": 95.0,
-          "y": 15.0
+          "x": 454.0,
+          "y": 369.0
         },
-        "params": 16
+        "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#3",
+        "name": "WireCrossPoint#31",
         "pos": {
-          "x": 840.0,
-          "y": 360.0
+          "x": 459.0,
+          "y": 369.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#4",
         "pos": {
-          "x": 551.0,
-          "y": 266.0
+          "x": 459.0,
+          "y": 204.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#5",
         "pos": {
-          "x": 451.0,
-          "y": 365.0
+          "x": 449.0,
+          "y": 369.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#6",
         "pos": {
-          "x": 956.0,
-          "y": 355.0
+          "x": 964.0,
+          "y": 359.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#7",
         "pos": {
-          "x": 951.0,
-          "y": 350.0
+          "x": 959.0,
+          "y": 354.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#8",
         "pos": {
-          "x": 836.0,
-          "y": 350.0
+          "x": 834.0,
+          "y": 354.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#9",
         "pos": {
-          "x": 841.0,
-          "y": 355.0
+          "x": 839.0,
+          "y": 359.0
         },
         "params": 4
       },
         "id": "and",
         "name": "and#0",
         "pos": {
-          "x": 861.0,
-          "y": 631.0
+          "x": 750.0,
+          "y": 560.0
         }
       },
       {
         "id": "and",
         "name": "and#1",
         "pos": {
-          "x": 746.0,
-          "y": 671.0
+          "x": 750.0,
+          "y": 580.0
         }
       },
       {
         "id": "and",
         "name": "and#2",
         "pos": {
-          "x": 926.0,
-          "y": 656.0
+          "x": 795.0,
+          "y": 565.0
         }
       },
       {
         "id": "dff16",
         "name": "dff16#0",
         "pos": {
-          "x": 280.0,
-          "y": 190.0
+          "x": 260.0,
+          "y": 75.0
         }
       },
       {
         "id": "dff16_invwe",
         "name": "dff16_invwe#0",
         "pos": {
-          "x": 471.0,
-          "y": 196.0
+          "x": 380.0,
+          "y": 135.0
         }
       },
       {
         "id": "dff80",
         "name": "dff80#0",
         "pos": {
-          "x": 506.0,
-          "y": 825.0
+          "x": 180.0,
+          "y": 645.0
         }
       },
       {
         "id": "inc",
         "name": "inc#0",
         "pos": {
-          "x": 230.0,
-          "y": 220.0
+          "x": 205.0,
+          "y": 105.0
         },
         "params": 16
       },
         "id": "mux1_12",
         "name": "mux1_12#0",
         "pos": {
-          "x": 256.0,
+          "x": 255.0,
           "y": 390.0
         }
       },
         "name": "mux1_16#0",
         "pos": {
           "x": 145.0,
-          "y": 199.0
+          "y": 80.0
         }
       },
       {
         "id": "mux1_16",
         "name": "mux1_16#1",
         "pos": {
-          "x": 850.0,
-          "y": 140.0
+          "x": 800.0,
+          "y": 185.0
         }
       },
       {
         "id": "mux1_4",
         "name": "mux1_4#0",
         "pos": {
-          "x": 681.0,
-          "y": 135.0
+          "x": 515.0,
+          "y": 115.0
         }
       },
       {
         "id": "mux1_4",
         "name": "mux1_4#1",
         "pos": {
-          "x": 681.0,
-          "y": 240.0
+          "x": 515.0,
+          "y": 210.0
         }
       }
     ],
           "pinName": "_CC"
         },
         "name": "unnamedWire#0",
-        "path": []
+        "path": [
+          {
+            "x": 565.0,
+            "y": 430.0
+          },
+          {
+            "x": 565.0,
+            "y": 325.0
+          },
+          {
+            "x": 360.0,
+            "y": 325.0
+          },
+          {
+            "x": 360.0,
+            "y": 475.0
+          },
+          {
+            "x": 290.0,
+            "y": 475.0
+          },
+          {
+            "x": 290.0,
+            "y": 490.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Qn"
         },
         "name": "unnamedWire#1",
-        "path": []
+        "path": [
+          {
+            "x": 725.0,
+            "y": 485.0
+          },
+          {
+            "x": 725.0,
+            "y": 390.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Qn+3"
         },
         "name": "unnamedWire#10",
-        "path": []
+        "path": [
+          {
+            "x": 430.0,
+            "y": 500.0
+          },
+          {
+            "x": 430.0,
+            "y": 630.0
+          },
+          {
+            "x": 1105.0,
+            "y": 630.0
+          },
+          {
+            "x": 1105.0,
+            "y": 485.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#2",
-          "pinName": "B0"
+          "compName": "Am2904#0",
+          "pinName": "IN"
         },
         "pin2": {
-          "compName": "Splitter#7",
-          "pinName": "O3"
+          "compName": "Am2901#3",
+          "pinName": "F3"
         },
-        "name": "unnamedWire#100",
-        "path": []
+        "name": "unnamedWire#11",
+        "path": [
+          {
+            "x": 415.0,
+            "y": 395.0
+          },
+          {
+            "x": 415.0,
+            "y": 615.0
+          },
+          {
+            "x": 995.0,
+            "y": 615.0
+          },
+          {
+            "x": 995.0,
+            "y": 425.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#8",
-          "pinName": "O0"
+          "compName": "Splitter#14",
+          "pinName": "I"
         },
         "pin2": {
-          "compName": "Am2901#2",
-          "pinName": "A3"
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
         },
-        "name": "unnamedWire#101",
-        "path": []
+        "name": "unnamedWire#113",
+        "path": [
+          {
+            "x": 650.0,
+            "y": 135.0
+          },
+          {
+            "x": 650.0,
+            "y": 355.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#2",
-          "pinName": "A2"
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#8",
-          "pinName": "O1"
+          "compName": "Splitter#15",
+          "pinName": "I"
         },
-        "name": "unnamedWire#102",
-        "path": []
+        "name": "unnamedWire#114",
+        "path": [
+          {
+            "x": 645.0,
+            "y": 360.0
+          },
+          {
+            "x": 645.0,
+            "y": 230.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#8",
-          "pinName": "O2"
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#2",
-          "pinName": "A1"
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
         },
-        "name": "unnamedWire#103",
+        "name": "unnamedWire#115",
         "path": []
       },
       {
         "pin1": {
-          "compName": "Am2901#2",
-          "pinName": "A0"
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#8",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
         },
-        "name": "unnamedWire#104",
+        "name": "unnamedWire#116",
         "path": []
       },
       {
         "pin1": {
-          "compName": "Splitter#10",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#3",
-          "pinName": "A0"
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
         },
-        "name": "unnamedWire#105",
+        "name": "unnamedWire#117",
         "path": []
       },
       {
         "pin1": {
-          "compName": "Am2901#3",
-          "pinName": "A1"
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#10",
-          "pinName": "O2"
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
         },
-        "name": "unnamedWire#106",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#10",
-          "pinName": "O1"
-        },
-        "pin2": {
-          "compName": "Am2901#3",
-          "pinName": "A2"
-        },
-        "name": "unnamedWire#107",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2901#3",
-          "pinName": "A3"
-        },
-        "pin2": {
-          "compName": "Splitter#10",
-          "pinName": "O0"
-        },
-        "name": "unnamedWire#108",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#9",
-          "pinName": "O3"
-        },
-        "pin2": {
-          "compName": "Am2901#3",
-          "pinName": "B0"
-        },
-        "name": "unnamedWire#109",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2904#0",
-          "pinName": "IN"
-        },
-        "pin2": {
-          "compName": "Am2901#3",
-          "pinName": "F3"
-        },
-        "name": "unnamedWire#11",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2901#3",
-          "pinName": "B1"
-        },
-        "pin2": {
-          "compName": "Splitter#9",
-          "pinName": "O2"
-        },
-        "name": "unnamedWire#110",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#9",
-          "pinName": "O1"
-        },
-        "pin2": {
-          "compName": "Am2901#3",
-          "pinName": "B2"
-        },
-        "name": "unnamedWire#111",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2901#3",
-          "pinName": "B3"
-        },
-        "pin2": {
-          "compName": "Splitter#9",
-          "pinName": "O0"
-        },
-        "name": "unnamedWire#112",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#14",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#10",
-          "pinName": ""
-        },
-        "name": "unnamedWire#113",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#11",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#15",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#114",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#9",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#11",
-          "pinName": ""
-        },
-        "name": "unnamedWire#115",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#8",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#10",
-          "pinName": ""
-        },
-        "name": "unnamedWire#116",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#8",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#7",
-          "pinName": ""
-        },
-        "name": "unnamedWire#117",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#6",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#9",
-          "pinName": ""
-        },
-        "name": "unnamedWire#118",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#11",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#4",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#119",
+        "name": "unnamedWire#118",
         "path": []
       },
       {
           "pinName": "B"
         },
         "name": "unnamedWire#12",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#3",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#10",
-          "pinName": ""
-        },
-        "name": "unnamedWire#120",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#9",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#6",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#121",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#8",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#5",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#122",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#7",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#6",
-          "pinName": ""
-        },
-        "name": "unnamedWire#123",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#7",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#8",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#124",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#6",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "Splitter#9",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#125",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#10",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#7",
-          "pinName": ""
-        },
-        "name": "unnamedWire#126",
-        "path": []
+        "path": [
+          {
+            "x": 610.0,
+            "y": 415.0
+          },
+          {
+            "x": 610.0,
+            "y": 505.0
+          },
+          {
+            "x": 730.0,
+            "y": 505.0
+          },
+          {
+            "x": 730.0,
+            "y": 595.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "S"
         },
         "name": "unnamedWire#127",
-        "path": []
+        "path": [
+          {
+            "x": 200.0,
+            "y": 195.0
+          },
+          {
+            "x": 130.0,
+            "y": 195.0
+          },
+          {
+            "x": 130.0,
+            "y": 85.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#128",
-        "path": []
+        "path": [
+          {
+            "x": 225.0,
+            "y": 100.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#129",
-        "path": []
+        "path": [
+          {
+            "x": 225.0,
+            "y": 130.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "A"
         },
         "name": "unnamedWire#13",
-        "path": []
+        "path": [
+          {
+            "x": 735.0,
+            "y": 415.0
+          },
+          {
+            "x": 735.0,
+            "y": 585.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#130",
-        "path": []
+        "path": [
+          {
+            "x": 250.0,
+            "y": 115.0
+          },
+          {
+            "x": 250.0,
+            "y": 145.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "A"
         },
         "name": "unnamedWire#131",
-        "path": []
+        "path": [
+          {
+            "x": 220.0,
+            "y": 140.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#133",
-        "path": []
+        "path": [
+          {
+            "x": 105.0,
+            "y": 55.0
+          },
+          {
+            "x": 480.0,
+            "y": 55.0
+          },
+          {
+            "x": 480.0,
+            "y": 120.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "mux1_16#0",
-          "pinName": "I1"
-        },
-        "pin2": {
           "compName": "WireCrossPoint#14",
           "pinName": ""
         },
+        "pin2": {
+          "compName": "TriStateBuffer#3",
+          "pinName": "IN"
+        },
         "name": "unnamedWire#134",
-        "path": []
+        "path": [
+          {
+            "x": 310.0,
+            "y": 135.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I0"
         },
         "name": "unnamedWire#135",
-        "path": []
+        "path": [
+          {
+            "x": 130.0,
+            "y": 410.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "S"
         },
         "name": "unnamedWire#136",
-        "path": []
+        "path": [
+          {
+            "x": 310.0,
+            "y": 530.0
+          },
+          {
+            "x": 250.0,
+            "y": 530.0
+          },
+          {
+            "x": 250.0,
+            "y": 395.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#138",
-        "path": []
+        "path": [
+          {
+            "x": 225.0,
+            "y": 730.0
+          },
+          {
+            "x": 225.0,
+            "y": 815.0
+          },
+          {
+            "x": 630.0,
+            "y": 815.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "_CCEN"
         },
         "name": "unnamedWire#139",
-        "path": []
+        "path": [
+          {
+            "x": 455.0,
+            "y": 705.0
+          },
+          {
+            "x": 285.0,
+            "y": 705.0
+          },
+          {
+            "x": 285.0,
+            "y": 495.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "B"
         },
         "name": "unnamedWire#14",
-        "path": []
+        "path": [
+          {
+            "x": 790.0,
+            "y": 585.0
+          },
+          {
+            "x": 790.0,
+            "y": 580.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#144",
-        "path": []
+        "path": [
+          {
+            "x": 430.0,
+            "y": 700.0
+          },
+          {
+            "x": 290.0,
+            "y": 700.0
+          },
+          {
+            "x": 290.0,
+            "y": 505.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#15",
-        "path": []
+        "path": [
+          {
+            "x": 790.0,
+            "y": 570.0
+          },
+          {
+            "x": 790.0,
+            "y": 565.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#157",
-        "path": []
+        "path": [
+          {
+            "x": 325.0,
+            "y": 420.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#158",
-        "path": []
+        "path": [
+          {
+            "x": 240.0,
+            "y": 450.0
+          },
+          {
+            "x": 240.0,
+            "y": 730.0
+          },
+          {
+            "x": 350.0,
+            "y": 730.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "C"
         },
         "name": "unnamedWire#159",
-        "path": []
+        "path": [
+          {
+            "x": 145.0,
+            "y": 305.0
+          },
+          {
+            "x": 370.0,
+            "y": 305.0
+          },
+          {
+            "x": 370.0,
+            "y": 140.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "F\u003d0"
         },
         "name": "unnamedWire#16",
-        "path": []
+        "path": [
+          {
+            "x": 740.0,
+            "y": 575.0
+          },
+          {
+            "x": 740.0,
+            "y": 505.0
+          },
+          {
+            "x": 860.0,
+            "y": 505.0
+          },
+          {
+            "x": 860.0,
+            "y": 415.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#162",
-        "path": []
+        "path": [
+          {
+            "x": 215.0,
+            "y": 610.0
+          },
+          {
+            "x": 270.0,
+            "y": 610.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "EN"
         },
         "name": "unnamedWire#163",
-        "path": []
+        "path": [
+          {
+            "x": 210.0,
+            "y": 190.0
+          },
+          {
+            "x": 340.0,
+            "y": 190.0
+          },
+          {
+            "x": 340.0,
+            "y": 115.0
+          },
+          {
+            "x": 325.0,
+            "y": 115.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "_CEM"
         },
         "name": "unnamedWire#164",
-        "path": []
+        "path": [
+          {
+            "x": 525.0,
+            "y": 750.0
+          },
+          {
+            "x": 395.0,
+            "y": 750.0
+          },
+          {
+            "x": 395.0,
+            "y": 370.0
+          },
+          {
+            "x": 445.0,
+            "y": 370.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "_CEmu"
         },
         "name": "unnamedWire#165",
-        "path": []
+        "path": [
+          {
+            "x": 535.0,
+            "y": 745.0
+          },
+          {
+            "x": 390.0,
+            "y": 745.0
+          },
+          {
+            "x": 390.0,
+            "y": 365.0
+          },
+          {
+            "x": 485.0,
+            "y": 365.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "A"
         },
         "name": "unnamedWire#17",
-        "path": []
+        "path": [
+          {
+            "x": 985.0,
+            "y": 415.0
+          },
+          {
+            "x": 985.0,
+            "y": 510.0
+          },
+          {
+            "x": 745.0,
+            "y": 510.0
+          },
+          {
+            "x": 745.0,
+            "y": 565.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#178",
-        "path": []
+        "path": [
+          {
+            "x": 645.0,
+            "y": 755.0
+          },
+          {
+            "x": 490.0,
+            "y": 755.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#179",
-        "path": []
+        "path": [
+          {
+            "x": 560.0,
+            "y": 760.0
+          },
+          {
+            "x": 595.0,
+            "y": 760.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "IZ"
         },
         "name": "unnamedWire#18",
-        "path": []
+        "path": [
+          {
+            "x": 835.0,
+            "y": 570.0
+          },
+          {
+            "x": 835.0,
+            "y": 605.0
+          },
+          {
+            "x": 405.0,
+            "y": 605.0
+          },
+          {
+            "x": 405.0,
+            "y": 385.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#180",
-        "path": []
+        "path": [
+          {
+            "x": 555.0,
+            "y": 770.0
+          },
+          {
+            "x": 590.0,
+            "y": 770.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "IOVR"
         },
         "name": "unnamedWire#19",
-        "path": []
+        "path": [
+          {
+            "x": 990.0,
+            "y": 420.0
+          },
+          {
+            "x": 990.0,
+            "y": 620.0
+          },
+          {
+            "x": 420.0,
+            "y": 620.0
+          },
+          {
+            "x": 420.0,
+            "y": 400.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "RAMn"
         },
         "name": "unnamedWire#2",
-        "path": []
+        "path": [
+          {
+            "x": 720.0,
+            "y": 480.0
+          },
+          {
+            "x": 720.0,
+            "y": 380.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "IC"
         },
         "name": "unnamedWire#20",
-        "path": []
+        "path": [
+          {
+            "x": 1110.0,
+            "y": 490.0
+          },
+          {
+            "x": 1110.0,
+            "y": 610.0
+          },
+          {
+            "x": 410.0,
+            "y": 610.0
+          },
+          {
+            "x": 410.0,
+            "y": 390.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Cn"
         },
         "name": "unnamedWire#21",
-        "path": []
+        "path": [
+          {
+            "x": 730.0,
+            "y": 490.0
+          },
+          {
+            "x": 730.0,
+            "y": 475.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Cn"
         },
         "name": "unnamedWire#22",
-        "path": []
+        "path": [
+          {
+            "x": 855.0,
+            "y": 490.0
+          },
+          {
+            "x": 855.0,
+            "y": 475.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "O10"
         },
         "name": "unnamedWire#226",
-        "path": []
+        "path": [
+          {
+            "x": 570.0,
+            "y": 765.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Cn"
         },
         "name": "unnamedWire#23",
-        "path": []
+        "path": [
+          {
+            "x": 980.0,
+            "y": 490.0
+          },
+          {
+            "x": 980.0,
+            "y": 475.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#240",
-        "path": []
+        "path": [
+          {
+            "x": 610.0,
+            "y": 700.0
+          },
+          {
+            "x": 435.0,
+            "y": 700.0
+          },
+          {
+            "x": 435.0,
+            "y": 420.0
+          }
+        ]
       },
       {
         "pin1": {
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#0",
+          "compName": "WireCrossPoint#20",
           "pinName": ""
         },
         "pin2": {
           "pinName": "C"
         },
         "name": "unnamedWire#26",
-        "path": []
+        "path": [
+          {
+            "x": 980.0,
+            "y": 365.0
+          },
+          {
+            "x": 980.0,
+            "y": 465.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#27",
-        "path": []
+        "path": [
+          {
+            "x": 855.0,
+            "y": 465.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#275",
-        "path": []
+        "path": [
+          {
+            "x": 860.0,
+            "y": 235.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "O74"
         },
         "name": "unnamedWire#276",
-        "path": []
+        "path": [
+          {
+            "x": 795.0,
+            "y": 190.0
+          },
+          {
+            "x": 795.0,
+            "y": 180.0
+          },
+          {
+            "x": 1120.0,
+            "y": 180.0
+          },
+          {
+            "x": 1120.0,
+            "y": 730.0
+          },
+          {
+            "x": 975.0,
+            "y": 730.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I0"
         },
         "name": "unnamedWire#277",
-        "path": []
+        "path": [
+          {
+            "x": 890.0,
+            "y": 710.0
+          },
+          {
+            "x": 1125.0,
+            "y": 710.0
+          },
+          {
+            "x": 1125.0,
+            "y": 175.0
+          },
+          {
+            "x": 790.0,
+            "y": 175.0
+          },
+          {
+            "x": 790.0,
+            "y": 210.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#278",
-        "path": []
+        "path": [
+          {
+            "x": 860.0,
+            "y": 570.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#280",
-        "path": []
+        "path": [
+          {
+            "x": 875.0,
+            "y": 595.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "pin2": {
-          "compName": "TriStateBuffer#3",
-          "pinName": "IN"
+          "compName": "mux1_16#0",
+          "pinName": "I1"
         },
         "name": "unnamedWire#282",
-        "path": []
+        "path": [
+          {
+            "x": 310.0,
+            "y": 65.0
+          },
+          {
+            "x": 135.0,
+            "y": 65.0
+          },
+          {
+            "x": 135.0,
+            "y": 170.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#283",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#13",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#21",
-          "pinName": ""
-        },
-        "name": "unnamedWire#284",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "WireCrossPoint#19",
         "name": "unnamedWire#285",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#23",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#20",
-          "pinName": ""
-        },
-        "name": "unnamedWire#286",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "TriStateBuffer#2",
           "pinName": ""
         },
         "name": "unnamedWire#287",
-        "path": []
+        "path": [
+          {
+            "x": 340.0,
+            "y": 100.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "OUT"
         },
         "name": "unnamedWire#288",
-        "path": []
+        "path": [
+          {
+            "x": 345.0,
+            "y": 135.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#289",
-        "path": []
+        "path": [
+          {
+            "x": 365.0,
+            "y": 170.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#29",
-        "path": []
+        "path": [
+          {
+            "x": 730.0,
+            "y": 465.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "_WE"
         },
         "name": "unnamedWire#291",
-        "path": []
+        "path": [
+          {
+            "x": 245.0,
+            "y": 255.0
+          },
+          {
+            "x": 375.0,
+            "y": 255.0
+          },
+          {
+            "x": 375.0,
+            "y": 155.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "EN"
         },
         "name": "unnamedWire#292",
-        "path": []
+        "path": [
+          {
+            "x": 230.0,
+            "y": 195.0
+          },
+          {
+            "x": 325.0,
+            "y": 195.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "EN"
         },
         "name": "unnamedWire#293",
-        "path": []
+        "path": [
+          {
+            "x": 605.0,
+            "y": 780.0
+          },
+          {
+            "x": 720.0,
+            "y": 780.0
+          },
+          {
+            "x": 720.0,
+            "y": 685.0
+          },
+          {
+            "x": 905.0,
+            "y": 685.0
+          },
+          {
+            "x": 905.0,
+            "y": 580.0
+          },
+          {
+            "x": 890.0,
+            "y": 580.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "O38"
         },
         "name": "unnamedWire#294",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#21",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#25",
-          "pinName": ""
-        },
-        "name": "unnamedWire#295",
-        "path": []
+        "path": [
+          {
+            "x": 890.0,
+            "y": 680.0
+          },
+          {
+            "x": 715.0,
+            "y": 680.0
+          },
+          {
+            "x": 715.0,
+            "y": 775.0
+          },
+          {
+            "x": 615.0,
+            "y": 775.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#298",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#24",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#20",
-          "pinName": ""
-        },
-        "name": "unnamedWire#299",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "Am2901#1",
           "pinName": "Qn"
         },
         "name": "unnamedWire#3",
-        "path": []
+        "path": [
+          {
+            "x": 850.0,
+            "y": 485.0
+          },
+          {
+            "x": 850.0,
+            "y": 390.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#30",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#21",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "TriStateBuffer#0",
-          "pinName": "OUT"
-        },
-        "name": "unnamedWire#300",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "TriStateBuffer#1",
-          "pinName": "OUT"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#20",
-          "pinName": ""
-        },
-        "name": "unnamedWire#301",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "Splitter#47",
           "pinName": "C"
         },
         "name": "unnamedWire#31",
-        "path": []
+        "path": [
+          {
+            "x": 605.0,
+            "y": 465.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#310",
-        "path": []
+        "path": [
+          {
+            "x": 480.0,
+            "y": 185.0
+          },
+          {
+            "x": 480.0,
+            "y": 305.0
+          },
+          {
+            "x": 580.0,
+            "y": 305.0
+          },
+          {
+            "x": 580.0,
+            "y": 645.0
+          },
+          {
+            "x": 700.0,
+            "y": 645.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#311",
-        "path": []
+        "path": [
+          {
+            "x": 650.0,
+            "y": 755.0
+          },
+          {
+            "x": 690.0,
+            "y": 755.0
+          },
+          {
+            "x": 690.0,
+            "y": 655.0
+          },
+          {
+            "x": 590.0,
+            "y": 655.0
+          },
+          {
+            "x": 590.0,
+            "y": 315.0
+          },
+          {
+            "x": 490.0,
+            "y": 315.0
+          },
+          {
+            "x": 490.0,
+            "y": 280.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "O44"
         },
         "name": "unnamedWire#312",
-        "path": []
+        "path": [
+          {
+            "x": 485.0,
+            "y": 120.0
+          },
+          {
+            "x": 485.0,
+            "y": 310.0
+          },
+          {
+            "x": 585.0,
+            "y": 310.0
+          },
+          {
+            "x": 585.0,
+            "y": 650.0
+          },
+          {
+            "x": 695.0,
+            "y": 650.0
+          },
+          {
+            "x": 695.0,
+            "y": 770.0
+          },
+          {
+            "x": 675.0,
+            "y": 770.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "O39"
         },
         "name": "unnamedWire#313",
-        "path": []
+        "path": [
+          {
+            "x": 495.0,
+            "y": 215.0
+          },
+          {
+            "x": 495.0,
+            "y": 320.0
+          },
+          {
+            "x": 595.0,
+            "y": 320.0
+          },
+          {
+            "x": 595.0,
+            "y": 660.0
+          },
+          {
+            "x": 685.0,
+            "y": 660.0
+          },
+          {
+            "x": 685.0,
+            "y": 760.0
+          },
+          {
+            "x": 625.0,
+            "y": 760.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#314",
-        "path": []
+        "path": [
+          {
+            "x": 710.0,
+            "y": 705.0
+          },
+          {
+            "x": 765.0,
+            "y": 705.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#317",
-        "path": []
+        "path": [
+          {
+            "x": 710.0,
+            "y": 450.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#318",
-        "path": []
+        "path": [
+          {
+            "x": 835.0,
+            "y": 450.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#319",
-        "path": []
+        "path": [
+          {
+            "x": 960.0,
+            "y": 450.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#32",
-        "path": []
+        "path": [
+          {
+            "x": 605.0,
+            "y": 335.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#320",
-        "path": []
+        "path": [
+          {
+            "x": 1095.0,
+            "y": 500.0
+          },
+          {
+            "x": 1095.0,
+            "y": 450.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#321",
-        "path": []
+        "path": [
+          {
+            "x": 800.0,
+            "y": 515.0
+          },
+          {
+            "x": 1075.0,
+            "y": 515.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#322",
-        "path": []
+        "path": [
+          {
+            "x": 840.0,
+            "y": 520.0
+          },
+          {
+            "x": 940.0,
+            "y": 520.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#323",
-        "path": []
+        "path": [
+          {
+            "x": 880.0,
+            "y": 525.0
+          },
+          {
+            "x": 815.0,
+            "y": 525.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#324",
-        "path": []
+        "path": [
+          {
+            "x": 690.0,
+            "y": 530.0
+          },
+          {
+            "x": 920.0,
+            "y": 530.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#325",
-        "path": []
+        "path": [
+          {
+            "x": 675.0,
+            "y": 345.0
+          },
+          {
+            "x": 920.0,
+            "y": 345.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#326",
-        "path": []
+        "path": [
+          {
+            "x": 880.0,
+            "y": 340.0
+          },
+          {
+            "x": 800.0,
+            "y": 340.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#327",
-        "path": []
+        "path": [
+          {
+            "x": 840.0,
+            "y": 335.0
+          },
+          {
+            "x": 925.0,
+            "y": 335.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "D"
         },
         "name": "unnamedWire#328",
-        "path": []
+        "path": [
+          {
+            "x": 800.0,
+            "y": 330.0
+          },
+          {
+            "x": 1060.0,
+            "y": 330.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "C0"
         },
         "name": "unnamedWire#33",
-        "path": []
+        "path": [
+          {
+            "x": 565.0,
+            "y": 475.0
+          },
+          {
+            "x": 565.0,
+            "y": 460.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I0"
         },
         "name": "unnamedWire#330",
-        "path": []
+        "path": [
+          {
+            "x": 140.0,
+            "y": 105.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#331",
-        "path": []
+        "path": [
+          {
+            "x": 255.0,
+            "y": 80.0
+          },
+          {
+            "x": 255.0,
+            "y": 240.0
+          },
+          {
+            "x": 135.0,
+            "y": 240.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Y"
         },
         "name": "unnamedWire#337",
+        "path": [
+          {
+            "x": 175.0,
+            "y": 535.0
+          },
+          {
+            "x": 330.0,
+            "y": 535.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "name": "unnamedWire#338",
         "path": []
       },
       {
         "pin1": {
-          "compName": "Am2910#0",
-          "pinName": "C"
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#0",
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "name": "unnamedWire#339",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
           "pinName": ""
         },
+        "pin2": {
+          "compName": "Am2910#0",
+          "pinName": "C"
+        },
         "name": "unnamedWire#34",
         "path": []
       },
           "pinName": "_OECT"
         },
         "name": "unnamedWire#35",
-        "path": []
+        "path": [
+          {
+            "x": 550.0,
+            "y": 360.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "out"
         },
         "name": "unnamedWire#37",
-        "path": []
+        "path": [
+          {
+            "x": 370.0,
+            "y": 510.0
+          },
+          {
+            "x": 370.0,
+            "y": 540.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "out"
         },
         "name": "unnamedWire#38",
-        "path": []
+        "path": [
+          {
+            "x": 335.0,
+            "y": 550.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "RAMn+3"
         },
         "name": "unnamedWire#4",
-        "path": []
+        "path": [
+          {
+            "x": 845.0,
+            "y": 380.0
+          },
+          {
+            "x": 845.0,
+            "y": 480.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#40",
-        "path": []
+        "path": [
+          {
+            "x": 450.0,
+            "y": 350.0
+          }
+        ]
       },
       {
         "pin1": {
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#5",
+          "compName": "WireCrossPoint#31",
           "pinName": ""
         },
         "pin2": {
           "pinName": "_EOVR"
         },
         "name": "unnamedWire#42",
-        "path": []
+        "path": [
+          {
+            "x": 465.0,
+            "y": 370.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2904#0",
-          "pinName": "_EC"
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#5",
-          "pinName": ""
+          "compName": "Am2904#0",
+          "pinName": "_EC"
         },
         "name": "unnamedWire#43",
         "path": []
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#5",
+          "compName": "WireCrossPoint#31",
           "pinName": ""
         },
         "pin2": {
           "pinName": "RAMn+3"
         },
         "name": "unnamedWire#5",
-        "path": []
+        "path": [
+          {
+            "x": 970.0,
+            "y": 380.0
+          },
+          {
+            "x": 970.0,
+            "y": 480.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#54",
         "path": [
           {
-            "x": 552.0,
-            "y": 312.0
+            "x": 460.0,
+            "y": 250.0
           }
         ]
       },
         "name": "unnamedWire#55",
         "path": [
           {
-            "x": 551.0,
-            "y": 226.0
+            "x": 460.0,
+            "y": 165.0
           }
         ]
       },
           "pinName": "Qn"
         },
         "name": "unnamedWire#6",
-        "path": []
+        "path": [
+          {
+            "x": 975.0,
+            "y": 485.0
+          },
+          {
+            "x": 975.0,
+            "y": 390.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "QIO0"
         },
         "name": "unnamedWire#7",
-        "path": []
+        "path": [
+          {
+            "x": 575.0,
+            "y": 390.0
+          },
+          {
+            "x": 575.0,
+            "y": 500.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#71",
-        "path": []
+        "path": [
+          {
+            "x": 490.0,
+            "y": 220.0
+          },
+          {
+            "x": 490.0,
+            "y": 240.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#72",
-        "path": []
+        "path": [
+          {
+            "x": 480.0,
+            "y": 180.0
+          },
+          {
+            "x": 480.0,
+            "y": 145.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "RAMn"
         },
         "name": "unnamedWire#8",
-        "path": []
+        "path": [
+          {
+            "x": 570.0,
+            "y": 495.0
+          },
+          {
+            "x": 570.0,
+            "y": 380.0
+          }
+        ]
       },
       {
         "pin1": {
       },
       {
         "pin1": {
-          "compName": "Am2901#0",
-          "pinName": "B3"
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#4",
-          "pinName": "O0"
+          "compName": "Am2901#0",
+          "pinName": "A"
         },
         "name": "unnamedWire#81",
-        "path": []
+        "path": [
+          {
+            "x": 710.0,
+            "y": 385.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#4",
-          "pinName": "O1"
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
         },
         "pin2": {
           "compName": "Am2901#0",
-          "pinName": "B2"
+          "pinName": "B"
         },
         "name": "unnamedWire#82",
-        "path": []
+        "path": [
+          {
+            "x": 715.0,
+            "y": 405.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#0",
-          "pinName": "B1"
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#4",
-          "pinName": "O2"
+          "compName": "Am2901#1",
+          "pinName": "A"
         },
         "name": "unnamedWire#83",
-        "path": []
+        "path": [
+          {
+            "x": 835.0,
+            "y": 385.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#4",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#0",
-          "pinName": "B0"
+          "compName": "Am2901#1",
+          "pinName": "B"
         },
         "name": "unnamedWire#84",
-        "path": []
+        "path": [
+          {
+            "x": 840.0,
+            "y": 405.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#0",
-          "pinName": "A3"
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#3",
-          "pinName": "O0"
+          "compName": "Am2901#2",
+          "pinName": "A"
         },
         "name": "unnamedWire#85",
-        "path": []
+        "path": [
+          {
+            "x": 960.0,
+            "y": 385.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#3",
-          "pinName": "O1"
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#0",
-          "pinName": "A2"
+          "compName": "Am2901#2",
+          "pinName": "B"
         },
         "name": "unnamedWire#86",
-        "path": []
+        "path": [
+          {
+            "x": 965.0,
+            "y": 405.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#0",
-          "pinName": "A1"
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#3",
-          "pinName": "O2"
+          "compName": "Am2901#3",
+          "pinName": "A"
         },
         "name": "unnamedWire#87",
-        "path": []
+        "path": [
+          {
+            "x": 1095.0,
+            "y": 355.0
+          },
+          {
+            "x": 1095.0,
+            "y": 385.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#0",
-          "pinName": "A0"
+          "compName": "Am2901#3",
+          "pinName": "B"
         },
         "pin2": {
-          "compName": "Splitter#3",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
         },
         "name": "unnamedWire#88",
-        "path": []
+        "path": [
+          {
+            "x": 1100.0,
+            "y": 405.0
+          },
+          {
+            "x": 1100.0,
+            "y": 360.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#5",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#1",
-          "pinName": "A0"
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
         },
         "name": "unnamedWire#89",
         "path": []
           "pinName": "RAMn+3"
         },
         "name": "unnamedWire#9",
-        "path": []
+        "path": [
+          {
+            "x": 425.0,
+            "y": 495.0
+          },
+          {
+            "x": 425.0,
+            "y": 625.0
+          },
+          {
+            "x": 1100.0,
+            "y": 625.0
+          },
+          {
+            "x": 1100.0,
+            "y": 480.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#1",
-          "pinName": "A1"
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#5",
-          "pinName": "O2"
+          "compName": "TriStateBuffer#1",
+          "pinName": "OUT"
         },
         "name": "unnamedWire#90",
-        "path": []
+        "path": [
+          {
+            "x": 1135.0,
+            "y": 30.0
+          },
+          {
+            "x": 1135.0,
+            "y": 595.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Splitter#5",
-          "pinName": "O1"
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Am2901#1",
-          "pinName": "A2"
+          "compName": "mux1_16#1",
+          "pinName": "I1"
         },
         "name": "unnamedWire#91",
-        "path": []
+        "path": [
+          {
+            "x": 785.0,
+            "y": 275.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#1",
-          "pinName": "A3"
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#5",
-          "pinName": "O0"
+          "compName": "TriStateBuffer#0",
+          "pinName": "OUT"
         },
         "name": "unnamedWire#92",
-        "path": []
+        "path": [
+          {
+            "x": 1130.0,
+            "y": 15.0
+          },
+          {
+            "x": 1130.0,
+            "y": 570.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "Am2901#1",
-          "pinName": "B0"
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "Splitter#6",
-          "pinName": "O3"
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
         },
         "name": "unnamedWire#93",
         "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#6",
-          "pinName": "O2"
-        },
-        "pin2": {
-          "compName": "Am2901#1",
-          "pinName": "B1"
-        },
-        "name": "unnamedWire#94",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2901#1",
-          "pinName": "B2"
-        },
-        "pin2": {
-          "compName": "Splitter#6",
-          "pinName": "O1"
-        },
-        "name": "unnamedWire#95",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#6",
-          "pinName": "O0"
-        },
-        "pin2": {
-          "compName": "Am2901#1",
-          "pinName": "B3"
-        },
-        "name": "unnamedWire#96",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#7",
-          "pinName": "O0"
-        },
-        "pin2": {
-          "compName": "Am2901#2",
-          "pinName": "B3"
-        },
-        "name": "unnamedWire#97",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2901#2",
-          "pinName": "B2"
-        },
-        "pin2": {
-          "compName": "Splitter#7",
-          "pinName": "O1"
-        },
-        "name": "unnamedWire#98",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#7",
-          "pinName": "O2"
-        },
-        "pin2": {
-          "compName": "Am2901#2",
-          "pinName": "B1"
-        },
-        "name": "unnamedWire#99",
-        "path": []
       }
     ],
     "version": "0.1.1"
index bd5a844..43d67b0 100644 (file)
@@ -2,40 +2,13 @@
   "width": 90.0,
   "height": 125.0,
   "interfacePins": [
-    {
-      "location": {
-        "x": 90.0,
-        "y": 10.0
-      },
-      "name": "A0",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
     {
       "location": {
         "x": 90.0,
         "y": 15.0
       },
-      "name": "A1",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 90.0,
-        "y": 20.0
-      },
-      "name": "A2",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 90.0,
-        "y": 25.0
-      },
-      "name": "A3",
-      "logicWidth": 1,
+      "name": "A",
+      "logicWidth": 4,
       "usage": "INPUT"
     },
     {
         "x": 90.0,
         "y": 35.0
       },
-      "name": "B0",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 90.0,
-        "y": 40.0
-      },
-      "name": "B1",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 90.0,
-        "y": 45.0
-      },
-      "name": "B2",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 90.0,
-        "y": 50.0
-      },
-      "name": "B3",
-      "logicWidth": 1,
+      "name": "B",
+      "logicWidth": 4,
       "usage": "INPUT"
     },
     {
       },
       {
         "id": "Splitter",
-        "name": "Splitter#2",
+        "name": "Splitter#3",
         "pos": {
-          "x": 485.0,
-          "y": 620.0
+          "x": 670.0,
+          "y": 135.0
         },
         "params": {
           "logicWidth": 4,
-          "orientation": "RIGHT"
+          "orientation": "LEFT"
+        }
+      },
+      {
+        "id": "Splitter",
+        "name": "Splitter#4",
+        "pos": {
+          "x": 670.0,
+          "y": 335.0
+        },
+        "params": {
+          "logicWidth": 4,
+          "orientation": "LEFT"
+        }
+      },
+      {
+        "id": "Splitter",
+        "name": "Splitter#5",
+        "pos": {
+          "x": 475.0,
+          "y": 615.0
+        },
+        "params": {
+          "logicWidth": 4,
+          "orientation": "DOWN"
         }
       },
       {
       },
       {
         "pin1": {
-          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
-          "pinName": "D4"
+          "compName": "Splitter#5",
+          "pinName": "O0"
         },
         "pin2": {
-          "compName": "Splitter#2",
-          "pinName": "O0"
+          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D1"
         },
         "name": "unnamedWire#149",
         "path": [
           {
-            "x": 500.0,
-            "y": 645.0
-          },
-          {
-            "x": 500.0,
-            "y": 650.0
+            "x": 505.0,
+            "y": 630.0
           }
         ]
       },
           }
         ]
       },
-      {
-        "pin1": {
-          "compName": "Splitter#2",
-          "pinName": "O1"
-        },
-        "pin2": {
-          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
-          "pinName": "D3"
-        },
-        "name": "unnamedWire#150",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "_submodelinterface",
       },
       {
         "pin1": {
-          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
-          "pinName": "D2"
+          "compName": "Splitter#4",
+          "pinName": "O0"
         },
         "pin2": {
-          "compName": "Splitter#2",
-          "pinName": "O2"
+          "compName": "ram4#0",
+          "pinName": "B0"
         },
-        "name": "unnamedWire#175",
+        "name": "unnamedWire#178",
         "path": [
           {
-            "x": 500.0,
-            "y": 635.0
+            "x": 635.0,
+            "y": 365.0
           },
           {
-            "x": 500.0,
-            "y": 630.0
+            "x": 635.0,
+            "y": 215.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "Splitter#2",
-          "pinName": "O3"
+          "compName": "Splitter#4",
+          "pinName": "I"
         },
         "pin2": {
-          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
-          "pinName": "D1"
-        },
-        "name": "unnamedWire#176",
-        "path": [
-          {
-            "x": 505.0,
-            "y": 620.0
-          },
-          {
-            "x": 505.0,
-            "y": 630.0
-          }
-        ]
-      },
-      {
-        "pin1": {
           "compName": "_submodelinterface",
-          "pinName": "D"
-        },
-        "pin2": {
-          "compName": "Splitter#2",
-          "pinName": "I"
+          "pinName": "B"
         },
-        "name": "unnamedWire#177",
-        "path": [
-          {
-            "x": 600.0,
-            "y": 480.0
-          },
-          {
-            "x": 480.0,
-            "y": 480.0
-          },
-          {
-            "x": 480.0,
-            "y": 635.0
-          }
-        ]
+        "name": "unnamedWire#179",
+        "path": []
       },
       {
         "pin1": {
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "A0"
+          "compName": "Splitter#3",
+          "pinName": "I"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "A0"
+          "compName": "_submodelinterface",
+          "pinName": "A"
         },
         "name": "unnamedWire#27",
-        "path": [
-          {
-            "x": 650.0,
-            "y": 100.0
-          },
-          {
-            "x": 650.0,
-            "y": 175.0
-          }
-        ]
+        "path": []
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "A1"
+          "compName": "ram4#0",
+          "pinName": "B3"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "A1"
+          "compName": "Splitter#4",
+          "pinName": "O3"
         },
         "name": "unnamedWire#28",
         "path": [
           {
-            "x": 645.0,
-            "y": 150.0
+            "x": 650.0,
+            "y": 245.0
           },
           {
-            "x": 645.0,
-            "y": 185.0
+            "x": 650.0,
+            "y": 335.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "A2"
+          "compName": "ram4#0",
+          "pinName": "B2"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "A2"
+          "compName": "Splitter#4",
+          "pinName": "O2"
         },
         "name": "unnamedWire#29",
         "path": [
           {
-            "x": 860.0,
-            "y": 200.0
-          },
-          {
-            "x": 860.0,
-            "y": 160.0
-          },
-          {
-            "x": 640.0,
-            "y": 160.0
+            "x": 645.0,
+            "y": 235.0
           },
           {
-            "x": 640.0,
-            "y": 195.0
+            "x": 645.0,
+            "y": 345.0
           }
         ]
       },
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "A3"
+          "compName": "Splitter#4",
+          "pinName": "O1"
         },
         "pin2": {
           "compName": "ram4#0",
-          "pinName": "A3"
+          "pinName": "B1"
         },
         "name": "unnamedWire#30",
         "path": [
           {
-            "x": 855.0,
-            "y": 250.0
-          },
-          {
-            "x": 855.0,
-            "y": 165.0
-          },
-          {
-            "x": 635.0,
-            "y": 165.0
+            "x": 640.0,
+            "y": 355.0
           },
           {
-            "x": 635.0,
-            "y": 205.0
+            "x": 640.0,
+            "y": 225.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "B0"
+          "compName": "Splitter#5",
+          "pinName": "I"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "B0"
+          "compName": "_submodelinterface",
+          "pinName": "D"
         },
         "name": "unnamedWire#31",
         "path": [
           {
-            "x": 635.0,
-            "y": 350.0
+            "x": 490.0,
+            "y": 480.0
           },
           {
-            "x": 635.0,
-            "y": 215.0
+            "x": 600.0,
+            "y": 480.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "B1"
+          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D4"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "B1"
+          "compName": "Splitter#5",
+          "pinName": "O3"
         },
         "name": "unnamedWire#32",
         "path": [
           {
-            "x": 640.0,
-            "y": 400.0
-          },
-          {
-            "x": 640.0,
-            "y": 225.0
+            "x": 475.0,
+            "y": 645.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "B2"
+          "compName": "Splitter#5",
+          "pinName": "O2"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "B2"
+          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D3"
         },
         "name": "unnamedWire#33",
         "path": [
           {
-            "x": 645.0,
-            "y": 450.0
-          },
-          {
-            "x": 645.0,
-            "y": 235.0
+            "x": 485.0,
+            "y": 640.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "B3"
+          "compName": "Am2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D2"
         },
         "pin2": {
-          "compName": "ram4#0",
-          "pinName": "B3"
+          "compName": "Splitter#5",
+          "pinName": "O1"
         },
         "name": "unnamedWire#34",
         "path": [
           {
-            "x": 650.0,
-            "y": 500.0
-          },
-          {
-            "x": 650.0,
-            "y": 245.0
+            "x": 495.0,
+            "y": 635.0
           }
         ]
       },
           }
         ]
       },
+      {
+        "pin1": {
+          "compName": "ram4#0",
+          "pinName": "A0"
+        },
+        "pin2": {
+          "compName": "Splitter#3",
+          "pinName": "O0"
+        },
+        "name": "unnamedWire#44",
+        "path": [
+          {
+            "x": 650.0,
+            "y": 175.0
+          },
+          {
+            "x": 650.0,
+            "y": 165.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "Splitter#3",
+          "pinName": "O1"
+        },
+        "pin2": {
+          "compName": "ram4#0",
+          "pinName": "A1"
+        },
+        "name": "unnamedWire#45",
+        "path": [
+          {
+            "x": 645.0,
+            "y": 155.0
+          },
+          {
+            "x": 645.0,
+            "y": 185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "Splitter#3",
+          "pinName": "O2"
+        },
+        "pin2": {
+          "compName": "ram4#0",
+          "pinName": "A2"
+        },
+        "name": "unnamedWire#46",
+        "path": [
+          {
+            "x": 640.0,
+            "y": 145.0
+          },
+          {
+            "x": 640.0,
+            "y": 195.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "Splitter#3",
+          "pinName": "O3"
+        },
+        "pin2": {
+          "compName": "ram4#0",
+          "pinName": "A3"
+        },
+        "name": "unnamedWire#47",
+        "path": [
+          {
+            "x": 635.0,
+            "y": 135.0
+          },
+          {
+            "x": 635.0,
+            "y": 205.0
+          }
+        ]
+      },
       {
         "pin1": {
           "compName": "dlatch4#0",
index e20344e..38b9bd5 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "width": 96.25,
+  "width": 95.0,
   "height": 110.0,
   "interfacePins": [
     {
@@ -85,7 +85,7 @@
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 45.0
       },
       "name": "Cn+4",
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 5.0
       },
       "name": "F1",
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 15.0
       },
       "name": "F2",
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 25.0
       },
       "name": "F3",
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 35.0
       },
       "name": "F4",
     },
     {
       "location": {
-        "x": 96.25,
+        "x": 95.0,
         "y": 55.0
       },
       "name": "OVR",
         "id": "Am2901ALUInclDecode",
         "name": "Am2901ALUInclDecode#0",
         "pos": {
-          "x": 320.0,
+          "x": 315.0,
           "y": 15.0
         }
       },
         "id": "Am2901SourceDecode",
         "name": "Am2901SourceDecode#0",
         "pos": {
-          "x": 160.0,
+          "x": 155.0,
           "y": 160.0
         }
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 214.0,
+          "x": 209.0,
           "y": 224.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 219.0,
+          "x": 214.0,
           "y": 234.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 224.0,
+          "x": 219.0,
           "y": 244.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#3",
         "pos": {
-          "x": 229.0,
+          "x": 224.0,
           "y": 254.0
         },
         "params": 1
         "id": "sel2_4",
         "name": "sel2_4#0",
         "pos": {
-          "x": 241.0,
+          "x": 235.0,
           "y": 85.0
         }
       },
         "id": "sel3_4",
         "name": "sel3_4#0",
         "pos": {
-          "x": 241.0,
+          "x": 235.0,
           "y": 190.0
         }
       }
             "y": 85.0
           },
           {
-            "x": 175.0,
+            "x": 170.0,
             "y": 85.0
           },
           {
-            "x": 175.0,
+            "x": 170.0,
             "y": 140.0
           }
         ]
         "name": "unnamedWire#15",
         "path": [
           {
-            "x": 215.0,
+            "x": 210.0,
             "y": 150.0
           }
         ]
         "name": "unnamedWire#16",
         "path": [
           {
-            "x": 220.0,
+            "x": 215.0,
             "y": 160.0
           }
         ]
         "name": "unnamedWire#17",
         "path": [
           {
-            "x": 225.0,
+            "x": 220.0,
             "y": 170.0
           }
         ]
         "name": "unnamedWire#18",
         "path": [
           {
-            "x": 230.0,
+            "x": 225.0,
             "y": 180.0
           }
         ]
             "y": 5.0
           },
           {
-            "x": 155.0,
+            "x": 150.0,
             "y": 5.0
           },
           {
-            "x": 155.0,
+            "x": 150.0,
             "y": 165.0
           }
         ]
         "name": "unnamedWire#31",
         "path": [
           {
-            "x": 205.0,
+            "x": 200.0,
             "y": 215.0
           },
           {
-            "x": 205.0,
+            "x": 200.0,
             "y": 165.0
           }
         ]
         "name": "unnamedWire#32",
         "path": [
           {
-            "x": 200.0,
+            "x": 195.0,
             "y": 205.0
           },
           {
-            "x": 200.0,
+            "x": 195.0,
             "y": 90.0
           }
         ]
         "name": "unnamedWire#33",
         "path": [
           {
-            "x": 210.0,
+            "x": 205.0,
             "y": 185.0
           },
           {
-            "x": 210.0,
+            "x": 205.0,
             "y": 205.0
           }
         ]
         "name": "unnamedWire#36",
         "path": [
           {
-            "x": 280.0,
+            "x": 275.0,
             "y": 90.0
           },
           {
-            "x": 280.0,
+            "x": 275.0,
             "y": 60.0
           }
         ]
         "name": "unnamedWire#37",
         "path": [
           {
-            "x": 285.0,
+            "x": 280.0,
             "y": 100.0
           },
           {
-            "x": 285.0,
+            "x": 280.0,
             "y": 70.0
           }
         ]
         "name": "unnamedWire#38",
         "path": [
           {
-            "x": 290.0,
+            "x": 285.0,
             "y": 110.0
           },
           {
-            "x": 290.0,
+            "x": 285.0,
             "y": 80.0
           }
         ]
         "name": "unnamedWire#39",
         "path": [
           {
-            "x": 295.0,
+            "x": 290.0,
             "y": 120.0
           },
           {
-            "x": 295.0,
+            "x": 290.0,
             "y": 90.0
           }
         ]
         "name": "unnamedWire#40",
         "path": [
           {
-            "x": 300.0,
+            "x": 295.0,
             "y": 195.0
           },
           {
-            "x": 300.0,
+            "x": 295.0,
             "y": 100.0
           }
         ]
         "name": "unnamedWire#41",
         "path": [
           {
-            "x": 305.0,
+            "x": 300.0,
             "y": 205.0
           },
           {
-            "x": 305.0,
+            "x": 300.0,
             "y": 110.0
           }
         ]
         "name": "unnamedWire#42",
         "path": [
           {
-            "x": 310.0,
+            "x": 305.0,
             "y": 215.0
           },
           {
-            "x": 310.0,
+            "x": 305.0,
             "y": 120.0
           }
         ]
         "name": "unnamedWire#43",
         "path": [
           {
-            "x": 315.0,
+            "x": 310.0,
             "y": 225.0
           },
           {
-            "x": 315.0,
+            "x": 310.0,
             "y": 130.0
           }
         ]
         "name": "unnamedWire#45",
         "path": [
           {
-            "x": 380.0,
+            "x": 375.0,
             "y": 30.0
           },
           {
-            "x": 380.0,
+            "x": 375.0,
             "y": 60.0
           }
         ]
         "name": "unnamedWire#46",
         "path": [
           {
-            "x": 375.0,
+            "x": 370.0,
             "y": 40.0
           },
           {
-            "x": 375.0,
+            "x": 370.0,
             "y": 100.0
           }
         ]
         "name": "unnamedWire#47",
         "path": [
           {
-            "x": 370.0,
+            "x": 365.0,
             "y": 50.0
           },
           {
-            "x": 370.0,
+            "x": 365.0,
             "y": 140.0
           }
         ]
         "name": "unnamedWire#48",
         "path": [
           {
-            "x": 365.0,
+            "x": 360.0,
             "y": 60.0
           },
           {
-            "x": 365.0,
+            "x": 360.0,
             "y": 180.0
           }
         ]
         "name": "unnamedWire#49",
         "path": [
           {
-            "x": 360.0,
+            "x": 355.0,
             "y": 70.0
           },
           {
-            "x": 360.0,
+            "x": 355.0,
             "y": 220.0
           }
         ]
         "name": "unnamedWire#6",
         "path": [
           {
-            "x": 210.0,
+            "x": 205.0,
             "y": 175.0
           },
           {
-            "x": 210.0,
+            "x": 205.0,
             "y": 100.0
           }
         ]
             "y": 55.0
           },
           {
-            "x": 190.0,
+            "x": 185.0,
             "y": 55.0
           },
           {
-            "x": 190.0,
+            "x": 185.0,
             "y": 110.0
           }
         ]
             "y": 65.0
           },
           {
-            "x": 185.0,
+            "x": 180.0,
             "y": 65.0
           },
           {
-            "x": 185.0,
+            "x": 180.0,
             "y": 120.0
           }
         ]
             "y": 75.0
           },
           {
-            "x": 180.0,
+            "x": 175.0,
             "y": 75.0
           },
           {
-            "x": 180.0,
+            "x": 175.0,
             "y": 130.0
           }
         ]
index 51e8cec..10cf141 100644 (file)
@@ -7,6 +7,7 @@ import org.osgi.framework.BundleContext;
 
 import net.mograsim.logic.model.serializing.ClassLoaderBasedResourceLoader;
 import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
+import net.mograsim.machine.MachineLoader;
 
 public class Am2900Loader implements BundleActivator
 {
@@ -32,6 +33,7 @@ public class Am2900Loader implements BundleActivator
                ClassLoaderBasedResourceLoader resourceLoader = ClassLoaderBasedResourceLoader.create(Am2900Loader.class.getClassLoader());
                IndirectModelComponentCreator.registerResourceLoader(resourceLoader, "Am2900Loader");
                IndirectModelComponentCreator.loadStandardComponentIDs(Am2900Loader.class.getResourceAsStream("standardComponentIDMapping.json"));
+               MachineLoader.setup();
 //             System.out.println("SETUP DONE"); // TODO: Debug
        }
 }
index 60c1cf8..bddddea 100644 (file)
@@ -13,13 +13,13 @@ import net.mograsim.logic.model.model.components.ModelComponent;
 public class TestableAm2901Impl implements TestableAm2901
 {
        private ModelComponent am2901;
-       private CoreManualSwitch I8, I7, I6, I5, I4, I3, I2, I1, I0;
+       private CoreManualSwitch I;
        private CoreManualSwitch C;
        private CoreManualSwitch Cn;
-       private CoreManualSwitch D1, D2, D3, D4;
-       private CoreManualSwitch A0, A1, A2, A3;
-       private CoreManualSwitch B0, B1, B2, B3;
-       private CoreBitDisplay Y1, Y2, Y3, Y4;
+       private CoreManualSwitch D;
+       private CoreManualSwitch A;
+       private CoreManualSwitch B;
+       private CoreBitDisplay Y;
        private CoreBitDisplay F_0, Cn_4, OVR, F3;
        private SwitchWithDisplay RAMn, RAMn_3, Qn, Qn_3;
 
@@ -40,48 +40,34 @@ public class TestableAm2901Impl implements TestableAm2901
        @Override
        public void setDest(Am2901_Dest dest)
        {
-               var bits = TestUtil.of(dest.ordinal(), 3);
-               I8.setState(bits.getLSBit(2));
-               I7.setState(bits.getLSBit(1));
-               I6.setState(bits.getLSBit(0));
+               BitVector oldI = I.getValues();
+               I.setState(TestUtil.of(dest.ordinal(), 3).concat(oldI.subVector(3)));
        }
 
        @Override
        public void setFunc(Am2901_Func func)
        {
-               var bits = TestUtil.of(func.ordinal(), 3);
-               I5.setState(bits.getLSBit(2));
-               I4.setState(bits.getLSBit(1));
-               I3.setState(bits.getLSBit(0));
+               BitVector oldI = I.getValues();
+               I.setState(oldI.subVector(0, 3).concat(TestUtil.of(func.ordinal(), 3)).concat(oldI.subVector(6)));
        }
 
        @Override
        public void setSrc(Am2901_Src src)
        {
-               var bits = TestUtil.of(src.ordinal(), 3);
-               I2.setState(bits.getLSBit(2));
-               I1.setState(bits.getLSBit(1));
-               I0.setState(bits.getLSBit(0));
+               BitVector oldI = I.getValues();
+               I.setState(oldI.subVector(0, 6).concat(TestUtil.of(src.ordinal(), 3)));
        }
 
        @Override
        public void setReg_A(String val_4_bit)
        {
-               var bits = BitVector.parse(val_4_bit);
-               A3.setState(bits.getLSBit(3));
-               A2.setState(bits.getLSBit(2));
-               A1.setState(bits.getLSBit(1));
-               A0.setState(bits.getLSBit(0));
+               A.setState(BitVector.parse(val_4_bit));
        }
 
        @Override
        public void setReg_B(String val_4_bit)
        {
-               var bits = BitVector.parse(val_4_bit);
-               B3.setState(bits.getLSBit(3));
-               B2.setState(bits.getLSBit(2));
-               B1.setState(bits.getLSBit(1));
-               B0.setState(bits.getLSBit(0));
+               B.setState(BitVector.parse(val_4_bit));
        }
 
        @Override
@@ -99,11 +85,7 @@ public class TestableAm2901Impl implements TestableAm2901
        @Override
        public void setD(String val_4_bit)
        {
-               var bits = BitVector.parse(val_4_bit);
-               D4.setState(bits.getLSBit(3));
-               D3.setState(bits.getLSBit(2));
-               D2.setState(bits.getLSBit(1));
-               D1.setState(bits.getLSBit(0));
+               D.setState(BitVector.parse(val_4_bit));
        }
 
        @Override
@@ -199,11 +181,7 @@ public class TestableAm2901Impl implements TestableAm2901
        @Override
        public String getY()
        {
-               var y3 = Y4.getDisplayedValue();
-               var y2 = Y3.getDisplayedValue();
-               var y1 = Y2.getDisplayedValue();
-               var y0 = Y1.getDisplayedValue();
-               return y3.concat(y2).concat(y1).concat(y0).toString();
+               return Y.getDisplayedValue().toString();
        }
 
        @Override
index 6936168..d604d94 100644 (file)
@@ -17,3 +17,5 @@ Export-Package: net.mograsim.machine,
  net.mograsim.machine.mi,
  net.mograsim.machine.mi.parameters,
  net.mograsim.machine.standard.memory
+Bundle-Activator: net.mograsim.machine.MachineLoader
+Bundle-ActivationPolicy: lazy
diff --git a/net.mograsim.machine/src/net/mograsim/machine/MachineLoader.java b/net.mograsim.machine/src/net/mograsim/machine/MachineLoader.java
new file mode 100644 (file)
index 0000000..9a88575
--- /dev/null
@@ -0,0 +1,36 @@
+package net.mograsim.machine;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import net.mograsim.logic.model.serializing.ClassLoaderBasedResourceLoader;
+import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
+
+public class MachineLoader implements BundleActivator
+{
+       private static AtomicBoolean activated = new AtomicBoolean(false);
+
+       @Override
+       public void start(BundleContext context) throws Exception
+       {
+               setup();
+       }
+
+       @Override
+       public void stop(BundleContext context) throws Exception
+       {
+               // nothing
+       }
+
+       public static void setup()
+       {
+               if (activated.getAndSet(true))
+                       return;
+               ClassLoaderBasedResourceLoader resourceLoader = ClassLoaderBasedResourceLoader.create(MachineLoader.class.getClassLoader());
+               IndirectModelComponentCreator.registerResourceLoader(resourceLoader, "MachineLoader");
+               IndirectModelComponentCreator.loadStandardComponentIDs(MachineLoader.class.getResourceAsStream("standardComponentIDMapping.json"));
+//             System.out.println("SETUP DONE"); // TODO: Debug
+       }
+}
index f7dd982..8181283 100644 (file)
@@ -4,7 +4,9 @@ import java.util.List;
 
 import net.mograsim.logic.core.components.BasicCoreComponent;
 import net.mograsim.logic.core.timeline.Timeline;
+import net.mograsim.logic.core.timeline.TimelineEventHandler;
 import net.mograsim.logic.core.types.Bit;
+import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
 import net.mograsim.machine.MainMemoryDefinition;
@@ -49,25 +51,31 @@ public class CoreWordAddressableMemory extends BasicCoreComponent
        }
 
        @Override
-       protected void compute()
+       protected TimelineEventHandler compute()
        {
                if(clock.getValue() != Bit.ONE)
-                       return;
+                       return null;
+               
                if (!address.hasNumericValue())
                {
                        if (read.equals(rWBit.getValue()))
-                               data.feedSignals(Bit.U.toVector(data.width()));
-                       else
-                               data.clearSignals();
-                       return;
+                               return e -> data.feedSignals(Bit.U.toVector(data.width()));
+                       return e -> data.clearSignals();
                }
                long addressed = address.getUnsignedValue();
                if (read.equals(rWBit.getValue()))
-                       data.feedSignals(memory.getCell(addressed));
+               {
+                       BitVector storedData = memory.getCell(addressed);
+                       return e -> data.feedSignals(storedData);
+               }
                else
                {
-                       data.clearSignals();
-                       memory.setCell(addressed, data.getValues());
+                       BitVector transData = data.getValues();
+                       return e ->
+                       {
+                               data.clearSignals();
+                               memory.setCell(addressed, transData);
+                       };
                }
        }
 
index 218c655..20f27fb 100644 (file)
@@ -4,7 +4,6 @@ import net.haspamelodica.swt.helper.gcs.GeneralGC;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
 import net.mograsim.logic.model.model.LogicModelModifiable;
 import net.mograsim.logic.model.model.components.ModelComponent;
-import net.mograsim.logic.model.model.components.atomic.ModelAndGate;
 import net.mograsim.logic.model.model.wires.Pin;
 import net.mograsim.logic.model.model.wires.PinUsage;
 import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
@@ -12,8 +11,8 @@ import net.mograsim.logic.model.serializing.IdentifyParams;
 import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
 import net.mograsim.logic.model.snippets.Renderer;
 import net.mograsim.logic.model.snippets.outlinerenderers.DefaultOutlineRenderer;
-import net.mograsim.logic.model.snippets.symbolrenderers.CenteredTextSymbolRenderer;
-import net.mograsim.logic.model.snippets.symbolrenderers.CenteredTextSymbolRenderer.CenteredTextParams;
+import net.mograsim.logic.model.snippets.symbolrenderers.SimpleRectangularLikeSymbolRenderer;
+import net.mograsim.logic.model.snippets.symbolrenderers.SimpleRectangularLikeSymbolRenderer.SimpleRectangularLikeParams;
 import net.mograsim.logic.model.util.JsonHandler;
 import net.mograsim.machine.MainMemoryDefinition;
 
@@ -21,20 +20,23 @@ public class ModelMemoryWA extends ModelComponent
 {
        private final MainMemoryDefinition              definition;
        private final Pin                                               addrPin, dataPin, rWPin, clock;
-       private CoreWordAddressableMemory       memory;
+       private CoreWordAddressableMemory               memory;
        private final static int                                width   = 100, height = 300;
        private Renderer                                                symbolRenderer;
        private Renderer                                                outlineRenderer;
 
        public ModelMemoryWA(LogicModelModifiable model, MainMemoryDefinition definition, String name)
        {
-               super(model, name,false);
+               super(model, name, false);
                this.definition = definition;
 
-               CenteredTextParams renderer1Params = new CenteredTextParams();
-               renderer1Params.text = "RAM";
-               renderer1Params.fontHeight = 24;
-               this.symbolRenderer = new CenteredTextSymbolRenderer(this, renderer1Params);
+               SimpleRectangularLikeParams rendererParams = new SimpleRectangularLikeParams();
+               rendererParams.centerText = "RAM";
+               rendererParams.centerTextHeight = 24;
+               rendererParams.horizontalComponentCenter = width / 100;
+               rendererParams.pinLabelHeight = 17.5;
+               rendererParams.pinLabelMargin = 2.5;
+               this.symbolRenderer = new SimpleRectangularLikeSymbolRenderer(this, rendererParams);
                this.outlineRenderer = new DefaultOutlineRenderer(this);
 
                setSize(width, height);
@@ -109,7 +111,7 @@ public class ModelMemoryWA extends ModelComponent
        static
        {
                LogicCoreAdapter.addComponentAdapter(new WordAddressableMemoryAdapter());
-               IndirectModelComponentCreator.setComponentSupplier(ModelAndGate.class.getCanonicalName(), (m, p, n) ->
+               IndirectModelComponentCreator.setComponentSupplier(ModelMemoryWA.class.getCanonicalName(), (m, p, n) ->
                {
                        ModelMemoryWAParams params = JsonHandler.fromJsonTree(p, ModelMemoryWAParams.class);
                        return new ModelMemoryWA(m, MainMemoryDefinition.create(params.addrBits, params.cellWidth, params.minAddr, params.maxAddr), n);
diff --git a/net.mograsim.machine/src/net/mograsim/machine/standardComponentIDMapping.json b/net.mograsim.machine/src/net/mograsim/machine/standardComponentIDMapping.json
new file mode 100644 (file)
index 0000000..eb8c941
--- /dev/null
@@ -0,0 +1,4 @@
+mograsim version: 0.1.3
+{
+  "MemoryWA": "resloader:MachineLoader:class:net.mograsim.machine.standard.memory.ModelMemoryWA"
+}
\ No newline at end of file