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

Assert `AST_INTERNAL::current_scope.count(wiretype_node->str)' failed in /home/alain/RapidSilicon/systemverilog-plugin/frontends/systemverilog/uhdm_ast.cc:466. #1963

Closed
alain-rs opened this issue Sep 13, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@alain-rs
Copy link

There seems to be a problem in setting up the current_scope, the top level typespec are not part of the scope when processing the module M port declaration.

setup_current_scope(shared.top_nodes, pair.second);

typedef struct packed {
  logic [7:0] prd_1;
  logic [3:0] prd_2;
  logic [7:0] prd_3;
  logic [7:0] prd_4;
} prd_in_t;

module M(input prd_in_t     prd_i);  //  << Problem is here
endmodule

module top();
  prd_in_t    in_prd;  //  << No problem here

  assign in_prd = '{prd_1: 8'b0,  prd_2: 4'b1,  prd_3: 8'b0,  prd_4: 8'b0};    //  << No problem here

M m  (.prd_i ( in_prd  ));

endmodule
@alaindargelas
Copy link
Collaborator

@kamilrakoczy @tgorochowik this is a problem showing in quite a few designs.

@alaindargelas alaindargelas added the bug Something isn't working label Sep 15, 2023
@kbieganski kbieganski self-assigned this Sep 26, 2023
@kbieganski
Copy link
Collaborator

@alaindargelas This seems to be working for me now, can you confirm?

@alaindargelas
Copy link
Collaborator

@kbieganski this error is gone in the original testcase.
A new error is showing up:
ERROR: Assert `wire_node->attributes.count(ID::wiretype)' failed in /home/alain/RapidSilicon/Raptor_Tools/parser_plugins/synlig_plugin/frontends/systemverilog/uhdm_ast.cc:482

I'll need to extract a small example.
Closing this case.

@alaindargelas
Copy link
Collaborator

This attached testcase has the same assert as the original case.

kmac.tar.gz

ERROR: Assert `AST_INTERNAL::current_scope.count(wiretype_node->str)' failed in /home/alain/synlig/frontends/systemverilog/uhdm_ast.cc:466

@alaindargelas
Copy link
Collaborator

@kbieganski are your still investigating this one?

@kbieganski kbieganski removed their assignment Oct 5, 2023
@kbieganski
Copy link
Collaborator

Not right now. We're focusing on general stability and usability at this time.

@alaindargelas
Copy link
Collaborator

Multiplied define package (test.sv redefined the incomplete package kmac_pkg), Surelog needs a better filter to parse -y files.

@alaindargelas
Copy link
Collaborator

@alaindargelas
Copy link
Collaborator

Fixed by chipsalliance/Surelog#3903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants