Verissimo SystemVerilog Testbench Linter User Guide
Rev. 24.1.12, 12 June 2024

8.4.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 scopeclass foo;

    timeunit 100ps;

    timeprecision 10fs;

FUNCTION_PROTOTYPEExpecting 'function' keyword in prototype declarationextern void foo();
PURE_QUALIFIER_POSITION'pure' qualifier not allowed before # qualifierprotected 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;
LIFETIME_QUALIFIER_BEFORE_VAR# qualifier not allowed before 'var'automatic var 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;
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 keywordstatic function foo(); ... endfunction
CLASS_SCOPE_END_LABELClass scope #:: before end label not allowed... endfunction : class_scope::func_name
HIERARCHICAL_INTERFACE_IDENTIFIERHierarchical interface identifier #.# not allowedtask 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]);

CLASS_INSTANCE_INITIALIZATIONUnexpected 'new' initialization for class instancefunction void foo(cls i = new());

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 
COVERGROUP_EXPRESSIONExpecting constant expression or non-ref covergroup argument, found #int field;

covergroup cg() with function sample(int unsigned foo);

coverpoint foo {

ignore_bins ignore = foo with (field > 2);


CONCATENATION_MULTIPLIERExpecting constant expression as concatenation multiplier, found #int field = 8;

logic[7:0&#93 x = { field {1'b1}}
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 requiredNote: Not applicable in IEEE 1800-2012 standard syntax or newer.

for ( ; i < 10; i++) ...
MISSING_FOR_LOOP_CONDITION'for' loop conditional expression requiredNote: Not applicable in IEEE 1800-2012 standard syntax or newer.

for (i = 0; ; i++) ...
MISSING_FOR_LOOP_STEP'for' loop step requiredNote: Not applicable in IEEE 1800-2012 standard syntax or newer.

for (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.

foreach (array[val][i]) ...
FOR_LOOP_INITIALIZATIONExpecting assignment in 'for' loop variable initializationfor (++i;i<10; i++) begin end
SELECT_IN_WEIGHTSelect in weight specification not allowedrandsequence() ... first : add := array[0]; endsequence
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 patternbit 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 allowedstd::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 identifierinstance, restrict, checker, table, cell, config, design
MULTIPLE_BINSSpecification of multiple bins dimension not allowedwildcard bins trans 2 = ({1'bx} => {1'bx});
ASSERTION_STATEMENT_ATTRIBUTE_INSTANCEExpecting attribute instance after block identifier # for procedural assertion statement(* cover_attribute *) block_identifier : cover property ...
SYSTEM_FUNCTION_ARGUMENTSMaximum number of arguments for # system function is #$typename(x, 39);
PARENTHESES_PATTERNEnclosing parentheses around pattern not allowedmatches (tagged VAL .c)
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);
MACRO_MULTILINE_DELIMITERUnexpected whitespace character(s) after macro multiline delimiter`define my_macro int i; \

int j;
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 #module mod;endmodule ... mod#(2) field;
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[0]
EVENT_CONTROL_EXPRESSIONExpecting singular data type for event control expression instead of type #initial begin

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

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 resolutionfunction 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 allowedvoid'(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'if (array == null) ...
NUMERIC_NULL_OPERATION# operator is undefined for numeric type # and 'null'if (sig == null) ...
STRING_OPERATIONExplicit 'string' cast required of # operand of type #string a; int b; if (a == b) ...
ENUM_ASSIGNMENTExplicit cast required when assigning # to variable # of enum type #enum_type a; a+=1;
ENUM_COMPARISONExplicit cast required when comparing # to variable # of enum type #enum_type a; if (a < 1) ...
ENUM_RETURNExplicit cast to enum type # required when returning #function enum_type foo(); return 1; endfunction
DIFFERENT_ENUMS_ASSIGNMENTExplicit cast required when assigning to enum type # from enum type #enum_type a; a = other_enum_literal;
DIFFERENT_ENUMS_COMPARISONExplicit cast required when comparing enum type # to enum type #enum_type a; if (a < other_enum_literal) ...
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 #import pkg::not_exported_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 conditionint array[2]; repeat (array) ...
REPEAT_CONDITION_STRINGString variable # not allowed as repeat conditionstring str; repeat (str) ...
REPEAT_CONDITION_UNPACKED_STRUCTUnpacked struct / union # not allowed as repeat conditionstruct { int x; } val; repeat (val) ...
INTERFACE_NAME_SELF_REFERENCEInterface type name # not allowed as self referencevirtual interface_name var = interface_name;
INTERFACE_SELF_REFERENCE# not allowed as reference to # instanceinterface_name::self;
INVALID_RAND_MODE_CALL'rand_mode' call not allowed for non-random variable #int x;

function foo();


PORT_DEFAULT_VALUEOuput / Inout / Ref port # cannot have a default value