Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature unimplemented (xor X[N-1:0] (a, b, c)) #70

Open
miquelt9 opened this issue Dec 7, 2024 · 1 comment
Open

Feature unimplemented (xor X[N-1:0] (a, b, c)) #70

miquelt9 opened this issue Dec 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@miquelt9
Copy link

miquelt9 commented Dec 7, 2024

Hi! I was willing to read the following system verilog:

module bus_invert(in, out, invert);
    parameter N=8;
    input [N-1:0] in;
    input invert;
    output [N-1:0] out;
    xor X[N-1:0] (out, in, invert);
endmodule

However it seems it is a feature not yet implemented:

yosys> read_slang program_x.v 

1. Executing SLANG frontend.
{
  "name": "",
  "kind": "PrimitiveInstance",
  "addr": 96420748295152,
  "primitiveType": "96420748278896 xor",
  "ports": [
    {
      "kind": "Assignment",
      "type": "logic[7:0]",
      "left": {
        "kind": "RangeSelect",
        "type": "logic[0:0]",
        "selectionKind": "Simple",
        "value": {
          "kind": "Conversion",
          "type": "logic[7:0]",
          "operand": {
            "kind": "NamedValue",
            "type": "logic[7:0]",
            "symbol": "96420748284944 out"
          }
        },
        "left": {
          "kind": "IntegerLiteral",
          "type": "int",
          "value": "0",
          "constant": "0"
        },
        "right": {
          "kind": "IntegerLiteral",
          "type": "int",
          "value": "0",
          "constant": "0"
        }
      },
      "right": {
        "kind": "EmptyArgument",
        "type": "logic"
      },
      "isNonBlocking": false
    },
    {
      "kind": "RangeSelect",
      "type": "logic[0:0]",
      "selectionKind": "Simple",
      "value": {
        "kind": "Conversion",
        "type": "logic[7:0]",
        "operand": {
          "kind": "NamedValue",
          "type": "logic[7:0]",
          "symbol": "96420748284208 in"
        }
      },
      "left": {
        "kind": "IntegerLiteral",
        "type": "int",
        "value": "0",
        "constant": "0"
      },
      "right": {
        "kind": "IntegerLiteral",
        "type": "int",
        "value": "0",
        "constant": "0"
      }
    },
    {
      "kind": "NamedValue",
      "type": "logic",
      "symbol": "96420748284576 invert"
    }
  ]
}
Source line program_x.v:7:9:     xor X[N-1:0] (out, in, invert);
<suppressed ~3 debug messages>
ERROR: Feature unimplemented at src/slang_frontend.cc:2947, see AST and code line dump above

My goal would be to read it in order to perform equivalence checking on it for a project I am doing. I have considered tools such as s2v2 but it seems it is also not yet supported, however I was able to perform a simulation on it using iverilog.

I appreciate any suggestions or comments.

@povik
Copy link
Owner

povik commented Dec 16, 2024

I confirm built-in primitives are unsupported, but it's a relatively simple addition (at least for the basic types). I put it on my queue

@povik povik added the enhancement New feature or request label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants