Skip to content

Fix type equality and inequality parsing#125

Open
yousifBilal wants to merge 2 commits into
dalance:masterfrom
yousifBilal:type-equality
Open

Fix type equality and inequality parsing#125
yousifBilal wants to merge 2 commits into
dalance:masterfrom
yousifBilal:type-equality

Conversation

@yousifBilal
Copy link
Copy Markdown

The parser fails to parse a valid case presented in the 2017 standard in 6.23.

I took this test case from sv-tests:

module top #( parameter type T = type(logic[11:0]) )
   ();
   initial begin
      case (type(T))
        type(logic[11:0]) : ;
        default           : $stop;
      endcase
      if (type(T) == type(logic[12:0])) $stop;
      if (type(T) != type(logic[11:0])) $stop;
      if (type(T) === type(logic[12:0])) $stop;
      if (type(T) !== type(logic[11:0])) $stop;
      $finish;
   end
endmodule

This merge provides a fix for case statements equality / inequality checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant