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

[verilog] Primitives #201

Open
agg23 opened this issue Apr 2, 2023 · 4 comments
Open

[verilog] Primitives #201

agg23 opened this issue Apr 2, 2023 · 4 comments

Comments

@agg23
Copy link
Contributor

agg23 commented Apr 2, 2023

Unsure if this actually applies to the project, as it probably doesn't come up in most (any?) netlists, but Verilog has the concept of primitives, both builtin (XOR, AND, etc), and user generated.

Since primitives are created using solely a truth table, they can be instantiated without giving them a name:

some_module inst1 (.in(0), .out(test), ...);
and (a, b, q);

The Intel simulation libraries use these concepts throughout, and thus are not currently parsible. Again, not sure if this applies, since these files are full simulation-ready implementations, not barebones netlists.

@jacobdbrown4 jacobdbrown4 added this to To Do Sometime in Fall 2023 Release Apr 5, 2023
@jacobdbrown4
Copy link
Collaborator

Our goal has been to parse structural Verilog netlists, so we have never needed support for this. We may look at adding support for this sometime though.

@jacobdbrown4
Copy link
Collaborator

If I understand correctly, the desired functionality is not having to give instances a name. Is that it? @agg23

@jacobdbrown4 jacobdbrown4 moved this from For a Later Release to In Progress in Fall 2023 Release Oct 6, 2023
@agg23
Copy link
Contributor Author

agg23 commented Oct 11, 2023

Sorry, somehow I wasn't notified for this mention. The desired functionality is to properly parse the Intel simulation libraries, which includes the use of the primitive directive:

primitive and (input a, input b, output out);
    ...
endprimitive

Since these represent primitives, they are allowed to be instantiated without a name, as there's no point in having and_wire1_wire2 repeated across many different instantiations. SpyDrNet should be able to parse those primitives without throwing an error.

@jacobdbrown4
Copy link
Collaborator

@agg23 This looks like something we could support. If the Verilog parser sees that the cell type is a primitive, it will not look for a name. What primitives should be supported? Can you provide a list of their names and ports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants