Parse covergroup, still unsupported.

This commit is contained in:
Wilson Snyder 2023-03-12 14:11:11 -04:00
parent ba953bfa94
commit 39a5bce8a6
5 changed files with 831 additions and 245 deletions

View File

@ -498,8 +498,8 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
"assume" { FL; return yASSUME; } "assume" { FL; return yASSUME; }
"before" { FL; return yBEFORE; } "before" { FL; return yBEFORE; }
"bind" { FL; return yBIND; } "bind" { FL; return yBIND; }
"bins" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "bins" { FL; return yBINS; }
"binsof" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "binsof" { FL; return yBINSOF; }
"bit" { FL; return yBIT; } "bit" { FL; return yBIT; }
"break" { FL; return yBREAK; } "break" { FL; return yBREAK; }
"byte" { FL; return yBYTE; } "byte" { FL; return yBYTE; }
@ -511,14 +511,14 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
"context" { FL; return yCONTEXT; } "context" { FL; return yCONTEXT; }
"continue" { FL; return yCONTINUE; } "continue" { FL; return yCONTINUE; }
"cover" { FL; return yCOVER; } "cover" { FL; return yCOVER; }
"covergroup" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "covergroup" { FL; return yCOVERGROUP; }
"coverpoint" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "coverpoint" { FL; return yCOVERPOINT; }
"cross" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "cross" { FL; return yCROSS; }
"dist" { FL; return yDIST; } "dist" { FL; return yDIST; }
"do" { FL; return yDO; } "do" { FL; return yDO; }
"endclass" { FL; return yENDCLASS; } "endclass" { FL; return yENDCLASS; }
"endclocking" { FL; return yENDCLOCKING; } "endclocking" { FL; return yENDCLOCKING; }
"endgroup" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "endgroup" { FL; return yENDGROUP; }
"endinterface" { FL; return yENDINTERFACE; } "endinterface" { FL; return yENDINTERFACE; }
"endpackage" { FL; return yENDPACKAGE; } "endpackage" { FL; return yENDPACKAGE; }
"endprogram" { FL; return yENDPROGRAM; } "endprogram" { FL; return yENDPROGRAM; }
@ -533,8 +533,8 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
"first_match" { FL; return yFIRST_MATCH; } "first_match" { FL; return yFIRST_MATCH; }
"forkjoin" { FL; return yFORKJOIN; } "forkjoin" { FL; return yFORKJOIN; }
"iff" { FL; return yIFF; } "iff" { FL; return yIFF; }
"ignore_bins" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "ignore_bins" { FL; return yIGNORE_BINS; }
"illegal_bins" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "illegal_bins" { FL; return yILLEGAL_BINS; }
"import" { FL; return yIMPORT; } "import" { FL; return yIMPORT; }
"inside" { FL; return yINSIDE; } "inside" { FL; return yINSIDE; }
"int" { FL; return yINT; } "int" { FL; return yINT; }
@ -585,7 +585,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
"virtual" { FL; return yVIRTUAL__LEX; } "virtual" { FL; return yVIRTUAL__LEX; }
"void" { FL; return yVOID; } "void" { FL; return yVOID; }
"wait_order" { FL; return yWAIT_ORDER; } "wait_order" { FL; return yWAIT_ORDER; }
"wildcard" { ERROR_RSVD_WORD("SystemVerilog 2005"); } "wildcard" { FL; return yWILDCARD; }
"with" { FL; return yWITH__LEX; } "with" { FL; return yWITH__LEX; }
"within" { FL; return yWITHIN; } "within" { FL; return yWITHIN; }
} }

View File

@ -550,8 +550,8 @@ BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
%token<fl> yBEFORE "before" %token<fl> yBEFORE "before"
%token<fl> yBEGIN "begin" %token<fl> yBEGIN "begin"
%token<fl> yBIND "bind" %token<fl> yBIND "bind"
//UNSUP %token<fl> yBINS "bins" %token<fl> yBINS "bins"
//UNSUP %token<fl> yBINSOF "binsof" %token<fl> yBINSOF "binsof"
%token<fl> yBIT "bit" %token<fl> yBIT "bit"
%token<fl> yBREAK "break" %token<fl> yBREAK "break"
%token<fl> yBUF "buf" %token<fl> yBUF "buf"
@ -573,9 +573,9 @@ BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
%token<fl> yCONTEXT "context" %token<fl> yCONTEXT "context"
%token<fl> yCONTINUE "continue" %token<fl> yCONTINUE "continue"
%token<fl> yCOVER "cover" %token<fl> yCOVER "cover"
//UNSUP %token<fl> yCOVERGROUP "covergroup" %token<fl> yCOVERGROUP "covergroup"
//UNSUP %token<fl> yCOVERPOINT "coverpoint" %token<fl> yCOVERPOINT "coverpoint"
//UNSUP %token<fl> yCROSS "cross" %token<fl> yCROSS "cross"
%token<fl> yDEASSIGN "deassign" %token<fl> yDEASSIGN "deassign"
%token<fl> yDEFAULT "default" %token<fl> yDEFAULT "default"
%token<fl> yDEFPARAM "defparam" %token<fl> yDEFPARAM "defparam"
@ -591,7 +591,7 @@ BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
%token<fl> yENDCLOCKING "endclocking" %token<fl> yENDCLOCKING "endclocking"
%token<fl> yENDFUNCTION "endfunction" %token<fl> yENDFUNCTION "endfunction"
%token<fl> yENDGENERATE "endgenerate" %token<fl> yENDGENERATE "endgenerate"
//UNSUP %token<fl> yENDGROUP "endgroup" %token<fl> yENDGROUP "endgroup"
%token<fl> yENDINTERFACE "endinterface" %token<fl> yENDINTERFACE "endinterface"
%token<fl> yENDMODULE "endmodule" %token<fl> yENDMODULE "endmodule"
%token<fl> yENDPACKAGE "endpackage" %token<fl> yENDPACKAGE "endpackage"
@ -627,8 +627,8 @@ BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
%token<fl> yHIGHZ1 "highz1" %token<fl> yHIGHZ1 "highz1"
%token<fl> yIF "if" %token<fl> yIF "if"
%token<fl> yIFF "iff" %token<fl> yIFF "iff"
//UNSUP %token<fl> yIGNORE_BINS "ignore_bins" %token<fl> yIGNORE_BINS "ignore_bins"
//UNSUP %token<fl> yILLEGAL_BINS "illegal_bins" %token<fl> yILLEGAL_BINS "illegal_bins"
%token<fl> yIMPLEMENTS "implements" %token<fl> yIMPLEMENTS "implements"
%token<fl> yIMPLIES "implies" %token<fl> yIMPLIES "implies"
%token<fl> yIMPORT "import" %token<fl> yIMPORT "import"
@ -775,7 +775,7 @@ BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
%token<fl> yWEAK0 "weak0" %token<fl> yWEAK0 "weak0"
%token<fl> yWEAK1 "weak1" %token<fl> yWEAK1 "weak1"
%token<fl> yWHILE "while" %token<fl> yWHILE "while"
//UNSUP %token<fl> yWILDCARD "wildcard" %token<fl> yWILDCARD "wildcard"
%token<fl> yWIRE "wire" %token<fl> yWIRE "wire"
%token<fl> yWITHIN "within" %token<fl> yWITHIN "within"
%token<fl> yWITH__BRA "with-then-[" %token<fl> yWITH__BRA "with-then-["
@ -1261,7 +1261,7 @@ package_or_generate_item_declaration<nodep>: // ==IEEE: package_or_generate_i
// // class_constructor_declaration is part of function_declaration // // class_constructor_declaration is part of function_declaration
// // local_parameter_declaration under parameter_declaration // // local_parameter_declaration under parameter_declaration
| parameter_declaration ';' { $$ = $1; } | parameter_declaration ';' { $$ = $1; }
//UNSUP covergroup_declaration { $$ = $1; } | covergroup_declaration { $$ = $1; }
| assertion_item_declaration { $$ = $1; } | assertion_item_declaration { $$ = $1; }
| ';' { $$ = nullptr; } | ';' { $$ = nullptr; }
; ;
@ -1417,18 +1417,18 @@ parameter_port_listE<nodep>: // IEEE: parameter_port_list + empty == paramete
paramPortDeclOrArgList<nodep>: // IEEE: list_of_param_assignments + { parameter_port_declaration } paramPortDeclOrArgList<nodep>: // IEEE: list_of_param_assignments + { parameter_port_declaration }
paramPortDeclOrArg { $$ = $1; } paramPortDeclOrArg { $$ = $1; }
| paramPortDeclOrArgList ',' paramPortDeclOrArg { $$ = $1->addNext($3); } | paramPortDeclOrArgList ',' paramPortDeclOrArg { $$ = $1->addNext($3); }
| paramPortDeclOrArgList sigAttrScope {$$ = $1;} | paramPortDeclOrArgList sigAttrScope { $$ = $1; }
; ;
paramPortDeclOrArg<nodep>: // IEEE: param_assignment + parameter_port_declaration paramPortDeclOrArg<nodep>: // IEEE: param_assignment + parameter_port_declaration
// // We combine the two as we can't tell which follows a comma // // We combine the two as we can't tell which follows a comma
paramPortDeclOrArgSub {$$ = $1;} paramPortDeclOrArgSub { $$ = $1; }
| vlTag { $$ = nullptr; } | vlTag { $$ = nullptr; }
; ;
paramPortDeclOrArgSub<nodep>: paramPortDeclOrArgSub<nodep>:
parameter_port_declarationFrontE param_assignment { $$ = $2; } parameter_port_declarationFrontE param_assignment { $$ = $2; }
| parameter_port_declarationTypeFrontE type_assignment { $$ = $2; } | parameter_port_declarationTypeFrontE type_assignment { $$ = $2; }
| sigAttrScope paramPortDeclOrArgSub {$$ = $2; } | sigAttrScope paramPortDeclOrArgSub { $$ = $2; }
; ;
portsStarE<nodep>: // IEEE: .* + list_of_ports + list_of_port_declarations + empty portsStarE<nodep>: // IEEE: .* + list_of_ports + list_of_port_declarations + empty
@ -1683,7 +1683,7 @@ anonymous_program_item<nodep>: // ==IEEE: anonymous_program_item
task_declaration { $$ = $1; } task_declaration { $$ = $1; }
| function_declaration { $$ = $1; } | function_declaration { $$ = $1; }
| class_declaration { $$ = $1; } | class_declaration { $$ = $1; }
//UNSUP covergroup_declaration { $$ = $1; } | covergroup_declaration { $$ = $1; }
// // class_constructor_declaration is part of function_declaration // // class_constructor_declaration is part of function_declaration
| ';' { $$ = nullptr; } | ';' { $$ = nullptr; }
; ;
@ -3629,21 +3629,6 @@ statementVerilatorPragmas<nodep>:
{ $$ = new AstPragma{$1, VPragmaType::COVERAGE_BLOCK_OFF}; } { $$ = new AstPragma{$1, VPragmaType::COVERAGE_BLOCK_OFF}; }
; ;
//UNSUPoperator_assignment<nodep>: // IEEE: operator_assignment
//UNSUP ~f~exprLvalue '=' delay_or_event_controlE expr { }
//UNSUP | ~f~exprLvalue yP_PLUSEQ expr { }
//UNSUP | ~f~exprLvalue yP_MINUSEQ expr { }
//UNSUP | ~f~exprLvalue yP_TIMESEQ expr { }
//UNSUP | ~f~exprLvalue yP_DIVEQ expr { }
//UNSUP | ~f~exprLvalue yP_MODEQ expr { }
//UNSUP | ~f~exprLvalue yP_ANDEQ expr { }
//UNSUP | ~f~exprLvalue yP_OREQ expr { }
//UNSUP | ~f~exprLvalue yP_XOREQ expr { }
//UNSUP | ~f~exprLvalue yP_SLEFTEQ expr { }
//UNSUP | ~f~exprLvalue yP_SRIGHTEQ expr { }
//UNSUP | ~f~exprLvalue yP_SSRIGHTEQ expr { }
//UNSUP ;
foperator_assignment<nodep>: // IEEE: operator_assignment (for first part of expression) foperator_assignment<nodep>: // IEEE: operator_assignment (for first part of expression)
fexprLvalue '=' delay_or_event_controlE expr { $$ = new AstAssign{$2, $1, $4, $3}; } fexprLvalue '=' delay_or_event_controlE expr { $$ = new AstAssign{$2, $1, $4, $3}; }
// //
@ -3797,10 +3782,11 @@ value_range<nodeExprp>: // ==IEEE: value_range
| '[' expr ':' expr ']' { $$ = new AstInsideRange{$1, $2, $4}; } | '[' expr ':' expr ']' { $$ = new AstInsideRange{$1, $2, $4}; }
; ;
//UNSUPcovergroup_value_range<nodeExprp>: // ==IEEE-2012: covergroup_value_range covergroup_value_range<nodeExprp>: // ==IEEE-2012: covergroup_value_range
//UNSUP cgexpr { $$ = $1; } cgexpr { $$ = $1; }
//UNSUP | '[' cgexpr ':' cgexpr ']' { } | '[' cgexpr ':' cgexpr ']'
//UNSUP ; { $$ = nullptr; BBUNSUP($1, "Unsupported: covergroup value range"); }
;
caseCondList<nodeExprp>: // IEEE: part of case_item caseCondList<nodeExprp>: // IEEE: part of case_item
exprTypeCompare { $$ = $1; } exprTypeCompare { $$ = $1; }
@ -6225,239 +6211,281 @@ boolean_abbrev<nodeExprp>: // ==IEEE: boolean_abbrev
//************************************************ //************************************************
// Covergroup // Covergroup
//UNSUPcovergroup_declaration<nodep>: // ==IEEE: covergroup_declaration covergroup_declaration<nodep>: // ==IEEE: covergroup_declaration
//UNSUP covergroup_declarationFront coverage_eventE ';' coverage_spec_or_optionListE covergroup_declarationFront coverage_eventE ';'
//UNSUP yENDGROUP endLabelE /*cont*/ coverage_spec_or_optionListE
//UNSUP { PARSEP->endgroupCb($<fl>5, $5); /*cont*/ yENDGROUP endLabelE
//UNSUP SYMP->popScope($$); } { $$ = $1;
//UNSUP | covergroup_declarationFront '(' tf_port_listE ')' coverage_eventE ';' coverage_spec_or_optionListE SYMP->popScope($$);
//UNSUP yENDGROUP endLabelE GRAMMARP->endLabel($<fl>6, $1, $6); }
//UNSUP { PARSEP->endgroupCb($<fl>8, $8); | covergroup_declarationFront '(' tf_port_listE ')'
//UNSUP SYMP->popScope($$); } /*cont*/ coverage_eventE ';' coverage_spec_or_optionListE
//UNSUP ; /*cont*/ yENDGROUP endLabelE
{ $$ = $1;
SYMP->popScope($$);
GRAMMARP->endLabel($<fl>9, $1, $9); }
;
//UNSUPcovergroup_declarationFront: // IEEE: part of covergroup_declaration covergroup_declarationFront<classp>: // IEEE: part of covergroup_declaration
//UNSUP yCOVERGROUP idAny yCOVERGROUP idAny
//UNSUP { SYMP->pushNew($$); { $$ = new AstClass{$<fl>2, *$2};
//UNSUP PARSEP->covergroupCb($<fl>1, $1, $2); } BBUNSUP($<fl>1, "Unsupported: covergroup");
//UNSUP ; SYMP->pushNew($<classp>$);
v3Global.setHasClasses(); }
;
//UNSUPcgexpr<nodeExprp>: // IEEE-2012: covergroup_expression, before that just expression cgexpr<nodeExprp>: // IEEE-2012: covergroup_expression, before that just expression
//UNSUP expr { $$ = $1; } expr { $$ = $1; }
//UNSUP ; ;
//UNSUPcoverage_spec_or_optionListE<nodep>: // IEEE: [{coverage_spec_or_option}] coverage_spec_or_optionListE<nodep>: // IEEE: [{coverage_spec_or_option}]
//UNSUP /* empty */ { $$ = nullptr; } /* empty */ { $$ = nullptr; }
//UNSUP | coverage_spec_or_optionList { $$ = $1; } | coverage_spec_or_optionList { $$ = $1; }
//UNSUP ; ;
//UNSUPcoverage_spec_or_optionList<nodep>: // IEEE: {coverage_spec_or_option} coverage_spec_or_optionList<nodep>: // IEEE: {coverage_spec_or_option}
//UNSUP coverage_spec_or_option { $$ = $1; } coverage_spec_or_option { $$ = $1; }
//UNSUP | coverage_spec_or_optionList coverage_spec_or_option { $$ = addNextNull($1, $2); } | coverage_spec_or_optionList coverage_spec_or_option { $$ = addNextNull($1, $2); }
//UNSUP ; ;
//UNSUPcoverage_spec_or_option<nodep>: // ==IEEE: coverage_spec_or_option coverage_spec_or_option<nodep>: // ==IEEE: coverage_spec_or_option
//UNSUP // // IEEE: coverage_spec // // IEEE: coverage_spec
//UNSUP cover_point { $$ = $1; } cover_point { $$ = $1; }
//UNSUP | cover_cross { $$ = $1; } | cover_cross { $$ = $1; }
//UNSUP | coverage_option ';' { $$ = $1; } | coverage_option ';' { $$ = $1; }
//UNSUP | error { $$ = nullptr; } | error { $$ = nullptr; }
//UNSUP ; ;
//UNSUPcoverage_option: // ==IEEE: coverage_option coverage_option<nodep>: // ==IEEE: coverage_option
//UNSUP // // option/type_option aren't really keywords // // option/type_option aren't really keywords
//UNSUP id/*yOPTION | yTYPE_OPTION*/ '.' idAny/*member_identifier*/ '=' expr { } id/*yOPTION | yTYPE_OPTION*/ '.' idAny/*member_identifier*/ '=' expr
//UNSUP ; { // TODO: check that 'id' is 'option' or 'type_option'
$$ = nullptr; BBUNSUP($<fl>1, "Unsupported: coverage option"); }
;
//UNSUPcover_point: // ==IEEE: cover_point cover_point<nodep>: // ==IEEE: cover_point
//UNSUP /**/ yCOVERPOINT expr iffE bins_or_empty { } // // [ [ data_type_or_implicit ] cover_point_identifier ':' ] yCOVERPOINT
//UNSUP // // IEEE-2012: class_scope before an ID yCOVERPOINT expr iffE bins_or_empty
//UNSUP | /**/ /**/ /**/ id ':' yCOVERPOINT expr iffE bins_or_empty { } { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: cover point"); }
//UNSUP | class_scope_id ':' yCOVERPOINT expr iffE bins_or_empty { } // // IEEE-2012: class_scope before an ID
//UNSUP | class_scope_id id data_type id ':' yCOVERPOINT expr iffE bins_or_empty { } | id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
//UNSUP | class_scope_id id /**/ id ':' yCOVERPOINT expr iffE bins_or_empty { } { $$ = nullptr; BBUNSUP($<fl>3, "Unsupported: cover point"); }
//UNSUP | /**/ id /**/ id ':' yCOVERPOINT expr iffE bins_or_empty { } // // data_type_or_implicit expansion
//UNSUP // // IEEE-2012: | data_type id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
//UNSUP | bins_or_empty { $$ = $1; } { $$ = nullptr; BBUNSUP($<fl>4, "Unsupported: cover point"); }
//UNSUP; | yVAR data_type id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
{ $$ = nullptr; BBUNSUP($<fl>5, "Unsupported: cover point"); }
| yVAR implicit_typeE id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
{ $$ = nullptr; BBUNSUP($<fl>5, "Unsupported: cover point"); }
| signingE rangeList id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
{ $$ = nullptr; BBUNSUP($<fl>5, "Unsupported: cover point"); }
| signing id/*cover_point_id*/ ':' yCOVERPOINT expr iffE bins_or_empty
{ $$ = nullptr; BBUNSUP($<fl>4, "Unsupported: cover point"); }
// // IEEE-2012:
| bins_or_empty { $$ = $1; }
;
//UNSUPiffE<nodep>: // IEEE: part of cover_point, others iffE<nodep>: // IEEE: part of cover_point, others
//UNSUP /* empty */ { $$ = nullptr; } /* empty */ { $$ = nullptr; }
//UNSUP | yIFF '(' expr ')' { } | yIFF '(' expr ')'
//UNSUP ; { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: cover 'iff'"); }
;
//UNSUPbins_or_empty<nodep>: // ==IEEE: bins_or_empty bins_or_empty<nodep>: // ==IEEE: bins_or_empty
//UNSUP '{' bins_or_optionsList '}' { $$ = $2; } '{' bins_or_optionsList '}' { $$ = $2; }
//UNSUP | '{' '}' { $$ = nullptr; } | '{' '}' { $$ = nullptr; }
//UNSUP | ';' { $$ = nullptr; } | ';' { $$ = nullptr; }
//UNSUP ; ;
//UNSUPbins_or_optionsList<nodep>: // IEEE: { bins_or_options ';' } bins_or_optionsList<nodep>: // IEEE: { bins_or_options ';' }
//UNSUP bins_or_options ';' { $$ = $1; } bins_or_options ';' { $$ = $1; }
//UNSUP | bins_or_optionsList bins_or_options ';' { $$ = addNextNull($1, $2); } | bins_or_optionsList bins_or_options ';' { $$ = addNextNull($1, $2); }
//UNSUP ; ;
//UNSUPbins_or_options<nodep>: // ==IEEE: bins_or_options bins_or_options<nodep>: // ==IEEE: bins_or_options
//UNSUP // // Superset of IEEE - we allow []'s in more places // // Superset of IEEE - we allow []'s in more places
//UNSUP coverage_option { $$ = $1; } coverage_option { $$ = $1; }
//UNSUP // // Can't use wildcardE as results in conflicts // // Can't use wildcardE as results in conflicts
//UNSUP | /**/ bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' iffE { } | bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' iffE
//UNSUP | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' iffE { } { $$ = nullptr; BBUNSUP($<fl>4, "Unsupported: cover bin specification"); }
//UNSUP | /**/ bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' yWITH__CUR '{' cgexpr ')' iffE { } | bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' yWITH__CUR '{' cgexpr '}' iffE
//UNSUP | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' yWITH__CUR '{' cgexpr ')' iffE { } { $$ = nullptr; BBUNSUP($<fl>8, "Unsupported: cover bin 'with' specification"); }
//UNSUP // | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' iffE
//UNSUP // // cgexpr part of trans_list { $$ = nullptr; BBUNSUP($<fl>5, "Unsupported: cover bin 'wildcard' specification"); }
//UNSUP // | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' yWITH__CUR '{' cgexpr '}' iffE
//UNSUP | /**/ bins_keyword id/*bin_identifier*/ bins_orBraE '=' trans_list iffE { } { $$ = nullptr; BBUNSUP($<fl>9, "Unsupported: cover bin 'wildcard' 'with' specification"); }
//UNSUP | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' trans_list iffE { } //
//UNSUP // // // cgexpr part of trans_list
//UNSUP | bins_keyword id/*bin_identifier*/ bins_orBraE '=' yDEFAULT iffE { } | bins_keyword id/*bin_identifier*/ bins_orBraE '=' trans_list iffE
//UNSUP // { $$ = nullptr; BBUNSUP($<fl>4, "Unsupported: cover bin trans list"); }
//UNSUP | bins_keyword id/*bin_identifier*/ bins_orBraE '=' yDEFAULT ySEQUENCE iffE { } | yWILDCARD bins_keyword id/*bin_identifier*/ bins_orBraE '=' trans_list iffE
//UNSUP ; { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: cover bin 'wildcard' trans list"); }
//
| bins_keyword id/*bin_identifier*/ bins_orBraE '=' yDEFAULT iffE
{ $$ = nullptr; BBUNSUP($<fl>5, "Unsupported: cover bin 'default'"); }
| bins_keyword id/*bin_identifier*/ bins_orBraE '=' yDEFAULT ySEQUENCE iffE
{ $$ = nullptr; BBUNSUP($<fl>6, "Unsupported: cover bin 'default' 'sequence'"); }
;
//UNSUPbins_orBraE<nodep>: // IEEE: part of bins_or_options: bins_orBraE<nodep>: // IEEE: part of bins_or_options:
//UNSUP /* empty */ { $$ = nullptr; } /* empty */ { $$ = nullptr; }
//UNSUP | '[' ']' { } | '[' ']' { $$ = nullptr; /*UNSUP*/ }
//UNSUP | '[' cgexpr ']' { } | '[' cgexpr ']' { $$ = nullptr; /*UNSUP*/ }
//UNSUP ; ;
//UNSUPbins_keyword: // ==IEEE: bins_keyword bins_keyword<fl>: // ==IEEE: bins_keyword
//UNSUP yBINS { } yBINS { $$ = $1; /*UNSUP*/ }
//UNSUP | yILLEGAL_BINS { } | yILLEGAL_BINS { $$ = $1; /*UNSUP*/ }
//UNSUP | yIGNORE_BINS { } | yIGNORE_BINS { $$ = $1; /*UNSUP*/ }
//UNSUP ; ;
//UNSUPcovergroup_range_list: // ==IEEE: covergroup_range_list trans_list<nodep>: // ==IEEE: trans_list
//UNSUP covergroup_value_range { $$ = $1; } '(' trans_set ')' { $$ = $2; }
//UNSUP | covergroup_range_list ',' covergroup_value_range { $$ = addNextNull($1, $3); } | trans_list ',' '(' trans_set ')' { $$ = addNextNull($1, $4); }
//UNSUP ; ;
//UNSUPtrans_list: // ==IEEE: trans_list trans_set<nodep>: // ==IEEE: trans_set
//UNSUP '(' trans_set ')' { $$ = $2; } trans_range_list { $$ = $1; }
//UNSUP | trans_list ',' '(' trans_set ')' { } // // Note the { => } in the grammer, this is really a list
//UNSUP ; | trans_set yP_EQGT trans_range_list
{ $$ = $1; BBUNSUP($<fl>2, "Unsupported: cover trans set '=>'"); }
;
//UNSUPtrans_set: // ==IEEE: trans_set trans_range_list<nodep>: // ==IEEE: trans_range_list
//UNSUP trans_range_list { $$ = $1; } trans_item { $$ = $1; }
//UNSUP // // Note the { => } in the grammer, this is really a list | trans_item yP_BRASTAR cgexpr ']'
//UNSUP | trans_set yP_EQGT trans_range_list { } { $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[*'"); }
//UNSUP ; | trans_item yP_BRASTAR cgexpr ':' cgexpr ']'
{ $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[*'"); }
| trans_item yP_BRAMINUSGT cgexpr ']'
{ $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[->'"); }
| trans_item yP_BRAMINUSGT cgexpr ':' cgexpr ']'
{ $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[->'"); }
| trans_item yP_BRAEQ cgexpr ']'
{ $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[='"); }
| trans_item yP_BRAEQ cgexpr ':' cgexpr ']'
{ $$ = nullptr; BBUNSUP($<fl>2, "Unsupported: cover '[='"); }
;
//UNSUPtrans_range_list: // ==IEEE: trans_range_list trans_item<nodep>: // ==IEEE: range_list
//UNSUP trans_item { $$ = $1; } covergroup_range_list { $$ = $1; }
//UNSUP | trans_item yP_BRASTAR repeat_range ']' { } ;
//UNSUP | trans_item yP_BRAMINUSGT repeat_range ']' { }
//UNSUP | trans_item yP_BRAEQ repeat_range ']' { }
//UNSUP ;
//UNSUPtrans_item: // ==IEEE: range_list covergroup_range_list<nodep>: // ==IEEE: covergroup_range_list
//UNSUP covergroup_range_list { $$ = $1; } covergroup_value_range { $$ = $1; }
//UNSUP ; | covergroup_range_list ',' covergroup_value_range { $$ = addNextNull($1, $3); }
;
//UNSUPrepeat_range: // ==IEEE: repeat_range
//UNSUP cgexpr { $$ = $1; }
//UNSUP | cgexpr ':' cgexpr { $$ = addNextNull($1, $3); }
//UNSUP ;
//UNSUPcover_cross: // ==IEEE: cover_cross cover_cross<nodep>: // ==IEEE: cover_cross
//UNSUP id/*cover_point_identifier*/ ':' yCROSS list_of_cross_items iffE cross_body { } id/*cover_point_identifier*/ ':' yCROSS list_of_cross_items iffE cross_body
//UNSUP | /**/ yCROSS list_of_cross_items iffE cross_body { } { $$ = nullptr; BBUNSUP($<fl>3, "Unsupported: cross"); }
//UNSUP ; | yCROSS list_of_cross_items iffE cross_body
{ $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: cross"); }
;
//UNSUPlist_of_cross_items<nodep>: // ==IEEE: list_of_cross_items list_of_cross_items<nodep>: // ==IEEE: list_of_cross_items
//UNSUP cross_item ',' cross_item { $$ = addNextNull($1, $3); } cross_item ',' cross_item { $$ = addNextNull($1, $3); }
//UNSUP | cross_item ',' cross_item ',' cross_itemList | cross_item ',' cross_item ',' cross_itemList
//UNSUP { $$ = addNextNull(addNextNull($1, $3), $5); } { $$ = addNextNull(addNextNull($1, $3), $5); }
//UNSUP ; ;
//UNSUPcross_itemList<nodep>: // IEEE: part of list_of_cross_items cross_itemList<nodep>: // IEEE: part of list_of_cross_items
//UNSUP cross_item { $$ = nullptr; } cross_item { $$ = $1; }
//UNSUP | cross_itemList ',' cross_item { $$ = addNextNull($1, $3); } | cross_itemList ',' cross_item { $$ = addNextNull($1, $3); }
//UNSUP ; ;
//UNSUPcross_item<nodep>: // ==IEEE: cross_item cross_item<nodep>: // ==IEEE: cross_item
//UNSUP idAny/*cover_point_identifier or variable_identifier*/ { $$ = $1; } idAny/*cover_point_identifier or variable_identifier*/ { $$ = nullptr; /*UNSUP*/ }
//UNSUP ; ;
//UNSUPcross_body: // ==IEEE: cross_body cross_body<nodep>: // ==IEEE: cross_body
//UNSUP '{' '}' { $$ = nullptr; } '{' '}' { $$ = nullptr; }
//UNSUP // // IEEE-2012: No semicolon here, mistake in spec // // IEEE-2012: No semicolon here, mistake in spec
//UNSUP | '{' cross_body_itemSemiList '}' { $$ = $1; } | '{' cross_body_itemSemiList '}' { $$ = $2; }
//UNSUP | ';' { $$ = nullptr; } | ';' { $$ = nullptr; }
//UNSUP ; ;
//UNSUPcross_body_itemSemiList: // IEEE: part of cross_body cross_body_itemSemiList<nodep>: // IEEE: part of cross_body
//UNSUP cross_body_item ';' { $$ = $1; } cross_body_item ';' { $$ = $1; }
//UNSUP | cross_body_itemSemiList cross_body_item ';' { $$ = addNextNull($1, $2); } | cross_body_itemSemiList cross_body_item ';' { $$ = addNextNull($1, $2); }
//UNSUP ; ;
//UNSUPcross_body_item<nodep>: // ==IEEE: cross_body_item cross_body_item<nodep>: // ==IEEE: cross_body_item
//UNSUP // // IEEE: our semicolon is in the list // // IEEE: our semicolon is in the list
//UNSUP bins_selection_or_option { $$ = $1; } // // IEEE: bins_selection_or_option
//UNSUP | function_declaration { $$ = $1; } coverage_option { $$ = $1; }
//UNSUP ; // // IEEE: bins_selection
| function_declaration
{ $$ = $1; BBUNSUP($1->fileline(), "Unsupported: coverage cross 'function' declaration"); }
| bins_keyword idAny/*new-bin_identifier*/ '=' select_expression iffE
{ $$ = nullptr; BBUNSUP($1, "Unsupported: coverage cross bin"); }
;
//UNSUPbins_selection_or_option<nodep>: // ==IEEE: bins_selection_or_option select_expression<nodep>: // ==IEEE: select_expression
//UNSUP coverage_option { $$ = $1; } // // IEEE: select_condition expanded here
//UNSUP | bins_selection { $$ = $1; } yBINSOF '(' bins_expression ')'
//UNSUP ; { $$ = nullptr; BBUNSUP($1, "Unsupported: coverage select expression 'binsof'"); }
| '!' yBINSOF '(' bins_expression ')'
{ $$ = nullptr; BBUNSUP($1, "Unsupported: coverage select expression 'binsof'"); }
| yBINSOF '(' bins_expression ')' yINTERSECT '{' covergroup_range_list '}'
{ $$ = nullptr; BBUNSUP($5, "Unsupported: coverage select expression 'intersect'"); }
| '!' yBINSOF '(' bins_expression ')' yINTERSECT '{' covergroup_range_list '}' { }
{ $$ = nullptr; BBUNSUP($5, "Unsupported: coverage select expression 'intersect'"); }
| yWITH__PAREN '(' cgexpr ')'
{ $$ = nullptr; BBUNSUP($1, "Unsupported: coverage select expression with"); }
| '!' yWITH__PAREN '(' cgexpr ')'
{ $$ = nullptr; BBUNSUP($1, "Unsupported: coverage select expression with"); }
// // IEEE-2012: Need clarification as to precedence
//UNSUP yWITH__PAREN '(' cgexpr ')' yMATCHES cgexpr { }
// // IEEE-2012: Need clarification as to precedence
//UNSUP '!' yWITH__PAREN '(' cgexpr ')' yMATCHES cgexpr { }
//
| '(' select_expression ')' { $$ = $2; }
| select_expression yP_ANDAND select_expression
{ $$ = nullptr; BBUNSUP($2, "Unsupported: coverage select expression '&&'"); }
| select_expression yP_OROR select_expression
{ $$ = nullptr; BBUNSUP($2, "Unsupported: coverage select expression '||'"); }
// // IEEE-2012: cross_identifier
// // Part of covergroup_expression - generic identifier
// // IEEE-2012: Need clarification as to precedence
//UNSUP cgexpr { $$ = nullptr; BBUNSUP($1, "Unsupported: coverage select expression"); }
//
// // Need precedence fix
//UNSUP cgexpr yMATCHES cgexpr {..}
;
//UNSUPbins_selection: // ==IEEE: bins_selection bins_expression<nodep>: // ==IEEE: bins_expression
//UNSUP bins_keyword idAny/*new-bin_identifier*/ '=' select_expression iffE { } // // "cover_point_identifier" and "variable_identifier" look identical
//UNSUP ; id/*variable_identifier or cover_point_identifier*/ { $$ = nullptr; /*UNSUP*/ }
| id/*cover_point_identifier*/ '.' idAny/*bins_identifier*/ { $$ = nullptr; /*UNSUP*/ }
;
//UNSUPselect_expression: // ==IEEE: select_expression coverage_eventE<nodep>: // IEEE: [ coverage_event ]
//UNSUP // // IEEE: select_condition expanded here /* empty */ { $$ = nullptr; }
//UNSUP yBINSOF '(' bins_expression ')' { } | clocking_event
//UNSUP | yBINSOF '(' bins_expression ')' yINTERSECT '{' covergroup_range_list '}' { } { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: coverage clocking event"); }
//UNSUP | yWITH__PAREN '(' cgexpr ')' { } | yWITH__ETC yFUNCTION idAny/*"sample"*/ '(' tf_port_listE ')'
//UNSUP // // IEEE-2012: Need clarification as to precedence { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: coverage 'with' 'function'"); }
//UNSUP //UNSUP yWITH__PAREN '(' cgexpr ')' yMATCHES cgexpr { } | yP_ATAT '(' block_event_expression ')'
//UNSUP | '!' yBINSOF '(' bins_expression ')' { } { $$ = nullptr; BBUNSUP($<fl>1, "Unsupported: coverage '@@' events"); }
//UNSUP | '!' yBINSOF '(' bins_expression ')' yINTERSECT '{' covergroup_range_list '}' { } ;
//UNSUP | '!' yWITH__PAREN '(' cgexpr ')' { }
//UNSUP // // IEEE-2012: Need clarification as to precedence
//UNSUP //UNSUP '!' yWITH__PAREN '(' cgexpr ')' yMATCHES cgexpr { }
//UNSUP | select_expression yP_ANDAND select_expression { }
//UNSUP | select_expression yP_OROR select_expression { }
//UNSUP | '(' select_expression ')' { $$ = $2; }
//UNSUP // // IEEE-2012: cross_identifier
//UNSUP // // Part of covergroup_expression - generic identifier
//UNSUP // // IEEE-2012: Need clarification as to precedence
//UNSUP //UNSUP covergroup_expression [ yMATCHES covergroup_expression ]
//UNSUP ;
//UNSUPbins_expression: // ==IEEE: bins_expression block_event_expression<nodep>: // ==IEEE: block_event_expression
//UNSUP // // "cover_point_identifier" and "variable_identifier" look identical block_event_expressionTerm { $$ = nullptr; /*UNSUP @@*/ }
//UNSUP id/*variable_identifier or cover_point_identifier*/ { $$ = $1; } | block_event_expression yOR block_event_expressionTerm { $$ = nullptr; /*UNSUP @@*/ }
//UNSUP | id/*cover_point_identifier*/ '.' idAny/*bins_identifier*/ { } ;
//UNSUP ;
//UNSUPcoverage_eventE: // IEEE: [ coverage_event ] block_event_expressionTerm<nodep>: // IEEE: part of block_event_expression
//UNSUP /* empty */ { $$ = nullptr; } yBEGIN hierarchical_btf_identifier { $$ = nullptr; /*UNSUP @@*/ }
//UNSUP | clocking_event { $$ = $1; } | yEND hierarchical_btf_identifier { $$ = nullptr; /*UNSUP @@*/ }
//UNSUP | yWITH__ETC function idAny/*"sample"*/ '(' tf_port_listE ')' { } ;
//UNSUP | yP_ATAT '(' block_event_expression ')' { }
//UNSUP ;
//UNSUPblock_event_expression: // ==IEEE: block_event_expression hierarchical_btf_identifier<nodep>: // ==IEEE: hierarchical_btf_identifier
//UNSUP block_event_expressionTerm { $$ = $1; } // // hierarchical_tf_identifier + hierarchical_block_identifier
//UNSUP | block_event_expression yOR block_event_expressionTerm { } // // method_identifier
//UNSUP ; packageClassScopeE idAny { $$ = nullptr; /*UNSUP*/ }
;
//UNSUPblock_event_expressionTerm: // IEEE: part of block_event_expression
//UNSUP yBEGIN hierarchical_btf_identifier { }
//UNSUP | yEND hierarchical_btf_identifier { }
//UNSUP ;
//UNSUPhierarchical_btf_identifier: // ==IEEE: hierarchical_btf_identifier
//UNSUP // // hierarchical_tf_identifier + hierarchical_block_identifier
//UNSUP hierarchical_identifier/*tf_or_block*/ { $$ = $1; }
//UNSUP // // method_identifier
//UNSUP | hierarchical_identifier class_scope_id { }
//UNSUP | hierarchical_identifier id { }
//UNSUP ;
//********************************************************************** //**********************************************************************
// Randsequence // Randsequence
@ -6638,7 +6666,7 @@ checker_or_generate_item_declaration<nodep>: // ==IEEE: checker_or_generate_ite
| checker_declaration | checker_declaration
{ $$ = nullptr; BBUNSUP($1, "Unsupported: recursive checker"); } { $$ = nullptr; BBUNSUP($1, "Unsupported: recursive checker"); }
| assertion_item_declaration { $$ = $1; } | assertion_item_declaration { $$ = $1; }
//UNSUP covergroup_declaration { $$ = $1; } | covergroup_declaration { $$ = $1; }
// // IEEE deprecated: overload_declaration // // IEEE deprecated: overload_declaration
| genvar_declaration { $$ = $1; } | genvar_declaration { $$ = $1; }
| clocking_declaration { $$ = $1; } | clocking_declaration { $$ = $1; }
@ -6879,7 +6907,8 @@ class_item<nodep>: // ==IEEE: class_item
| class_declaration | class_declaration
{ $$ = nullptr; BBUNSUP($1, "Unsupported: class within class"); } { $$ = nullptr; BBUNSUP($1, "Unsupported: class within class"); }
| timeunits_declaration { $$ = $1; } | timeunits_declaration { $$ = $1; }
//UNSUP covergroup_declaration { $$ = $1; } | covergroup_declaration
{ $$ = nullptr; BBUNSUP($1, "Unsupported: covergroup within class"); }
// // local_parameter_declaration under parameter_declaration // // local_parameter_declaration under parameter_declaration
| parameter_declaration ';' { $$ = $1; } | parameter_declaration ';' { $$ = $1; }
| ';' { $$ = nullptr; } | ';' { $$ = nullptr; }

View File

@ -0,0 +1,380 @@
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:25:4: Unsupported: covergroup
25 | covergroup cg_empty;
| ^~~~~~~~~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:28:4: Unsupported: covergroup
28 | covergroup cg_opt;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:29:7: Unsupported: coverage option
29 | type_option.weight = 1;
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:30:7: Unsupported: coverage option
30 | type_option.goal = 99;
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:31:7: Unsupported: coverage option
31 | type_option.comment = "type_option_comment";
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:32:7: Unsupported: coverage option
32 | type_option.strobe = 0;
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:33:7: Unsupported: coverage option
33 | type_option.merge_instances = 1;
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:34:7: Unsupported: coverage option
34 | type_option.distribuge_first = 1;
| ^~~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:35:7: Unsupported: coverage option
35 | option.name = "the_name";
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:36:7: Unsupported: coverage option
36 | option.weight = 1;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:37:7: Unsupported: coverage option
37 | option.goal = 98;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:38:7: Unsupported: coverage option
38 | option.comment = "option_comment";
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:39:7: Unsupported: coverage option
39 | option.at_least = 20;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:40:7: Unsupported: coverage option
40 | option.auto_bin_max = 10;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:41:7: Unsupported: coverage option
41 | option.cross_num_print_missing = 2;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:42:7: Unsupported: coverage option
42 | option.detect_overlap = 1;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:43:7: Unsupported: coverage option
43 | option.per_instance = 1;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:44:7: Unsupported: coverage option
44 | option.get_inst_coverage = 1;
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:47:4: Unsupported: covergroup
47 | covergroup cg_clockingevent() @(posedge clk);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:47:34: Unsupported: coverage clocking event
47 | covergroup cg_clockingevent() @(posedge clk);
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:49:4: Unsupported: covergroup
49 | covergroup cg_withfunction() with function sample (a);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:49:33: Unsupported: coverage 'with' 'function'
49 | covergroup cg_withfunction() with function sample (a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:51:4: Unsupported: covergroup
51 | covergroup cg_atat() @@ (begin funca or end funcb);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:51:25: Unsupported: coverage '@@' events
51 | covergroup cg_atat() @@ (begin funca or end funcb);
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:53:4: Unsupported: covergroup
53 | covergroup cg_bracket;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:56:4: Unsupported: covergroup
56 | covergroup cg_bracket;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:57:9: Unsupported: coverage option
57 | { option.name = "option"; }
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:59:4: Unsupported: covergroup
59 | covergroup cg_cp;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:60:7: Unsupported: cover point
60 | coverpoint a;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:62:4: Unsupported: covergroup
62 | covergroup cg_cp_iff;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:63:20: Unsupported: cover 'iff'
63 | coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:63:7: Unsupported: cover point
63 | coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:65:4: Unsupported: covergroup
65 | covergroup cg_id_cp_iff;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:66:24: Unsupported: cover 'iff'
66 | id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:66:11: Unsupported: cover point
66 | id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:68:4: Unsupported: covergroup
68 | covergroup cg_id_cp_id1;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:69:28: Unsupported: cover 'iff'
69 | int id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:69:15: Unsupported: cover point
69 | int id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:71:4: Unsupported: covergroup
71 | covergroup cg_id_cp_id2;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:72:32: Unsupported: cover 'iff'
72 | var int id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:72:19: Unsupported: cover point
72 | var int id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:74:4: Unsupported: covergroup
74 | covergroup cg_id_cp_id3;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:75:34: Unsupported: cover 'iff'
75 | var [3:0] id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:75:21: Unsupported: cover point
75 | var [3:0] id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:77:4: Unsupported: covergroup
77 | covergroup cg_id_cp_id4;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:78:30: Unsupported: cover 'iff'
78 | [3:0] id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:78:17: Unsupported: cover point
78 | [3:0] id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:80:4: Unsupported: covergroup
80 | covergroup cg_id_cp_id5;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:81:31: Unsupported: cover 'iff'
81 | signed id: coverpoint a iff (b);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:81:18: Unsupported: cover point
81 | signed id: coverpoint a iff (b);
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:84:4: Unsupported: covergroup
84 | covergroup cg_cross;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:85:18: Unsupported: cover 'iff'
85 | cross a, b iff (!rst);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:85:7: Unsupported: cross
85 | cross a, b iff (!rst);
| ^~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:87:4: Unsupported: covergroup
87 | covergroup cg_cross2;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:88:18: Unsupported: cover 'iff'
88 | cross a, b iff (!rst) {}
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:88:7: Unsupported: cross
88 | cross a, b iff (!rst) {}
| ^~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:90:4: Unsupported: covergroup
90 | covergroup cg_cross3;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:91:20: Unsupported: coverage option
91 | cross a, b { option.comment = "cross"; option.weight = 12; }
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:91:46: Unsupported: coverage option
91 | cross a, b { option.comment = "cross"; option.weight = 12; }
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:91:7: Unsupported: cross
91 | cross a, b { option.comment = "cross"; option.weight = 12; }
| ^~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:93:4: Unsupported: covergroup
93 | covergroup cg_cross3;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:94:34: Unsupported: coverage cross 'function' declaration
94 | cross a, b { function void crossfunc; endfunction; }
| ^~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:94:7: Unsupported: cross
94 | cross a, b { function void crossfunc; endfunction; }
| ^~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:96:4: Unsupported: covergroup
96 | covergroup cg_cross_id;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:97:28: Unsupported: cover 'iff'
97 | my_cg_id: cross a, b iff (!rst);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:97:17: Unsupported: cross
97 | my_cg_id: cross a, b iff (!rst);
| ^~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:100:4: Unsupported: covergroup
100 | covergroup cg_binsoroptions_bk1;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:102:17: Unsupported: cover bin specification
102 | { bins ba = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:103:24: Unsupported: cover 'iff'
103 | { bins bar = {a} iff (!rst); }
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:103:18: Unsupported: cover bin specification
103 | { bins bar = {a} iff (!rst); }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:104:26: Unsupported: cover bin specification
104 | { illegal_bins ila = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:105:25: Unsupported: cover bin specification
105 | { ignore_bins iga = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:107:19: Unsupported: cover bin specification
107 | { bins ba[] = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:108:20: Unsupported: cover bin specification
108 | { bins ba[2] = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:110:23: Unsupported: cover bin 'with' specification
110 | { bins ba = {a} with { b }; }
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:112:27: Unsupported: cover bin 'wildcard' specification
112 | { wildcard bins bwa = {a}; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:113:34: Unsupported: cover bin 'wildcard' 'with' specification
113 | { wildcard bins bwaw = {a} with { b }; }
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:115:20: Unsupported: cover bin 'default'
115 | { bins def = default; }
| ^~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:116:29: Unsupported: cover bin 'default' 'sequence'
116 | { bins defs = default sequence; }
| ^~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:118:18: Unsupported: cover bin trans list
118 | { bins bts = ( 1, 2 ); }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:119:9: Unsupported: cover bin 'wildcard' trans list
119 | { wildcard bins wbts = ( 1, 2 ); }
| ^~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:120:33: Unsupported: covergroup value range
120 | { bins bts2 = ( 2, 3 ), ( [5:6] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:120:19: Unsupported: cover bin trans list
120 | { bins bts2 = ( 2, 3 ), ( [5:6] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:122:27: Unsupported: cover trans set '=>'
122 | { bins bts2 = ( 1,5 => 6,7 ) ; }
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:122:19: Unsupported: cover bin trans list
122 | { bins bts2 = ( 1,5 => 6,7 ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:123:25: Unsupported: cover '[*'
123 | { bins bts2 = ( 3 [*5] ) ; }
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:123:19: Unsupported: cover bin trans list
123 | { bins bts2 = ( 3 [*5] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:124:25: Unsupported: cover '[*'
124 | { bins bts2 = ( 3 [*5:6] ) ; }
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:124:19: Unsupported: cover bin trans list
124 | { bins bts2 = ( 3 [*5:6] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:125:25: Unsupported: cover '[->'
125 | { bins bts2 = ( 3 [->5] ) ; }
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:125:19: Unsupported: cover bin trans list
125 | { bins bts2 = ( 3 [->5] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:126:25: Unsupported: cover '[->'
126 | { bins bts2 = ( 3 [->5:6] ) ; }
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:126:19: Unsupported: cover bin trans list
126 | { bins bts2 = ( 3 [->5:6] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:127:25: Unsupported: cover '[='
127 | { bins bts2 = ( 3 [=5] ) ; }
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:127:19: Unsupported: cover bin trans list
127 | { bins bts2 = ( 3 [=5] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:128:25: Unsupported: cover '[='
128 | { bins bts2 = ( 3 [=5:6] ) ; }
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:128:19: Unsupported: cover bin trans list
128 | { bins bts2 = ( 3 [=5:6] ) ; }
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:132:4: Unsupported: covergroup
132 | covergroup cg_cross_bins;
| ^~~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:134:23: Unsupported: coverage select expression 'binsof'
134 | bins bin_a = binsof(a);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:134:10: Unsupported: coverage cross bin
134 | bins bin_a = binsof(a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:135:24: Unsupported: coverage select expression 'binsof'
135 | bins bin_ai = binsof(a) iff (!rst);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:135:34: Unsupported: cover 'iff'
135 | bins bin_ai = binsof(a) iff (!rst);
| ^~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:135:10: Unsupported: coverage cross bin
135 | bins bin_ai = binsof(a) iff (!rst);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:136:23: Unsupported: coverage select expression 'binsof'
136 | bins bin_c = binsof(cp.x);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:136:10: Unsupported: coverage cross bin
136 | bins bin_c = binsof(cp.x);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:137:24: Unsupported: coverage select expression 'binsof'
137 | bins bin_na = ! binsof(a);
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:137:10: Unsupported: coverage cross bin
137 | bins bin_na = ! binsof(a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:139:33: Unsupported: coverage select expression 'intersect'
139 | bins bin_d = binsof(a) intersect { b };
| ^~~~~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:139:10: Unsupported: coverage cross bin
139 | bins bin_d = binsof(a) intersect { b };
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:140:34: Unsupported: coverage select expression 'intersect'
140 | bins bin_nd = ! binsof(a) intersect { b };
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:140:10: Unsupported: coverage cross bin
140 | bins bin_nd = ! binsof(a) intersect { b };
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:142:23: Unsupported: coverage select expression with
142 | bins bin_e = with (a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:142:10: Unsupported: coverage cross bin
142 | bins bin_e = with (a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:143:23: Unsupported: coverage select expression with
143 | bins bin_e = ! with (a);
| ^
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:143:10: Unsupported: coverage cross bin
143 | bins bin_e = ! with (a);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:145:26: Unsupported: coverage select expression 'binsof'
145 | bins bin_par = (binsof(a));
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:145:10: Unsupported: coverage cross bin
145 | bins bin_par = (binsof(a));
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:146:25: Unsupported: coverage select expression 'binsof'
146 | bins bin_and = binsof(a) && binsof(b);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:146:38: Unsupported: coverage select expression 'binsof'
146 | bins bin_and = binsof(a) && binsof(b);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:146:35: Unsupported: coverage select expression '&&'
146 | bins bin_and = binsof(a) && binsof(b);
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:146:10: Unsupported: coverage cross bin
146 | bins bin_and = binsof(a) && binsof(b);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:147:24: Unsupported: coverage select expression 'binsof'
147 | bins bin_or = binsof(a) || binsof(b);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:147:37: Unsupported: coverage select expression 'binsof'
147 | bins bin_or = binsof(a) || binsof(b);
| ^~~~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:147:34: Unsupported: coverage select expression '||'
147 | bins bin_or = binsof(a) || binsof(b);
| ^~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:147:10: Unsupported: coverage cross bin
147 | bins bin_or = binsof(a) || binsof(b);
| ^~~~
%Error-UNSUPPORTED: t/t_covergroup_unsup.v:133:7: Unsupported: cross
133 | cross a, b {
| ^~~~~
%Error: Exiting due to

View File

@ -0,0 +1,20 @@
#!/usr/bin/env perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2022 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt => 1);
compile(
expect_filename => $Self->{golden_filename},
verilator_flags2 => ['--assert --error-limit 1000'],
fails => 1,
);
ok(1);
1;

View File

@ -0,0 +1,157 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2023 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int a;
int b;
logic c;
int cyc = 0;
always @(posedge clk) begin
cyc <= cyc + 1;
end
// NOTE this grammar hasn't been checked with other simulators,
// is here just to avoid uncovered code lines in the grammar.
covergroup cg_empty;
endgroup
covergroup cg_opt;
type_option.weight = 1; // cg, cp, cross
type_option.goal = 99; // cg, cp, cross
type_option.comment = "type_option_comment"; // cg, cp, cross
type_option.strobe = 0; // cg
type_option.merge_instances = 1; // cg
type_option.distribuge_first = 1; // cg
option.name = "the_name"; // cg
option.weight = 1; // cg, cp, cross
option.goal = 98; // cg, cp, cross
option.comment = "option_comment"; // cg, cp, cross
option.at_least = 20; // cg, cp, cross
option.auto_bin_max = 10; // cg, cp
option.cross_num_print_missing = 2; // cg, cross
option.detect_overlap = 1; // cg, cp
option.per_instance = 1; // cg
option.get_inst_coverage = 1; // cg
endgroup
covergroup cg_clockingevent() @(posedge clk);
endgroup
covergroup cg_withfunction() with function sample (a);
endgroup
covergroup cg_atat() @@ (begin funca or end funcb);
endgroup
covergroup cg_bracket;
{}
endgroup
covergroup cg_bracket;
{ option.name = "option"; }
endgroup
covergroup cg_cp;
coverpoint a;
endgroup
covergroup cg_cp_iff;
coverpoint a iff (b);
endgroup
covergroup cg_id_cp_iff;
id: coverpoint a iff (b);
endgroup
covergroup cg_id_cp_id1;
int id: coverpoint a iff (b);
endgroup
covergroup cg_id_cp_id2;
var int id: coverpoint a iff (b);
endgroup
covergroup cg_id_cp_id3;
var [3:0] id: coverpoint a iff (b);
endgroup
covergroup cg_id_cp_id4;
[3:0] id: coverpoint a iff (b);
endgroup
covergroup cg_id_cp_id5;
signed id: coverpoint a iff (b);
endgroup
covergroup cg_cross;
cross a, b iff (!rst);
endgroup
covergroup cg_cross2;
cross a, b iff (!rst) {}
endgroup
covergroup cg_cross3;
cross a, b { option.comment = "cross"; option.weight = 12; }
endgroup
covergroup cg_cross3;
cross a, b { function void crossfunc; endfunction; }
endgroup
covergroup cg_cross_id;
my_cg_id: cross a, b iff (!rst);
endgroup
covergroup cg_binsoroptions_bk1;
// bins_keyword id/*bin_identifier*/ bins_orBraE '=' '{' open_range_list '}' iffE
{ bins ba = {a}; }
{ bins bar = {a} iff (!rst); }
{ illegal_bins ila = {a}; }
{ ignore_bins iga = {a}; }
{ bins ba[] = {a}; }
{ bins ba[2] = {a}; }
{ bins ba = {a} with { b }; }
{ wildcard bins bwa = {a}; }
{ wildcard bins bwaw = {a} with { b }; }
{ bins def = default; }
{ bins defs = default sequence; }
{ bins bts = ( 1, 2 ); }
{ wildcard bins wbts = ( 1, 2 ); }
{ bins bts2 = ( 2, 3 ), ( [5:6] ) ; }
{ bins bts2 = ( 1,5 => 6,7 ) ; }
{ bins bts2 = ( 3 [*5] ) ; }
{ bins bts2 = ( 3 [*5:6] ) ; }
{ bins bts2 = ( 3 [->5] ) ; }
{ bins bts2 = ( 3 [->5:6] ) ; }
{ bins bts2 = ( 3 [=5] ) ; }
{ bins bts2 = ( 3 [=5:6] ) ; }
endgroup
covergroup cg_cross_bins;
cross a, b {
bins bin_a = binsof(a);
bins bin_ai = binsof(a) iff (!rst);
bins bin_c = binsof(cp.x);
bins bin_na = ! binsof(a);
bins bin_d = binsof(a) intersect { b };
bins bin_nd = ! binsof(a) intersect { b };
bins bin_e = with (a);
bins bin_e = ! with (a);
bins bin_par = (binsof(a));
bins bin_and = binsof(a) && binsof(b);
bins bin_or = binsof(a) || binsof(b);
}
endgroup
always @(posedge clk) begin
if (cyc == 10) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
endmodule