mirror of
https://github.com/verilator/verilator.git
synced 2025-01-23 23:04:14 +00:00
Support --bbox-unsup parsing of forward defed class calls
This commit is contained in:
parent
f083805ab5
commit
893dee3434
@ -3348,6 +3348,9 @@ taskRef<nodep>: // IEEE: part of tf_call
|
|||||||
| id '(' list_of_argumentsE ')' { $$ = new AstTaskRef($<fl>1,*$1,$3); }
|
| id '(' list_of_argumentsE ')' { $$ = new AstTaskRef($<fl>1,*$1,$3); }
|
||||||
| package_scopeIdFollows id '(' list_of_argumentsE ')'
|
| package_scopeIdFollows id '(' list_of_argumentsE ')'
|
||||||
{ $$ = AstDot::newIfPkg($<fl>2, $1, new AstTaskRef($<fl>2,*$2,$4)); }
|
{ $$ = AstDot::newIfPkg($<fl>2, $1, new AstTaskRef($<fl>2,*$2,$4)); }
|
||||||
|
| class_scopeIdFollows id '(' list_of_argumentsE ')'
|
||||||
|
{ $$ = new AstTaskRef($<fl>2, *$2, $4);
|
||||||
|
BBUNSUP($<fl>2, "Unsupported: Class-scoped tasks"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
funcRef<nodep>: // IEEE: part of tf_call
|
funcRef<nodep>: // IEEE: part of tf_call
|
||||||
@ -3363,6 +3366,9 @@ funcRef<nodep>: // IEEE: part of tf_call
|
|||||||
id '(' list_of_argumentsE ')' { $$ = new AstFuncRef($<fl>1, *$1, $3); }
|
id '(' list_of_argumentsE ')' { $$ = new AstFuncRef($<fl>1, *$1, $3); }
|
||||||
| package_scopeIdFollows id '(' list_of_argumentsE ')'
|
| package_scopeIdFollows id '(' list_of_argumentsE ')'
|
||||||
{ $$ = AstDot::newIfPkg($<fl>2, $1, new AstFuncRef($<fl>2,*$2,$4)); }
|
{ $$ = AstDot::newIfPkg($<fl>2, $1, new AstFuncRef($<fl>2,*$2,$4)); }
|
||||||
|
| class_scopeIdFollows id '(' list_of_argumentsE ')'
|
||||||
|
{ $$ = new AstFuncRef($<fl>2, *$2, $4);
|
||||||
|
BBUNSUP($<fl>2, "Unsupported: Class-scoped functions"); }
|
||||||
//UNSUP list_of_argumentE should be pev_list_of_argumentE
|
//UNSUP list_of_argumentE should be pev_list_of_argumentE
|
||||||
//UNSUP: idDotted is really just id to allow dotted method calls
|
//UNSUP: idDotted is really just id to allow dotted method calls
|
||||||
;
|
;
|
||||||
@ -4170,7 +4176,7 @@ exprScope<nodep>: // scope and variable for use to inside an expression
|
|||||||
| yD_ROOT { $$ = new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "$root"); }
|
| yD_ROOT { $$ = new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "$root"); }
|
||||||
| idArrayed { $$ = $1; }
|
| idArrayed { $$ = $1; }
|
||||||
| package_scopeIdFollows idArrayed { $$ = AstDot::newIfPkg($2->fileline(), $1, $2); }
|
| package_scopeIdFollows idArrayed { $$ = AstDot::newIfPkg($2->fileline(), $1, $2); }
|
||||||
| class_scopeIdFollows idArrayed { $$ = $2; BBUNSUP($<fl>1, "Unsupported: scoped class reference"); }
|
| class_scopeIdFollows idArrayed { $$ = $2; BBUNSUP($<fl>2, "Unsupported: scoped class reference"); }
|
||||||
| ~l~expr '.' idArrayed { $$ = new AstDot($<fl>2, false, $1, $3); }
|
| ~l~expr '.' idArrayed { $$ = new AstDot($<fl>2, false, $1, $3); }
|
||||||
// // expr below must be a "yTHIS"
|
// // expr below must be a "yTHIS"
|
||||||
| ~l~expr '.' ySUPER { $$ = $1; BBUNSUP($3, "Unsupported: super"); }
|
| ~l~expr '.' ySUPER { $$ = $1; BBUNSUP($3, "Unsupported: super"); }
|
||||||
|
@ -4,7 +4,4 @@
|
|||||||
%Error: t/t_class2.v:35:16: Unsupported: scoped class reference
|
%Error: t/t_class2.v:35:16: Unsupported: scoped class reference
|
||||||
35 | if (Cls::ENUM_VAL != 22) $stop;
|
35 | if (Cls::ENUM_VAL != 22) $stop;
|
||||||
| ^~~~~~~~
|
| ^~~~~~~~
|
||||||
%Error: t/t_class2.v:34:11: Unsupported: scoped class reference
|
|
||||||
34 | if (Pkg::ENUMP_VAL != 33) $stop;
|
|
||||||
| ^~~
|
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
@ -25,4 +25,25 @@
|
|||||||
%Error: t/t_class_unsup_bad.v:32:1: Unsupported: virtual classes
|
%Error: t/t_class_unsup_bad.v:32:1: Unsupported: virtual classes
|
||||||
32 | virtual class VC;
|
32 | virtual class VC;
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:42:4: Unsupported: virtual class member qualifier
|
||||||
|
42 | virtual function uvm_root get_root();
|
||||||
|
| ^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:43:15: Unsupported: Hierarchical class references
|
||||||
|
43 | uvm_root::m_forward_task_call();
|
||||||
|
| ^~
|
||||||
|
%Error: t/t_class_unsup_bad.v:43:17: Unsupported: scoped class reference
|
||||||
|
43 | uvm_root::m_forward_task_call();
|
||||||
|
| ^~~~~~~~~~~~~~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:43:17: Unsupported: Class-scoped tasks
|
||||||
|
43 | uvm_root::m_forward_task_call();
|
||||||
|
| ^~~~~~~~~~~~~~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:44:22: Unsupported: Hierarchical class references
|
||||||
|
44 | return uvm_root::m_uvm_get_root();
|
||||||
|
| ^~
|
||||||
|
%Error: t/t_class_unsup_bad.v:44:24: Unsupported: scoped class reference
|
||||||
|
44 | return uvm_root::m_uvm_get_root();
|
||||||
|
| ^~~~~~~~~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:44:24: Unsupported: Class-scoped functions
|
||||||
|
44 | return uvm_root::m_uvm_get_root();
|
||||||
|
| ^~~~~~~~~~~~~~
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
@ -34,3 +34,13 @@ endclass
|
|||||||
|
|
||||||
module t (/*AUTOARG*/);
|
module t (/*AUTOARG*/);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
typedef class uvm_root;
|
||||||
|
typedef class uvm_coreservice_t;
|
||||||
|
|
||||||
|
class uvm_default_coreservice_t extends uvm_coreservice_t;
|
||||||
|
virtual function uvm_root get_root();
|
||||||
|
uvm_root::m_forward_task_call();
|
||||||
|
return uvm_root::m_uvm_get_root();
|
||||||
|
endfunction
|
||||||
|
endclass
|
||||||
|
Loading…
Reference in New Issue
Block a user