-
Notifications
You must be signed in to change notification settings - Fork 48
A. Messages
The following sections list the warnings and error messages from
dmlc
, with some clarifications.
The messages are listed in alphabetical order; the corresponding tags
are shown within brackets, e.g., [WNDOC]
.
-
... [WSYSTEMC]
-
SystemC specific warnings
-
... [WWRNSTMT]
-
The source code contained a statement "
warning;
", which causes a warning to be printed. -
'X then Y' log level has no effect when the levels are the same [WREDUNDANTLEVEL]
-
X then Y
log level syntax has no effect when the first and subsequent levels are the same. -
Comparing negative constant to signed integer has a constant result [WNEGCONSTCOMP]
-
DML uses a special method when comparing an unsigned and signed integer, meaning that comparing a negative constant to an unsigned integer always has the same result, which is usually not the intended behaviour.
-
Outdated AST file: ... [WOLDAST]
-
A precompiled DML file has an old time-stamp. This may happen if a user accidentally edits a DML file from the standard library. A safe way to suppress the warning is to remove the outdated
.dmlast
file. -
Use of unsupported feature: ... [WEXPERIMENTAL]
-
This part of the language is experimental, and not yet officially supported. Code relying on the feature may break without notice in future releases.
-
Use of unsupported feature: ... [WEXPERIMENTAL_UNMAPPED]
-
This part of the language is experimental, and not yet officially supported. Code relying on the feature may break without notice in future releases.
-
deprecation: ... [WDEPRECATED]
-
This part of the language is deprecated, usually because the underlying support in Simics is deprecated.
-
duplicate event checkpoint names: ... [WDUPEVENT]
-
Two or more events will be checkpointed using the same name, which means that the checkpoint cannot be safely read back.
-
file has no version tag, assuming version 1.2 [WNOVER]
-
A DML file must start with a version statement, such as
dml 1.2;
-
implementation of ...() without 'is ...' is ignored by the standard library [WNOIS]
-
Many standard method overrides will only be recognized if a template named like the method is also instantiated. For instance, the method
set
in a field has no effect unless theset
template is instantiated. -
negative register offset: N [WNEGOFFS]
-
A negative integer expression is given as a register offset. Register offsets are unsigned 64-bit numbers, which means that a negative offset expression translates to a very large offset.
-
no 'desc' parameter specified for device [WNSHORTDESC]
-
No short description string was specified using the 'desc' parameter. (This warning is disabled by default.)
-
no documentation for '...' [WNDOC]
-
No documentation string was specified for the attribute. (This warning is disabled by default.)
-
no documentation for required attribute '...' [WNDOCRA]
-
No documentation string was specified for a required attribute.
-
overriding non-throwing DML 1.4 method with throwing DML 1.2 method [WTHROWS_DML12]
-
In DML 1.2, a method is by default permitted to throw an exception, while in DML 1.4, an annotation
throws
is required for that. So, if a method without annotations is ported to DML 1.4, it will no longer permit exceptions. If such method is overridden by a DML 1.2 file, then a non-throwing method is overridden by a potentially throwing method, which is normally a type error. However, this particular case is reduced to this warning. If an exception is uncaught in the override, then this will automatically be caught in runtime and an error message will be printed. -
potential leak of confidential information [WCONFIDENTIAL]
-
The object's name/qname is used as part of an expression in a context other than the log statement, which could potentially lead to the leak of confidential information.
-
prefer 'is' statement outside template braces, 'template ... is (x, y) {' [WTEMPLATEIS]
-
In a template with methods marked
shared
, it is recommended that other templates are instantiated on the same line -
shifting away all data [WSHALL]
-
The result of the shift operation will always be zero. (This warning is disabled by default.)
-
sizeof on a type is not legal, use sizeoftype instead [WSIZEOFTYPE]
-
The 'sizeof' operator is used on a type name, but expects an expression. Use the 'sizeoftype' operator for types.
-
the time value of type '...' is implicitly converted to the type '...' expected by the specified time unit '...'. [WTTYPEC]
-
The delay value provided to an
after
call is subject to implicit type conversion which may be unexpected for certain types. To silence this warning, explicitly cast the delay value to the expected type. -
unused implementation of DML 1.2 method ...; enclose in #if (dml_1_2) ? [WUNUSED_DML12]
-
A DML 1.4 file contains a method implementation that would override a library method in DML 1.2, but which is not part of the DML 1.4 library, because some methods have been renamed. For instance, implementing
read_access
in a register makes no sense in DML 1.4, because the method has been renamed toread_register
.If a DML 1.4 file contains common code that also is imported from DML 1.2 devices, then it may need to implement methods like
read_access
to get the right callbacks when compiled for DML 1.2. Such implementations can be placed inside#if (dml_1_2) { }
blocks to avoid this warning. -
unused parameter ... contains ... [WREF]
-
An unused parameter refers to an object that has not been declared.
This warning message will be replaced with a hard error in future major versions of Simics.
-
unused: ... [WUNUSED]
-
The object is not referenced anywhere. (This warning is disabled by default.; it typically causes many false warnings.)
-
unused: ... methods are not called automatically for ... objects in ... [WUNUSEDDEFAULT]
-
The object is not referenced anywhere but it matches a name of an object automatically referenced in another scope. This is the same as WUNUSED but only for known common errors and it will never be emitted if WUNUSED is enabled.
The messages are listed in alphabetical order; the corresponding tags
are shown within brackets, e.g., [ENBOOL]
.
-
... [EERRSTMT]
-
The source code contained a statement "
error;
", which forces a compilation error with the given message, or the standard message "forced compilation error in source code". -
... in template ... does not belong to the template type [ENSHARED]
-
If a template provides an object that is not accessible from shared methods, such as an untyped parameter or a non-shared method, then that object's name is reserved within the scope of the shared method. I.e., if a shared method tries to access a symbol that isn't accessible, then ENSHARED is reported, even before looking for the symbol in the global scope. Section x describes which template symbols are accessible from a shared method.
-
'...' has no member named '...' [EMEMBER]
-
Attempt to access a nonexisting member of a compound data structure.
-
'.len' cannot be used with variable-length arrays [EVLALEN]
-
.len cannot be used with variable-length arrays
-
Ambiguous invocation of default implementation [EAMBDEFAULT]
-
A method may not invoke its default implementation if multiple methods are overridden, and the template inheritance graph is insufficient to infer that one default implementation overrides the others. See section x for details.
-
Cannot declare '...' variable in an inline method [ESTOREDINLINE]
-
You cannot declare session or saved variables in methods marked with 'inline'
-
DML version ... does not support API version ... [ESIMAPI]
-
The DML file is written in a too old version of DML. Use the
--simics-api
option to use a sufficiently old Simics API. -
Declaration would result in conflicting attribute name [EATTRCOLL]
-
This error is signalled if two DML declarations would result in two Simics attributes being registered with the same name.
This most commonly happens when an attribute name is a result of the object hierarchy, and there is another object named similarly. For example, if a bank contains one register named
g_r
and a groupg
containing a register namedr
. -
Instantiating template ... requires abstract ... ... to be implemented [EABSTEMPLATE]
-
If a template has any abstract methods or parameters, they must all be implemented when instantiating the template.
-
abstract method ... overrides existing method [EAMETH]
-
An abstract method cannot override another method.
-
an anonymous ... cannot implement interfaces [EANONPORT]
-
An
implement
definition can only exist in a port or bank that has a name. -
array index out of bounds [EOOB]
-
The used index is outside the defined range.
-
array range must start at 0 [EZRANGE]
-
An array index range must start at zero.
-
array size is less than 1 [EASZR]
-
An array must have at least one element.
-
array upper bound is not a constant integer: ... [EASZVAR]
-
The size of an array must be a constant integer.
-
assignment to constant [ECONST]
-
The lvalue that is assigned to is declared as a
const
and thus can't be assigned to. -
attempt to override non-default method '...' [EDMETH]
-
A method can only be overridden if it is declared as
default
-
attempt to override non-shared method ... with shared method [ETMETH]
-
A shared method cannot override a non-shared method
-
attribute has no get or set method [EANULL]
-
An attribute must have a set or a get method to be useful.
-
attribute type undefined: ... [EATYPE]
-
Either the
attr_type
or thetype
parameter of the attribute must be specified. -
bad declaration of automatic parameter '...' [EAUTOPARAM]
-
Some parameters are predefined by DML, using the
auto
keyword. Such parameters may only be declared by the standard library, and they may not be overridden. -
bit range of field '...' outside register boundaries [EBITRR]
-
The bit range of a field can only use bits present in the register.
-
bit range of field '...' overlaps with field '...' [EBITRO]
-
The fields of a register must not overlap.
-
bitslice size of ... bits is not between 1 and 64 [EBSSIZE]
-
Bit slices cannot be larger than 64 bits.
-
bitslice with big-endian bit order and uncertain bit width [EBSBE]
-
A big-endian bit slice can only be done on an expression whose type is explicitly defined, such as a local variable or a register field.
-
break is not possible here [EBREAKU]
-
A
break
statement cannot be used in aforeach
orselect
statement. -
cannot assign to inlined parameter: '...' [EASSINL]
-
The target of the assignment is a method parameter that has been given a constant or undefined value when inlining the method.
-
cannot assign to this expression: '...' [EASSIGN]
-
The target of the assignment is not an l-value, and thus cannot be assigned to.
-
cannot declare a multi-dimensional ... in simics 5 [EMDOBJECT]
-
Bank arrays and port arrays cannot be multi-dimensional in simics 5
-
cannot define both 'allocate_type' parameter and local data objects [EATTRDATA]
-
Specifying
allocate_type
and using 'data' declarations in the same attribute object is not allowed. -
cannot export this method [EEXPORT]
-
Can only export non-inline, non-shared, non-throwing methods declared outside object arrays.
-
cannot find file to import: ... [EIMPORT]
-
The file to imported could not be found. Use the
-I
option to specify additional directories to search for imported files. -
cannot import file containing device declaration [EDEVIMP]
-
Source files that are used with
import
directives may not containdevice
declarations. -
cannot use a register with fields as a value: ... [EREGVAL]
-
When a register has been specified with explicit fields, you have to use the
get
andset
methods to access the register as a single value. -
cannot use an array as a value: '...' [EARRAY]
-
A whole array cannot be used as a single value.
-
cannot use endian integer as argument type in declaration [EEARG]
-
Function and method arguments in declarations cannot be of endian integer type.
-
cannot use variable index in a constant list [EAVAR]
-
Indexing into constant lists can only be done with constant indexes.
-
checkpointable attribute missing set or get method [EACHK]
-
An attribute must have set and get methods to be checkpointable. This attribute has neither, and the 'configuration' parameter is either "required" or "optional".
-
circular dependency in parameter value [ERECPARAM]
-
The value of a parameter may not reference the parameter itself, neither directly nor indirectly.
-
conditional 'in each' is not allowed [ECONDINEACH]
-
It is not permitted to have an
in each
statement directly inside anif
conditional. -
conditional parameters are not allowed [ECONDP]
-
It is not permitted to declare a parameter directly inside an
if
conditional. -
conditional templates are not allowed [ECONDT]
-
It is not permitted to use a template directly inside an
if
conditional. -
conflicting default definitions for method '...' [EDDEFMETH]
-
If a method has two default implementations, then at least one of them must be defined in a template.
-
conflicting definitions of ... when instantiating ... and ... [EAMBINH]
-
If a method or parameter has multiple definitions, then there must be a unique definition that overrides all other definitions.
-
const qualifier discarded [EDISCONST]
-
A pointer to a constant value has been assigned to a pointer to a non-constant.
-
continue is not possible here [ECONTU]
-
A
continue
statement cannot be used in aforeach
orselect
statement. -
cyclic import [ECYCLICIMP]
-
A DML file imports itself, either directly or indirectly.
-
cyclic template inheritance [ECYCLICTEMPLATE]
-
A template inherits from itself, either directly or indirectly.
-
duplicate bank function number: N [EDBFUNC]
-
The device contains two differently-named banks that use the same function number.
-
duplicate definition of variable '...' [EDVAR]
-
A local variable has more than one definition in the same code block.
-
duplicate method parameter name '...' [EARGD]
-
All parameter names of a method must be distinct.
-
expression may not depend on the index variable ... [EIDXVAR]
-
Expressions that are evaluated statically to constants cannot have different values for different elements in a register array. This includes, for instance, the
allocate
parameter in registers and fields, and object-levelif
statements. -
file not found [ENOFILE]
-
The main input file could not be found.
-
heterogeneous bitsize in field array [EFARRSZ]
-
The bit width must be identical across the elements of a field array.
-
illegal 'after' call to '...': ... [EAFTER]
-
An illegal
after (..) call ..
was made. A method called this way may only have serializable input parameters, and may not have any output parameters. -
illegal attribute name: ... [EANAME]
-
This name is not available as the name of an attribute, since it is used for an automatically added attribute.
-
illegal bitfields definition: ... [EBFLD]
-
A
bitfield
declaration must have an integer type that matches the width of the field. -
illegal bitorder: '...' [EBITO]
-
The specified bit-order is not allowed.
-
illegal bitslice operation [EBSLICE]
-
A bitslice operation was attempted on an expression that is not an integer.
-
illegal cast to '...' [ECAST]
-
The cast operation was not allowed. It is illegal to cast to void.
-
illegal comparison; mismatching types [EILLCOMP]
-
The values being compared do not have matching types.
-
illegal function application of '...' [EAPPLY]
-
The applied value is not a function.
-
illegal increment/decrement operation [EINC]
-
An increment or decrement operation can only be performed on simple lvalues such as variables.
-
illegal interface method reference: ... [EIFREF]
-
Interface function calls must be simple references to the method.
-
illegal layout definition: ... [ELAYOUT]
-
The type of a member of a
layout
declaration must be an integer or bitfield with a bit width that is a multiple of 8, or another layout. -
illegal operands to binary '...' [EBINOP]
-
One or both of the operands have the wrong type for the given binary operator.
-
illegal pointer type: ... [EINTPTRTYPE]
-
Pointer types that point to integers with a bit width that is not a power of two are not allowed.
-
illegal register size for '...' [EREGISZ]
-
The specified register size is not allowed. Possible values are 1-8.
-
illegal use of void type [EVOID]
-
The type
void
is not a value, and thus cannot be used as the type of e.g. a variable or struct member -
illegal value for parameter '...' [EPARAM]
-
The parameter is not bound to a legal value.
-
incompatible array declarations: ... [EAINCOMP]
-
The array has been declared more than once, in an incompatible way.
-
incompatible method definitions: ... [EMETH]
-
The default implementation is overridden by an implementation with different input/output parameters.
-
incompatible version (...) while compiling a ... device [EVERS]
-
A device declared to be written in one DML language version tried to import a file written in an incompatible language version.
-
invalid data initializer: ... [EDATAINIT]
-
An invalid initializer was detected. The error message provides the detailed information.
-
invalid expression: '...' [EINVALID]
-
The expression does not produce a proper value.
-
invalid log type: '...' [ELTYPE]
-
Log-statement type must be one of
info
,error
,spec_viol
, andunimpl
. -
invalid name parameter value: '...' [ENAMEID]
-
The name parameter does not follow identifier syntax.
-
invalid override of non-default declaration ... [EINVOVER]
-
Only default declarations of parameters can be overridden.
-
invalid upcast, ... not a subtemplate of ... [ETEMPLATEUPCAST]
-
When casting to a template type, the source expression must be either an object implementing the template, or an expression whose type is a subtemplate of the target type.
-
log level must be an integer between 1 and N [ELLEV]
-
The log level given in a log statement must be an integer between 1 and 4. Or 1 and 5 for a subsequent log level (
then ...
). -
malformed format string: unknown format at position N [EFORMAT]
-
The log-statement format string is malformed.
-
malformed switch statement: ... [ESWITCH]
-
A switch statement must start with a
case
label, and there may be at most onedefault
label which must appear after allcase
labels -
method return type declarations may not be named: ... [ERETARGNAME]
-
In DML 1.4, the output arguments of a method are anonymous
-
missing device declaration [EDEVICE]
-
The main source file given to the DML compiler must contain a
device
declaration. -
missing return statement in method with output argument [ENORET]
-
If a method has output arguments, then control flow may not reach the end of the method. Either an explicit value must be returned in a return statement, or the execution must be aborted by an exception or assertion failure. Note that DMLC's control flow analysis is rather rudimentary, and can issue this error on code that provably will return. In this case, the error message can be silenced by adding
assert false;
to the end of the method body. -
more than one output parameter not allowed in interface methods [EIMPRET]
-
Methods within an
interface
declaration may have only have zero or one output parameter. -
name collision on '...' [ENAMECOLL]
-
The name is already in use in the same scope.
-
negative size (N < N) of bit range for '...' [EBITRN]
-
The size of the bit range must be positive. Note that the [msb:lsb] syntax requires that the most significant bit (msb) is written to the left of the colon, regardless of the actual bit numbering used.
-
no assignment to parameter '...' [ENPARAM]
-
The parameter has been declared, but is not assigned a value or a default value.
-
no default implementation [ENDEFAULT]
-
The default implementation of a method was invoked, but there was no default implementation.
-
no return type [ERETTYPE]
-
The type of the return value (if any) must be specified for methods that implement interfaces.
-
no type for ... parameter '...' [ENARGT]
-
Methods that are called must have data type declarations for all their parameters. (Methods that are only inlined do not need this.)
-
non-boolean condition: '...' of type '...' [ENBOOL]
-
Conditions must be properly boolean expressions; e.g., "
if (i == 0)
" is allowed, but "if (i)
" is not, ifi
is an integer. -
non-constant element in list [ECLST]
-
Lists may only contain constants.
-
non-constant expression: ... [ENCONST]
-
A constant expression was expected.
-
non-constant parameter, or circular parameter dependencies: '...' [EVARPARAM]
-
The value assigned to the parameter is not a well-defined constant.
-
non-constant strings cannot be concatenated using '+' [ECSADD]
-
Non-constant strings cannot be concatenated using
+
. -
not a list: ... [ENLST]
-
A list was expected.
-
not a method: '...' [ENMETH]
-
A method name was expected. This might be caused by using
call
orinline
on something that counts as a C function rather than a method. -
not a pointer: ... (...) [ENOPTR]
-
A pointer value was expected.
-
not a value: ... [ENVAL]
-
Only some objects can be used as values directly. An attribute can only be accessed directly as a value if it has been declared using the
allocate_type
parameter. -
nothing to break from [EBREAK]
-
A
break
statement can only be used inside a loop or switch construct. -
nothing to continue [ECONT]
-
A
continue
statement can only be used inside a loop construct. -
object expected: ... [ENOBJ]
-
A reference to an object was expected.
-
object is not allocated at run-time: ... [ENALLOC]
-
An object which is not allocated at run-time cannot be referenced as a run-time value.
-
operand of '...' is not an lvalue [ERVAL]
-
The operand of
sizeof
,typeof
and&
must be a lvalue. -
overlapping registers: '...' and '...' [EREGOL]
-
The registers are mapped to overlapping address ranges.
-
passing const reference for nonconst parameter ... in ... [ECONSTP]
-
C function called with a pointer to a constant value for a parameter declared without const in the prototype.
-
recursive inline of ... [ERECUR]
-
Methods may not be inlined recursively.
-
recursive type definition of ... [ETREC]
-
The definition of a structure type can not have itself as direct or indirect member.
-
reference to unknown object '...' [EREF]
-
The referenced object has not been declared.
-
right-hand side operand of '...' is zero [EDIVZ]
-
The right-hand side of the given / or % operator is always zero.
-
shift with negative shift count: '... [ESHNEG]
-
The right-hand side operand to a shift operator must not be negative.
-
struct declaration not allowed in a ... [EANONSTRUCT]
-
Declarations of new structs are not permitted in certain contexts, such as method arguments,
new
expressions,sizeoftype
expressions andcast
expressions. -
struct or layout with no fields [EEMPTYSTRUCT]
-
A struct or layout type must have at least one field. This restriction does not apply to structs declared in a
extern typedef
. -
syntax error...... [ESYNTAX]
-
The code is malformed.
-
this object is not allowed here [ENALLOW]
-
Many object types have limitations on the contexts in which they may appear.
-
trying to get a member of a non-struct: '...' of type '...' [ENOSTRUCT]
-
The left-hand side operand of the
.
operator is not of struct type. -
trying to index something that isn't an array: '...' [ENARRAY]
-
Indexing can only be applied to arrays, integers (bit-slicing), and lists.
-
uncaught exception [EBADFAIL]
-
An exception is thrown in a context where it will not be caught.
-
uncaught exception in call to DML 1.2 method '...' [EBADFAIL_dml12]
-
If a DML 1.2 method lacks a
nothrow
annotation, and a non-throwing DML 1.4 method calls it, then DMLC will analyze whether the method call can actually cause an exception. If it can, this error is reported; if not, the call is permitted.For this error, a 1.2 method counts as throwing if it throws an exception, or calls a
throws
marked 1.4 method, or (recursively) if it invokes a method that counts as throwing. A call or throw statement inside atry
block does not cause the method to count as throwing. The methodsattribute.set
,bank.read_access
andbank.write_access
count as throwing even if they don't throw.This error is normally reported while porting common DML 1.2 code to DML 1.4: most 1.2 methods are not meant to throw exceptions, and when converted to DML 1.4 this becomes a strict requirement unless the method is annotated with the
throws
keyword. The remedy for this error message is normally to insert atry
block around some call along the throwing call chain, with acatch
block that handles the exception gracefully. Thetry
block should usually be as close as possible to thethrow
in the call chain. -
undefined register size for '...' [EREGNSZ]
-
All registers must have a specified constant size.
-
undefined value: '...' [EUNDEF]
-
Caused by an attempt to generate code for an expression that contains the
undefined
value. -
unknown identifier: '...' [EIDENT]
-
The identifier has not been declared anywhere.
-
unknown interface type: ... [EIFTYPE]
-
The interface datatype is unknown.
-
unknown template: '...' [ENTMPL]
-
The template has not been defined.
-
unknown type of expression [ENTYPE]
-
This expression has an unknown type.
-
unknown type: '...' [ETYPE]
-
The data type is not defined in the DML code.
-
unserializable type: ... [ESERIALIZE]
-
Some complex types, in particular most pointer types, cannot be automatically checkpointed by DML, and are therefore disallowed in contexts such as
saved
declarations. -
value of parameter ... is not yet initialized [EUNINITIALIZED]
-
Some parameters that are automatically supplied by DML cannot be accessed in early stages of compilation, such as in object-level if statements.
-
variable or field declared ... [EVARTYPE]
-
A variable has been declared with a given type but the type is not acceptable.
-
wrong number of ... arguments [EARG]
-
The number of input/output arguments given in the call differs from the method definition.
-
wrong number of arguments for format string [EFMTARGN]
-
The log-statement has too few or too many arguments for the given format string.
-
wrong number of return value recipients: Expected N, got N [ERETLVALS]
-
The number of return value recipients differs from the number of values the called method returns.
-
wrong number of return values: Expected N, got N [ERETARGS]
-
The number of return values in a return statement must match the number of outputs in the method.
-
wrong type [EBTYPE]
-
An expression had the wrong type.
-
wrong type for '...' operator [EINCTYPE]
-
The prefix and postfix increment/decrement operators can only be used on integer and pointer expressions.
-
wrong type for argument N of format string ('...') [EFMTARGT]
-
Argument type mismatch in a log-statement format string.
-
wrong type for parameter ... in ... call [EPTYPE]
-
The data type of the argument value given for the mentioned method or function parameter differs from the function prototype.
-
wrong type in ... parameter '...' when ... '...' [EARGT]
-
The data type of the argument value given for the mentioned method parameter differs from the method definition.
-
wrong type in assignment [EASTYPE]
-
The target of an assignment can't store the value given in the source, because they are of different types.