Verissimo SystemVerilog Testbench Linter User Guide
Rev. 21.1.2, 18 January 2021

7.3.2 Non Standard Checks

ID Message Notes/Examples
ASSERTION_IN_CUNIT_SCOPEDeferred immediate assertion not allowed in compilation-unit scopeassert #0 (0 == 0);
EXTERN_DECLARATION_IN_CUNIT_SCOPEExtern function not allowed in compilation-unit scopeextern int foo();
FATAL_SYSTEM_TASK_FIRST_ARGUMENTExpecting 0, 1 or 2 as first argument to '$fatal' system task$fatal(4, "Sorry");
BEGIN_END_OUTSIDE_GENERATE'begin/end' generate block not allowed 
CONFIGURATION_RULEUnexpected configuration rule 
MISSING_CONFIGURATION_RULE_SEMIExpecting ';' after configuration ruleinstance top.sub.u1 liblist gateLib
TIMEUNIT_IN_CLASS_SCOPE # declaration not allowed in class scope class foo;

    timeunit 100ps;

    timeprecision 10fs;

FUNCTION_PROTOTYPEExpecting 'function' keyword in prototype declarationextern void foo();
PURE_QUALIFIER_POSITION'pure' qualifier not allowed before # qualifier protected pure local virtual function void wrong_order();
CONSTRUCTOR_LIFETIME'automatic' lifetime for class constructor not allowedclass foo;

function automatic new();


CLASS_VARIABLE_LIFETIME'automatic' lifetime for class variable not allowedclass foo;

    automatic int bar;

CONSTRAINT_DEFAULT_QUALIFIER'default' qualifier for constraint not alloweddefault constraint a_cons {

    x == 0;

    y <= 0;

HARD_SOLVE_BEFORE'hard' qualifier not allowedconstraint c_cons {

    x == 0;

    y <= 0;

    solve x before y hard;

SOFT_AFTER_EXPRESSION'soft' must be placed before the expressionconstraint c_cons {

    x dist {0, 1} soft;

SOFT_BEFORE_SOFT'soft' not allowed before 'soft'constraint c_cons {

    soft soft x;

SOFT_BEFORE_UNIQUE'soft' not allowed before 'unique'constraint c_cons {

    soft unique {}

SOFT_BEFORE_IF'soft' not allowed before 'if'constraint c_cons {

    soft if (condition) {}

SOFT_BEFORE_FOREACH'soft' not allowed before 'foreach'constraint c_cons {

    soft foreach (array[i]) {}

SOFT_BEFORE_DISABLE'soft' not allowed before 'disable'constraint c_cons {

    soft disable soft x;

PARENTHESES_DIST_EXPRESSIONEnclosing parentheses not allowed for dist expressionconstraint c_cons {

    (x dist {0,1});

    (foreach (array[i]) { });

    (x -> 2);

SPACE_DIST_WEIGHTUnexpected space between : and # in dist weightrand int x;

constraint c_cons {

    x dist {0 : = 3};

DYNAMICPARAMUnexpected keyword 'dynamicparam'dynamicparam p = 3;
CONST_AFTER_STATIC'const' qualifier not allowed after 'static'static const int x = 0;
TYPEDEF_COVERGROUPTypedef of covergroup not allowedtypedef covergroup cg;
TYPEDEF_DATATYPEExplicit data type required (implicit 'logic' is assumed)typedef [3:0] new_type;
IMPLICIT_DATA_TYPE_IN_DECLARATIONExpecting net type (e.g. wire) or 'var' keyword before implicit data type[3:0] var_or_net;
RETURN_TYPE_SIGNINGExpecting signing after return data typefunction signed int foo();

PACKED_DIMENSION_INTEGER_TYPEUnexpected packed dimension for integer typefunction integer[3:0] foo();

PACKED_STRUCT_WITH_SIGNINGExpecting 'packed' before signingtypedef struct signed {

    int x;

    int y;

} packed_with_sign;
TYPEOF_SYSTEM_FUNCTION'$typeof' system function not allowedbit[3:0] field;

typedef $typeof(field) new_type;
PACKAGE_SCOPE_IN_ENUM_BASE_TYPEPackage scope before enum base type not allowedpackage package_name;

typedef int id;


typedef enum package_name::id {R,G,B} new_enum;
ENUM_IMPLICIT_DATATYPEExplicit data type required (implicit # is assumed) typedef enum [1:0] {R,G,B} new_enum;
DELAY_VALUE_EXPRESSIONExpecting parentheses around bit-select and part-selectalways ... #del[0] ok = 1;
PARAMETER_DYNAMIC_ARRAYFixed size required for parameter dimensionparameter logic flag1[] = '{2};

localparam logic flag2[] = '{2};
CONST_EXPR_PACKED_DIMENSIONExpecting constant range instead of constant expression for packed dimensionenum bit[1] { A, B } foo;
QUALIFIER_BEFORE_METHOD # qualifier not allowed before method keyword static function foo(); ... endfunction
CLASS_SCOPE_END_LABELClass scope ''#'::' before end label not allowed... endfunction : class_scope::func_name
HIERARCHICAL_INTERFACE_IDENTIFIERHierarchical interface identifier #'.'# not allowed task id1.id2.id3();
PROTOTYPE_RETURN_DATA_TYPEExpecting return data type or void for function prototypeextern function doCheck();
DPI_DECLARATION_STRINGExpecting "DPI" or "DPI-C"import "DPI_C" init_1 = function void moo();
EMPTY_ARGUMENTS_LISTEmpty arguments list '()' not allowed when arguments are declared inside function/task bodyfunction void foo();

    output integer x;

DYNAMIC_ARRAY_INITIALIZATIONUnexpected 'new' initialization for dynamic arraytask foo(input int a[] = new[1]);

MODPORT_PORTS_DECLARATIONUnexpected empty modport ports declarationmodport mp_name();
MODPORT_PORT_DIRECTIONExplicit direction required for port # modport mp_name(x, input y);
MODPORT_HIERARCHICAL_PORTHierarchical identifier not allowed in modport port declarationmodport master (output sb.gnt);
MODPORT_IMPORT_EXPORTUnexpected .* used in modport import/export declarationmodport master (import sb.*);
REPETITION_IN_SEQUENCEGoto repeat '[->' and non-consecutive repeat '[=' operators not allowed 
COVERPOINT_IFF_EXPRESSIONExpecting parentheses around coverpoint 'iff' expressioncoverpoint a iff test;
BINS_IFF_EXPRESSIONExpecting parentheses around bins 'iff' expressionbins a = { [0:63],65 } iff ana;
COVERCROSS_IFF_EXPRESSIONExpecting parentheses around covercross 'iff' expression 
BINS_SELECTION_IFF_EXPRESSIONExpecting parentheses around bins selection 'iff' expression 
WILDCARD_BINS_SELECTION'wildcard' not allowed for bins selectioncovergroup cov @(posedge clk);

aXb : cross a, b { wildcard bins i_zero = binsof(a) intersect { 0 }; }

HIERARCHICAL_ACCESS_IN_BINS_EXPRESSIONCover point hierarchical identifier not allowed in bins expressionbinsof(x.cover_point_id.bin_id);
SELECT_IN_BINS_EXPRESSIONSelect not allowed in bins expressionbinsof(cover_point_id.bin_id[3]);
COVERPOINT_EXPRESSION_TYPECoverpoint expression should be of an integral data type 
PULL_GATE_INSTANCEMultiple terminals to a pull gate instance not allowedpullup p (t1, t2, t3);
IMPLICIT_INSTANCE_NAMEImplicit name not allowed for instance of # module top(input i, output o);

m1(.i(i), .o(o));

PARENTHESES_GATE_TERMINALEnclosing parentheses around gate terminal not allowedtranif0 ti0 (x, (y), z);
PARAMETER_OVERRIDEExpecting parentheses around parameter overridemodule m #(P1=1)();


module top();

m # 3 u_m();

EMPTY_ORDERED_PARAMETER_OVERRIDEEmpty parameter override in ordered list not allowedxmm_atomic_gen #(transaction, ,"Atomic Gen") msg_rx_gen;
MULTIPLE_DOT_STAR_CONNECTIONSDot start port connection '.*' cannot appear more than once in the port listm u_m(.*, .*);
INITIAL_BLOCK_SCOPEUnexpected initial block constructpackage p1;

    initial begin end;

FINAL_BLOCK_SCOPEUnexpected final block constructpackage p1;

    final begin end;

SELECT_IN_EVENT_CONTROLSelect in event control not allowed@u_m3_1.a[1];
EVENT_TRIGGER'class_name::' not allowed in event trigger construct'->' a_class::a;
DISABLE_STATEMENT'class_name::' not allowed in disable statementdisable a_class::a;
EMPTY_CASE_STATEMENTEmpty case statement not allowedcase (x)

EMPTY_ASSIGNMENT_PATTERNEmpty assignment pattern '{} not allowedx = '{};
MISSING_FOR_LOOP_INITIALIZATION'for' loop variable initialization requiredfor ( ; i < 10; i++) ...
MISSING_FOR_LOOP_CONDITION'for' loop conditional expression requiredfor (i = 0; ; i++) ...
MISSING_FOR_LOOP_STEP'for' loop step requiredfor (i = 0; i < 10; ) ...
FOREACH_LOOP_CONDITIONMultidimensional array select not allowed in foreach loop conditionNote: Strict only check. See +dvt_strict_non_standard_checks build directive on how to activate it.

for (i=1;; i++) begin end
FOR_LOOP_INITIALIZATIONExpecting assignment in 'for' loop variable initializationfor (;i<10; i++) begin end
SELECT_IN_WEIGHTSelect in weight specification not allowedfor (i=1;i<10;) begin end
PARALLEL_PATH_DESCRIPTIONList of inputs in parallel path description not allowed(in1,in2 => q[1]) = 1;
RANGE_IN_MULTIPLE_CONCATENATIONRange in multiple concatenation not allowedx = {0:3{1}};
ASSIGNMENT_PATTERNExpecting assignment pattern '{...} instead of concatenationx = {a : '0, b : '1};
ASSIGNMENT_PATTERN_CONTEXTAssignment pattern not allowed outside assignment-like context (could not determine data type)if (struct_signal == '{ a, b }) ...
SCALAR_ASSIGNMENT_PATTERNVariable of 1-bit scalar type # not allowed as target of assignment pattern bit x = '{ '0 };
TARGET_UNPACKED_ARRAY_CONCATENATIONUnpacked array concatenation not allowed as target expression.out({ a, b })
STREAM_CONCATENATION_TYPEPacked dimension on stream concatenation type not allowedresult = { >> bit [7:0] { variable_name } };
RANDOMIZE_ARGUMENTRange selection of randomize argument # not allowed std::randomize(rand_var[7:0]) with {...};
INSIDE_OPERATOR'inside' operator in constant expression not allowedint y[a inside {b, c} ? 10 : 2];
INSIDE_OPERATOR_RANGEExpecting curly braces {} around 'inside' operator rangeif ( a inside x ) ...
TYPE_CASTINGExpecting tick before type casting expressionint(some_var)
NULL_CONSTANT_EXPRESSIONExpecting constant expression instead of 'null'class my_class #(parameter string x = null
TIME_VALUEUnexpected white space between number and time valuetimeunit 10 ps;
HIERARCHICAL_CLASS_ACCESSClass scope resolution access '::' not allowed    a.b.c::enum_value
SELECT_IN_CROSS_ITEMS_LISTSelect in cross items list not allowedcovergroup g2 @(posedge clk);

    AxC: cross color[2], pixel_adr;

HIERARCHICAL_ROOT_ACCESSUnexpected '$root' name before package or class scope access$root.my_pkg::my_signal
COMMA_AFTER_ATTRIBUTE_INSTANCEAttribute instance followed by ';' not allowed(* full_case, parallel_case; *)
CONST_ATTRIBUTE_INSTANCE'const' for attribute instance not allowed(* const int full_case=1, parallel_case *)
ATTRIBUTE_INSTANCE_DATA_TYPEAttribute instance data type not allowed(* integer library_binding = 1, something = 1 *)
SELECT_IN_ATTRIBUTE_INSTANCESelect in attribute instance not allowed(* cds_net_set[0:2] = {"a", "b", "c"} *)
TYPEOF_SYSTEM_TASKUnexpected '$typeof' system task$typeof(a) b;
KEYWORD_AS_IDENTIFIERReserved keyword # not allowed as identifier instance, restrict, checker, table, cell, config, design
MULTIPLE_BINSSpecification of multiple bins dimension not allowedwildcard bins trans 2 = ({1'bx} => {1'bx});
WILDCARD_EQUALITY_OPERATORExpecting wildcard operator '==?' instead of '=?=' 
WILDCARD_INEQUALITY_OPERATORExpecting wildcard operator '!=?' instead of '!?=' 
STRING_CONTINUATIONExpecting '\' to continue the string on the next linestring str = "string is splitted

on multiple lines";
STRING_CONTINUATION_WSWhite-space not allowed after '\' line continuationstring str = "string is splitted \[white-space]


on multiple lines";
COMPILER_GUARDExpecting identifier after `ifdef, `ifndef, `elsif instead of '`'#'' 
USELIB_DIRECTIVEUnexpected Verilog-XL directive `uselib, use -y, -v, and +libext command line flags instead 
LIBRARY_PATHQuotes for library path specification not allowedlibrary rtlLib "top.v";
MACRO_TEXTMacro text string must terminate with `" instead of "$sformat(errStr, `"ID``_``SUFFIX SIGNAL is %b",SIGNAL);
EXPONENT_FORMAT_TIME_VALUEUnexpected exponent format for time value#(1.0e9ns)
APIUnexpected method/field # Note: Strict only check for some API. See +dvt_strict_non_standard_checks build directive on how to activate all.
NOF_PARAMETER_OVERRIDESExpected # parameter overrides, found # 
MISSING_FUNCTION_IMPLEMENTATION # extern function is not implemented  
MISSING_TASK_IMPLEMENTATION # extern task is not implemented  
FUNCTION_IMPLEMENTATION_SCOPEFunction implementation of #'' must be in the same scope as class ''#  
TASK_IMPLEMENTATION_SCOPETask implementation of #'' must be in the same scope as class ''#  
CONSTRAINT_IMPLEMENTATION_SCOPEConstraint implementation #'' must be in the same scope as class ''#  
MODPORT_IMPORT_EXPORT_PORTExpecting method name instead of interface signal name # class foo;


interface bar(input clk);

foo field;

modport mp1(export field);

SELECT_METHOD_CALLSelect not allowed after #() method call[0]
EVENT_CONTROL_EXPRESSIONExpecting singular data type for event control expression instead of type # initial begin

    @(cif_enable) $display("list_of_arguments");

METHOD_ARGUMENT_DEFAULT_VALUEDefault value #'' of # argument ''# not assignable task read_pm_reg1(my_class port = e_PORT_0);

METHOD_OVERRIDE_ARGUMENT_NAMEArgument name #'' of method ''# does not match #'' of override ''# class foo1;

    virtual function bar(int base_name);



class foo2 extends foo1;

    virtual function bar(int child_name);


FUNCTION_IMPLEMENTATION_RETURN_TYPEReturn type #'' of function ''# must be the same as prototype return type (non-standard use of type alias) typedef bit my_type;

class foo;

    extern function bit boo();


function my_type foo::boo();

FUNCTION_IMPLEMENTATION_INTERNAL_RETURN_TYPEInternal return type #'' for the implementation of extern method ''# requires scope resolution function cls_internal_type cls::foo(); ...
METHOD_IMPLEMENTATION_ARGUMENT_TYPEArgument type #'' of method ''# must be the same as prototype argument type (non-standard use of type alias) typedef bit my_type;

class foo;

    extern function bit boo(bit arg);

    extern function bit goo(bit arg);


function bit foo::boo(my_type arg);

VOID_CAST_OF_VOID_FUNCTIONVoid cast of void function # not allowed void'(void_return_function())
LOGICAL_NEGATIONOperand of type #'' not allowed with logical negation ''# (use == null instead) if (!class_obj) ...
BINARY_LOGICAL_OPERATOROperand of type #'' not allowed with binary logical operator ''# (use != null instead) if (class_obj && class_obj.field == 0) ...
DYNAMIC_ARRAY_NULL_OPERATION #'' operator is undefined for dynamic array ''# and null  
NUMERIC_NULL_OPERATION #'' operator is undefined for numeric type ''# and null  
STRING_OPERATIONExplicit string cast required of # operand of type #  
ENUM_ASSIGNMENTExplicit cast required when assigning #'' to variable ''# of enum type #  
ENUM_COMPARISONExplicit cast required when comparing #'' to variable ''# of enum type #  
ENUM_RETURNExplicit cast to enum type #'' required when returning ''#  
DIFFERENT_ENUMS_ASSIGNMENTExplicit cast required when assigning to enum type # from enum type # 
DIFFERENT_ENUMS_COMPARISONExplicit cast required when comparing enum type # to enum type # 
EVENT_CONTROLThe following events must be of a singular data type:#always @(a or b) begin

    c = a[0] & b;

IMPORT_TYPE_WITHOUT_EXPORTPackage #'' must export type ''#  
TYPE_SPECIALIZATIONType #'' is already a specialization of ''# typedef cls#(.T(int)) type_alias; type_alias(.T(int)) field;
REPEAT_CONDITION_UNPACKED_ARRAYUnpacked array # not allowed as repeat condition  
REPEAT_CONDITION_STRINGString variable # not allowed as repeat condition  
REPEAT_CONDITION_UNPACKED_STRUCTUnpacked struct/union # not allowed as repeat condition  
INTERFACE_NAME_SELF_REFERENCEInterface type name # not allowed as self reference virtual interface_name var = interface_name;
INTERFACE_SELF_REFERENCE #'' not allowed as reference to ''# instance interface_name::self;