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.
(cherry picked from commit ad87704809)
This commit is contained in:
parent
a5f6329500
commit
face462cc2
36
parse.y
36
parse.y
|
|
@ -5833,7 +5833,23 @@ specify_path_identifiers
|
|||
delete[]$1;
|
||||
}
|
||||
| IDENTIFIER '[' expr_primary ']'
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ 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<perm_string>*tmp = new list<perm_string>;
|
||||
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<perm_string>*tmp = new list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
|
|
@ -5845,7 +5861,23 @@ specify_path_identifiers
|
|||
delete[]$3;
|
||||
}
|
||||
| specify_path_identifiers ',' IDENTIFIER '[' expr_primary ']'
|
||||
{ list<perm_string>*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<perm_string>*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<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
|
|||
Loading…
Reference in New Issue