From ad877048096a00d5c7eb191f1149fde11428e930 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 10 Jul 2016 20:00:39 +0100 Subject: [PATCH] Partial fix for br1006 - allow part selects in path declarations. This just enables the compiler to parse path declarations that contain part selects. As for bit selects, the part select is discarded, and if elaboration of specify blocks is enabled, the path declaration will be applied to the entire vector. If elaboration is enabled, a warning message will now be output when a bit or part select is discarded. --- parse.y | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index b7a523963..f4298e9f4 100644 --- a/parse.y +++ b/parse.y @@ -5847,7 +5847,23 @@ specify_path_identifiers delete[]$1; } | IDENTIFIER '[' expr_primary ']' - { list*tmp = new list; + { if (gn_specify_blocks_flag) { + yywarn(@4, "Bit selects are not currently supported " + "in path declarations. The declaration " + "will be applied to the whole vector."); + } + list*tmp = new list; + tmp->push_back(lex_strings.make($1)); + $$ = tmp; + delete[]$1; + } + | IDENTIFIER '[' expr_primary polarity_operator expr_primary ']' + { if (gn_specify_blocks_flag) { + yywarn(@4, "Part selects are not currently supported " + "in path declarations. The declaration " + "will be applied to the whole vector."); + } + list*tmp = new list; tmp->push_back(lex_strings.make($1)); $$ = tmp; delete[]$1; @@ -5859,7 +5875,23 @@ specify_path_identifiers delete[]$3; } | specify_path_identifiers ',' IDENTIFIER '[' expr_primary ']' - { list*tmp = $1; + { if (gn_specify_blocks_flag) { + yywarn(@4, "Bit selects are not currently supported " + "in path declarations. The declaration " + "will be applied to the whole vector."); + } + list*tmp = $1; + tmp->push_back(lex_strings.make($3)); + $$ = tmp; + delete[]$3; + } + | specify_path_identifiers ',' IDENTIFIER '[' expr_primary polarity_operator expr_primary ']' + { if (gn_specify_blocks_flag) { + yywarn(@4, "Part selects are not currently supported " + "in path declarations. The declaration " + "will be applied to the whole vector."); + } + list*tmp = $1; tmp->push_back(lex_strings.make($3)); $$ = tmp; delete[]$3;