netlistsvg icon indicating copy to clipboard operation
netlistsvg copied to clipboard

Tri-State Logic Support Request

Open Nado15 opened this issue 2 months ago • 0 comments

Hi,

can it be that Tri-State Logic is not supported? I am implementing a shared bus

I skimmed through the generated json file and have following block:


          "$ternary$top.v:302$4": {
          "hide_name": 1,
          "type": "$mux",
          "parameters": {
            "WIDTH": "00000000000000000000000000001000"
          },
          "attributes": {
            "src": "top.v:302.22-302.49"
          },
          "port_directions": {
            "A": "input",
            "B": "input",
            "S": "input",
            "Y": "output"
          },
          "connections": {
            "A": [ "z", "z", "z", "z", "z", "z", "z", "z" ],
            "B": [ 6, 7, 8, 9, 10, 11, 12, 13 ],
            "S": [ 5 ],
            "Y": [ 14, 15, 16, 17, 18, 19, 20, 21 ]
          }
        }

netlistsvg throws an error and prints out the following message.

  {
    "keyword": "type",
    "dataPath": "/modules/$paramod\\Register\\DATA_WIDTH=s32'00000000000000000000000000001000/cells/$ternary$top.v:302$4/connections/A/6",
    "schemaPath": "#/properties/modules/additionalProperties/properties/cells/additionalProperties/properties/connections/additionalProperties/items/oneOf/0/type",
    "params": {
      "type": "number"
    },
    "message": "should be number"
  },
  {
    "keyword": "enum",
    "dataPath": "/modules/$paramod\\Register\\DATA_WIDTH=s32'00000000000000000000000000001000/cells/$ternary$top.v:302$4/connections/A/6",
    "schemaPath": "#/properties/modules/additionalProperties/properties/cells/additionalProperties/properties/connections/additionalProperties/items/oneOf/1/enum",
    "params": {
      "allowedValues": [
        "0",
        "1",
        "x"
      ]
    },
    "message": "should be equal to one of the allowed values"
  },
  {
    "keyword": "oneOf",
    "dataPath": "/modules/$paramod\\Register\\DATA_WIDTH=s32'00000000000000000000000000001000/cells/$ternary$top.v:302$4/connections/A/6",
    "schemaPath": "#/properties/modules/additionalProperties/properties/cells/additionalProperties/properties/connections/additionalProperties/items/oneOf",
    "params": {
      "passingSchemas": null
    },
    "message": "should match exactly one schema in oneOf"
  }

Is there a work around (for example allow value z as well etc.) ?

Nado15 avatar May 02 '24 03:05 Nado15