RAM reads no longer cause X on the data bus:
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 18 Sep 2019 07:41:49 +0000 (09:41 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 18 Sep 2019 07:41:49 +0000 (09:41 +0200)
When a read was triggered (for example setting _ABUS to AB) in the same
cycle as the data bus has a (non-tristate) value, in the next half-cycle
(when C=1), the TriStateBuffer forwarding data from the RAM to the data
bus would already be active, while the data bus still is pulled to the
"old" value, causing X's to occur.

plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json

index 8534163..0be2159 100644 (file)
         "id": "NandGate",
         "name": "NandGate#5",
         "pos": {
-          "x": 100.0,
+          "x": 60.0,
           "y": 235.0
         },
         "params": 1
         "id": "NandGate",
         "name": "NandGate#7",
         "pos": {
-          "x": 105.0,
-          "y": 275.0
+          "x": 65.0,
+          "y": 270.0
         },
         "params": 1
       },
       },
       {
         "id": "TriStateBuffer",
-        "name": "TriStateBuffer#6",
+        "name": "TriStateBuffer#5",
         "pos": {
           "x": 185.0,
           "y": 145.0
         "name": "WireCrossPoint#42",
         "pos": {
           "x": 364.0,
-          "y": 264.0
+          "y": 289.0
         },
         "params": 1
       },
         "name": "WireCrossPoint#44",
         "pos": {
           "x": 174.0,
-          "y": 264.0
+          "y": 289.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#45",
         "pos": {
-          "x": 174.0,
-          "y": 254.0
+          "x": 129.0,
+          "y": 304.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#47",
+        "name": "WireCrossPoint#46",
         "pos": {
-          "x": 99.0,
-          "y": 299.0
+          "x": 129.0,
+          "y": 279.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#48",
+        "name": "WireCrossPoint#47",
         "pos": {
-          "x": 174.0,
-          "y": 284.0
+          "x": 59.0,
+          "y": 294.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#49",
+        "name": "WireCrossPoint#48",
         "pos": {
-          "x": 124.0,
+          "x": 84.0,
           "y": 244.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#50",
+        "name": "WireCrossPoint#49",
         "pos": {
-          "x": 99.0,
-          "y": 279.0
+          "x": 59.0,
+          "y": 274.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#51",
+        "name": "WireCrossPoint#50",
         "pos": {
           "x": 234.0,
           "y": 154.0
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#52",
+        "name": "WireCrossPoint#51",
         "pos": {
           "x": 164.0,
           "y": 154.0
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#53",
+        "name": "WireCrossPoint#52",
         "pos": {
-          "x": 99.0,
-          "y": 289.0
+          "x": 59.0,
+          "y": 284.0
         },
         "params": 1
       },
       {
         "id": "WireCrossPoint",
-        "name": "WireCrossPoint#54",
+        "name": "WireCrossPoint#53",
         "pos": {
           "x": 174.0,
-          "y": 309.0
+          "y": 314.0
         },
         "params": 1
       },
         "id": "and",
         "name": "and#3",
         "pos": {
-          "x": 130.0,
+          "x": 90.0,
           "y": 240.0
         }
       },
         "id": "and",
         "name": "and#4",
         "pos": {
-          "x": 130.0,
-          "y": 270.0
+          "x": 90.0,
+          "y": 265.0
+        }
+      },
+      {
+        "id": "and",
+        "name": "and#5",
+        "pos": {
+          "x": 185.0,
+          "y": 240.0
         }
       },
       {
         "id": "dff",
         "name": "dff#0",
         "pos": {
-          "x": 180.0,
-          "y": 270.0
+          "x": 135.0,
+          "y": 265.0
         }
       },
       {
         "id": "dff",
         "name": "dff#1",
         "pos": {
-          "x": 180.0,
+          "x": 135.0,
           "y": 240.0
         }
       },
         "id": "dff",
         "name": "dff#2",
         "pos": {
-          "x": 180.0,
-          "y": 295.0
+          "x": 135.0,
+          "y": 290.0
         }
       },
       {
             "y": 325.0
           },
           {
-            "x": 95.0,
+            "x": 55.0,
             "y": 325.0
           },
           {
-            "x": 95.0,
+            "x": 55.0,
             "y": 250.0
           }
         ]
           "pinName": "D"
         },
         "pin2": {
-          "compName": "WireCrossPoint#52",
+          "compName": "WireCrossPoint#51",
           "pinName": ""
         },
         "name": "unnamedWire#126",
           "pinName": "OUT"
         },
         "pin2": {
-          "compName": "WireCrossPoint#51",
+          "compName": "WireCrossPoint#50",
           "pinName": ""
         },
         "name": "unnamedWire#135",
             "y": 320.0
           },
           {
-            "x": 100.0,
+            "x": 60.0,
             "y": 320.0
           }
         ]
         "name": "unnamedWire#335",
         "path": [
           {
-            "x": 95.0,
+            "x": 55.0,
             "y": 230.0
           },
           {
-            "x": 95.0,
+            "x": 55.0,
             "y": 240.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#53",
+          "compName": "WireCrossPoint#52",
           "pinName": ""
         },
         "pin2": {
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#54",
+          "compName": "WireCrossPoint#53",
           "pinName": ""
         },
         "name": "unnamedWire#346",
         "path": [
           {
             "x": 480.0,
-            "y": 265.0
+            "y": 290.0
           },
           {
             "x": 480.0,
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#44",
+          "compName": "WireCrossPoint#53",
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#48",
+          "compName": "WireCrossPoint#44",
           "pinName": ""
         },
         "name": "unnamedWire#353",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#48",
+          "compName": "WireCrossPoint#53",
           "pinName": ""
         },
         "pin2": {
-          "compName": "dff#0",
-          "pinName": "C"
+          "compName": "WireCrossPoint#45",
+          "pinName": ""
         },
         "name": "unnamedWire#354",
-        "path": []
+        "path": [
+          {
+            "x": 130.0,
+            "y": 315.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#45",
+          "compName": "WireCrossPoint#44",
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#44",
-          "pinName": ""
+          "compName": "dff16#1",
+          "pinName": "C"
         },
         "name": "unnamedWire#355",
-        "path": []
+        "path": [
+          {
+            "x": 175.0,
+            "y": 70.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "pin2": {
-          "compName": "dff#1",
+          "compName": "dff#2",
           "pinName": "C"
         },
         "name": "unnamedWire#356",
           "pinName": ""
         },
         "pin2": {
-          "compName": "dff16#1",
-          "pinName": "C"
+          "compName": "WireCrossPoint#46",
+          "pinName": ""
         },
         "name": "unnamedWire#357",
-        "path": [
-          {
-            "x": 175.0,
-            "y": 70.0
-          }
-        ]
+        "path": []
       },
       {
         "pin1": {
-          "compName": "dff#1",
-          "pinName": "Q"
+          "compName": "and#5",
+          "pinName": "Y"
         },
         "pin2": {
           "compName": "TriStateBuffer#4",
         "name": "unnamedWire#358",
         "path": [
           {
-            "x": 220.0,
+            "x": 225.0,
             "y": 245.0
           },
           {
-            "x": 220.0,
+            "x": 225.0,
             "y": 200.0
           },
           {
           "pinName": "Q"
         },
         "pin2": {
-          "compName": "TriStateBuffer#6",
+          "compName": "TriStateBuffer#5",
           "pinName": "EN"
         },
         "name": "unnamedWire#359",
         "path": [
           {
-            "x": 225.0,
-            "y": 275.0
+            "x": 230.0,
+            "y": 270.0
           },
           {
-            "x": 225.0,
+            "x": 230.0,
             "y": 170.0
           },
           {
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#53",
+          "compName": "WireCrossPoint#52",
           "pinName": ""
         },
         "name": "unnamedWire#360",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#50",
+          "compName": "WireCrossPoint#49",
           "pinName": ""
         },
         "pin2": {
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#50",
+          "compName": "WireCrossPoint#48",
           "pinName": ""
         },
         "pin2": {
           "compName": "and#3",
-          "pinName": "B"
+          "pinName": "A"
         },
         "name": "unnamedWire#362",
-        "path": [
-          {
-            "x": 100.0,
-            "y": 265.0
-          },
-          {
-            "x": 120.0,
-            "y": 265.0
-          },
-          {
-            "x": 120.0,
-            "y": 255.0
-          }
-        ]
+        "path": []
       },
       {
         "pin1": {
-          "compName": "NandGate#7",
+          "compName": "and#4",
           "pinName": "Y"
         },
         "pin2": {
-          "compName": "and#4",
-          "pinName": "B"
+          "compName": "dff#0",
+          "pinName": "D"
         },
         "name": "unnamedWire#363",
         "path": []
         },
         "pin2": {
           "compName": "and#3",
-          "pinName": "A"
+          "pinName": "B"
         },
         "name": "unnamedWire#364",
-        "path": []
+        "path": [
+          {
+            "x": 60.0,
+            "y": 260.0
+          },
+          {
+            "x": 80.0,
+            "y": 260.0
+          },
+          {
+            "x": 80.0,
+            "y": 255.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#49",
+          "compName": "WireCrossPoint#48",
           "pinName": ""
         },
         "pin2": {
         "name": "unnamedWire#365",
         "path": [
           {
-            "x": 125.0,
-            "y": 275.0
+            "x": 85.0,
+            "y": 270.0
           }
         ]
       },
           "pinName": "Y"
         },
         "pin2": {
-          "compName": "WireCrossPoint#49",
+          "compName": "WireCrossPoint#48",
           "pinName": ""
         },
         "name": "unnamedWire#366",
       },
       {
         "pin1": {
-          "compName": "and#4",
+          "compName": "NandGate#7",
           "pinName": "Y"
         },
         "pin2": {
-          "compName": "dff#0",
-          "pinName": "D"
+          "compName": "and#4",
+          "pinName": "B"
         },
         "name": "unnamedWire#368",
         "path": []
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#51",
+          "compName": "WireCrossPoint#50",
           "pinName": ""
         },
         "pin2": {
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#52",
+          "compName": "WireCrossPoint#51",
           "pinName": ""
         },
         "pin2": {
-          "compName": "TriStateBuffer#6",
+          "compName": "TriStateBuffer#5",
           "pinName": "OUT"
         },
         "name": "unnamedWire#370",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#52",
+          "compName": "WireCrossPoint#51",
           "pinName": ""
         },
         "pin2": {
       },
       {
         "pin1": {
-          "compName": "TriStateBuffer#6",
+          "compName": "TriStateBuffer#5",
           "pinName": "IN"
         },
         "pin2": {
-          "compName": "WireCrossPoint#51",
+          "compName": "WireCrossPoint#50",
           "pinName": ""
         },
         "name": "unnamedWire#372",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#53",
+          "compName": "WireCrossPoint#52",
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#50",
+          "compName": "WireCrossPoint#49",
           "pinName": ""
         },
         "name": "unnamedWire#373",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#54",
+          "compName": "WireCrossPoint#46",
           "pinName": ""
         },
         "pin2": {
-          "compName": "dff#2",
+          "compName": "dff#0",
           "pinName": "C"
         },
         "name": "unnamedWire#375",
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#54",
+          "compName": "WireCrossPoint#46",
           "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#48",
-          "pinName": ""
+          "compName": "dff#1",
+          "pinName": "C"
         },
         "name": "unnamedWire#376",
-        "path": []
+        "path": [
+          {
+            "x": 130.0,
+            "y": 255.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#377",
         "path": [
           {
-            "x": 230.0,
-            "y": 300.0
+            "x": 235.0,
+            "y": 295.0
           },
           {
-            "x": 230.0,
+            "x": 235.0,
             "y": 210.0
           },
           {
             "y": 140.0
           }
         ]
+      },
+      {
+        "pin1": {
+          "compName": "dff#1",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "and#5",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#378",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "and#5",
+          "pinName": "B"
+        },
+        "name": "unnamedWire#379",
+        "path": [
+          {
+            "x": 180.0,
+            "y": 255.0
+          }
+        ]
       }
     ],
     "version": "0.1.1"