-
Notifications
You must be signed in to change notification settings - Fork 985
Add state_dependent_path_declaration so that ifnone
can be parsed
#5121
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
Open
FlinkbaumFAU
wants to merge
1
commit into
YosysHQ:main
Choose a base branch
from
FlinkbaumFAU:parse_specify
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+51
−8
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,7 +401,7 @@ static const AstNode *addAsgnBinopStmt(dict<IdString, AstNode*> *attr, AstNode * | |
%token TOK_INPUT TOK_OUTPUT TOK_INOUT TOK_WIRE TOK_WAND TOK_WOR TOK_REG TOK_LOGIC | ||
%token TOK_INTEGER TOK_SIGNED TOK_ASSIGN TOK_ALWAYS TOK_INITIAL | ||
%token TOK_ALWAYS_FF TOK_ALWAYS_COMB TOK_ALWAYS_LATCH | ||
%token TOK_BEGIN TOK_END TOK_IF TOK_ELSE TOK_FOR TOK_WHILE TOK_REPEAT | ||
%token TOK_BEGIN TOK_END TOK_IF TOK_ELSE TOK_IFNONE TOK_FOR TOK_WHILE TOK_REPEAT | ||
%token TOK_DPI_FUNCTION TOK_POSEDGE TOK_NEGEDGE TOK_OR TOK_AUTOMATIC | ||
%token TOK_CASE TOK_CASEX TOK_CASEZ TOK_ENDCASE TOK_DEFAULT | ||
%token TOK_FUNCTION TOK_ENDFUNCTION TOK_TASK TOK_ENDTASK TOK_SPECIFY | ||
|
@@ -1541,18 +1541,60 @@ list_of_specparam_assignments: | |
specparam_assignment: | ||
ignspec_id '=' ignspec_expr ; | ||
|
||
ignspec_opt_cond: | ||
TOK_IF '(' ignspec_expr ')' | %empty; | ||
|
||
path_declaration : | ||
simple_path_declaration ';' | ||
// | edge_sensitive_path_declaration | ||
// | state_dependent_path_declaration | ||
| state_dependent_path_declaration ';' | ||
; | ||
|
||
simple_path_declaration : | ||
ignspec_opt_cond parallel_path_description '=' path_delay_value | | ||
ignspec_opt_cond full_path_description '=' path_delay_value | ||
parallel_path_description '=' path_delay_value | | ||
full_path_description '=' path_delay_value | ||
; | ||
|
||
state_dependent_path_declaration: | ||
TOK_IF '(' module_path_expression ')' simple_path_declaration | ||
// | TOK_IF '(' module_path_expression ')' edge_sensitive_path_declaration | ||
| TOK_IFNONE simple_path_declaration | ||
; | ||
|
||
module_path_expression: | ||
module_path_primary | ||
// Flatten out unary_operator to avoid shift/reduce conflict | ||
| '!' attr module_path_primary { delete $2; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the existing code, these need to be |
||
| '~' attr module_path_primary { delete $2; } | ||
| '&' attr module_path_primary { delete $2; } | ||
| OP_NAND attr module_path_primary { delete $2; } | ||
| '|' attr module_path_primary { delete $2; } | ||
| OP_NOR attr module_path_primary { delete $2; } | ||
| '^' attr module_path_primary { delete $2; } | ||
| OP_XNOR attr module_path_primary { delete $2; } | ||
// Flatten out binary_operator to avoid shift/reduce conflict | ||
| module_path_expression OP_EQ attr module_path_expression { delete $3; } | ||
| module_path_expression OP_NE attr module_path_expression { delete $3; } | ||
| module_path_expression OP_LAND attr module_path_expression { delete $3; } | ||
| module_path_expression OP_LOR attr module_path_expression { delete $3; } | ||
| module_path_expression '&' attr module_path_expression { delete $3; } | ||
| module_path_expression '|' attr module_path_expression { delete $3; } | ||
| module_path_expression '^' attr module_path_expression { delete $3; } | ||
| module_path_expression OP_XNOR attr module_path_expression { delete $3; } | ||
// | module_path_conditional_expression | ||
; | ||
|
||
module_path_primary: | ||
number | ||
| TOK_ID { delete $1; } | ||
// Deviate from specification: Normally string would not be allowed, however they are necessary for the ecp5 tests | ||
| TOK_STRING { delete $1; } | ||
// | module_path_concatenation | ||
// | module_path_multiple_concatenation | ||
// | function_subroutine_call | ||
// | '(' module_path_minmax_expression ')' | ||
; | ||
|
||
number: | ||
integral_number { delete $1; } | ||
| TOK_REALVAL { delete $1; } | ||
; | ||
|
||
path_delay_value : | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://www.gnu.org/software/bison/manual/html_node/Diagnostics.html:
I don't think this should be included.