diff --git a/MODULEINFO b/MODULEINFO index d2a1cee7..98f52ff0 100644 --- a/MODULEINFO +++ b/MODULEINFO @@ -85,7 +85,10 @@ Group: dmlc Require-tokens: public Release-notes: src/tools/dmlc/RELEASENOTES.docu, src/tools/dmlc/RELEASENOTES-1.2.docu, - src/tools/dmlc/RELEASENOTES-1.4.docu + src/tools/dmlc/RELEASENOTES-1.4.docu, + src/tools/dmlc/RELEASENOTES.md, + src/tools/dmlc/RELEASENOTES-1.2.md, + src/tools/dmlc/RELEASENOTES-1.4.md Make: dmlc @dmlc-lib @dml-1.2-reference-manual diff --git a/RELEASENOTES-1.2.md b/RELEASENOTES-1.2.md new file mode 100644 index 00000000..29043b49 --- /dev/null +++ b/RELEASENOTES-1.2.md @@ -0,0 +1,75 @@ + + + +# Device Modeling Language (DML) 1.2 + +- `major 6` +- `note 6` Fixed a bug that caused a crash on the expression `1 << 64` (fixes HSD-1306575446). +- `release 6 6012` +- `note 6` The `read` and `write` templates have been moved from utility.dml to always be included into 1.2 DML files. Additionally they are now inherited by all registers and fields by default. If you now see a name clash on `read` or `write` templates, you will need to rename your user-code defined templates. +- `release 6 6018` +- `note 6` The `get` and `set` methods are now shared in attributes inheriting from the DML 1.4 utility templates (`bool_attr` etc.). +- `release 6 6019` +- `note 6` The `import` statement has been changed: If the path starts with `./`, the path is now interpreted relative to the directory of the importing file (fixes HSD-2209506845). +- `note 6` Fixed a bug that caused a bad warning and incorrect code when the operand to `sizeof` is an identifier that can be resolved both to a value and to a type. +- `release 6 6024` +- `note 6` The project build environment is now sensitive to an environment variable `DMLC_PORTING_TAG_FILE`, which should be a filename. When defined, DMLC will create the file if it doesn't already exists, and then append data to the end of the file, containing machine-readable instructions on how to port the device to DML 1.4. The typical use case is to set this variable when building one or more modules, and feed the resulting file as input to the `port-dml.py` script. The -P command-line argument has also been changed: it now takes a filename argument, and can be used without -T. +- `release 6 6026` +- `note 6` Changed the order in which registers are being reset upon hard\_reset or soft\_reset, and the ordering of the parameters `mapped_registers` and `unmapped_registers`. The order is still considered undefined, but in practice it now changes less randomly, and is equal on Simics 5 and Simics 6. +- `note 6` Fixed a bug in nested `foreach` loops when traversing register arrays inside bank arrays (fixes HSD-1809370911). +- `release 6 6031` +- `note 6` It is now permitted to use the `nothrow` annotation on a method override even if the overridden method does not. This is sometimes useful while porting a large code base to DML 1.4, because it allows `get` and `set` methods in common code to be declared as non-throwing, which is required by the DML 1.4 standard library. +- `note 6` Fixed a language inconsistency: When DML 1.4 code contains an `if` statement inside a method body, and this code is imported from a DML 1.2 file, then the statement used to be interpreted as a DML 1.2 `if` statement; it is now interpreted as a DML 1.4 `if` statement as expected. The difference is that if the `if` condition is constant, then DML 1.2 would discard the dead branch without checking for errors, while 1.4 evaluates both the live and dead branch. This change can give new compile errors in existing code; in this case, you can normally resolve the problem by changing `if` to `#if`. +- `release 6 6036` +- `note 6` Field arrays are now fully supported and documented, and don't give compile warnings. +- `note 6` Fixed a DMLC crash when generating porting tags. +- `note 6` Add porting rule for uses of 1-bit fields as booleans; converts `if (f)` into `if (f != 0)`. +- `release 6 6041` +- `note 6` Fixed a problem with the template `custom_time_event` from `dml12-compatibility.dml`. +- `release 6 6048` +- `note 6` Applying bitwise not (`~`) on a boolean value now gives a compile error. Previously it resulted in an unconditionally true value, which is not what you want. +- `release 6 6049` +- `note 6` Fixed an issue with using endian integers as arguments in pointer arithmetic. +- `note 6` Fixed an issue preventing assignment from const layout-typed pointers. +- `release 6 6050` +- `note 6` Taking the address of a bitfield type in a layout will now correctly give you a pointer of the bitfield type. +- `release 6 6053` +- `note 6` Fixed a crash on methods marked `nothrow` and multiple return arguments, returning a typed template or struct type (fixes HSD-18012036595). +- `note 6` The file `dml12-compatibility.dml` now adds a parameter `val` to `field` objects. +- `release 6 6054` +- `note 6` Unmapped registers names are now properly anonymized according to \_confidentiality (fixes HSD-1508117636). +- `release 6 6059` +- `note 6` Fixed a regression in use cases where `if` has a constant condition, and the taken branch consists of a variable declaration. I.e., if the code `if (true) local int x;` appears in a scope, then the variable `x` is now added to that scope (fixes HSD-18013028128). +- `release 6 6066` +- `note 6` If a `static` variable is declared within a method declared under an object array, it will now result in a separate instance of the variable for each instance of the containing object (fixes SIMICS-13738). +- `release 6 6079` +- `note 6` It is no longer possible to override the `loggroup` parameter inside a `group` object. +- `note 6` Added documentation of the `nothrow` annotation for methods (fixes HSD-18012035545). +- `release 6 6082` +- `note 6` Fixed a compile error when a DML 1.2 device imports a DML 1.4 file that declares a `saved` variable inside a register or field (fixes SIMICS-17201). +- `release 6 6096` +- `note 6` Fixed an issue causing assertion error when accessing the register info of a 1.2 multi-dimensional bank array (fixes SIMICS-17308). +- `release 6 6100` +- `note 6` Added the `--state-change-dml12` flag, allowing the use of an incomplete version of state change notifiers in DML 1.2 devices (fixes SIMICS-17952). +- `release 6 6122` +- `note 6` Fixed an issue when using the `--state-change-dml12` flag together with the `--split-c-file` flag (fixes SIMICS-17975). +- `release 6 6124` +- `note 6` Fixed a few issues where confidential information could be leaked through non-confidential children of confidential objects. Specifically, these issues occurred with event objects belonging to confidential registers, `after` calls to methods belonging to confidential objects, and accessing `qname` of non-confidential children belonging to confidential objects. + + A warning is now emitted when `qname` of a non-confidential child of a confidential object is used outside of `log` statements (fixes SIMICS-18428). +- `release 6 6132` +- `note 6` Like in DML 1.4, objects of type `port` can now be placed inside `group` objects. However, `bank` objects are still restricted to top level (fixes SIMICS-19009). The new object type `subobject` is not directly accessible in DML 1.2, but it is permitted to import DML 1.4 code that declares `subobject` objects. +- `release 6 6149` +- `note 6` Add porting rule for uses of `undefined` as register offsets; replaces such uses with `unmapped_offset` (fixes SIMINT-1486). +- `release 6 6158` +- `note 6` Fixed issue where certain parameters defined in DML 1.4 modules couldn't be referenced within DML 1.2 modules without the use of `$`. +- `release 6 6160` +- `note 6` Add porting rule to convert the `int1` type into `uint1` in DML 1.4, which better resembles how the type works in 1.2. +- `release 6 6213` +- `note 6` Improve porting rules for method return values: In some simple cases, avoid storing the method's return value in an intermediate local variable. +- `release 6 6215` +- `note 6` If a bank declared with `use_io_memory=false` in a DML 1.4 file is imported from a DML 1.2 device, using the `dml12-compatibility.dml` library, then a call to the `transaction_access` method will now trigger a proper bank access. Also, if a bank uses the `dml12_compat_io_memory_access` template, then overrides of the `transaction_access` method will be honored. This simplifies future transition to the Simics 7 API. +- `release 6 6218` \ No newline at end of file diff --git a/RELEASENOTES-1.4.md b/RELEASENOTES-1.4.md new file mode 100644 index 00000000..64dfd534 --- /dev/null +++ b/RELEASENOTES-1.4.md @@ -0,0 +1,315 @@ + + +# Device Modeling Language (DML) 1.4 + +- `major 6` +- `note 6` Initial release of DML version 1.4. The new language version is documented in the *DML 1.4 reference manual* document. Some highlights: + - **Better compilation performance** + 2-3 times faster compile for devices with large register banks + - **Improved reset support** + The reset mechanism in 1.4 is not hard-coded, and can be adapted to different reset flows + - **Templates as types** + You can pass around references to banks/registers/fields etc in variables + - **Multiple levels of overrides** + Methods and parameters can be overridden any number of times. In 1.2, this is often prevented by standard library legacy. + - **Syntax simplification** + Many adjustments to improve readability; for instance, removal of `$` and C-like method syntax + - **Standard library API simplification** + Clearer API, easier to understand + - **Updated language semantics** + More consistent and well-specified behaviour of method bodies and expressions, providing more predictable model behaviour + + +- `release 6 6012` +- `note 6` Export declarations are now available as replacements for `method extern`. +- `release 6 6013` +- `note 6` The dml12-compatibility.dml library file is now available. This file should be included from DML 1.4 files that use or override templates defined in `dml-builtins.dml` and are meant to be backwards-compatible with DML 1.2 devices. +- `note 6` Templates can now override `get` or `set` method templates and still be inherited by both registers and fields. +- `release 6 6018` +- `note 6` Fixed two problems where devices with a very large number of registers compiles slowly (fixes SIMICS-13802 and SIMICS-13803. +- `release 6 6019` +- `note 6` The `import` statement has been changed: If the path starts with `./` or `../`, the path is now interpreted relative to the directory of the importing file (fixes HSD-2209506845). +- `note 6` Fixed a problem where parameters defined in global scope in DML 1.4 (typically auto-converted from a DML 1.2 `constant`) had to be accessed with `$` when referenced from a parameter in a DML 1.2 file. +- `release 6 6024` +- `note 6` The `read_unmapped_bits` and the `write_unmapped_bits` methods are now available to be overridden for registers. This can be used to customize behaviour of registers with fields that do not cover all register bits. +- `note 6` Fixed bug in dml-lib "common.dml" where `pci_system_error` could not be called. +- `release 6 6037` +- `note 6` Fixed a bug that sometimes caused a crash when calling the default implementation of a shared method. +- `note 6` Fixed a bug that caused unused goto labels in generated C code. +- `note 6` Fixed a bug that caused DMLC to ignore compile errors in the right operands of the `&&` and `||` operators. For instance, in `a && b`, and `a` resolves to constant false, and `b` is nowhere defined, then DMLC would previously silently evaluate the expression to false; now it will give a proper error message. Expressions like `cond_is_defined && cond()`, where `cond_is_defined` is a constant parameter, can be rewritten as `pred_is_defined #? pred() + #: false`. +- `release 6 6041` +- `note 6` The `get` and `set` methods are now overrideable in bank objects. +- `release 6 6042` +- `note 6` Fixed a bug in how log group names are generated. +- `release 6 6044` +- `note 6` In `switch` statements, `case` labels are now permitted inside `#if` blocks (fixes HSD-14011267833). +- `note 6` Fixed an issue where the `++` and `--` operators could not be applied to pointers. +- `note 6` Added compile warnings when trying to override a library method that was called in DML 1.2 but is ignored in DML 1.4. +- `release 6 6046` +- `note 6` Obtaining the address of a member of a layout is now supported (fixes SIMICS-15381). +- `note 6` DMLC now gives an explicit error message on name collision between two members of a `layout` or `bitfields` (fixes SIMICS-9088). +- `release 6 6049` +- `note 6` Fixed issue with passing endian integers as arguments to shared methods. +- `release 6 6051` +- `note 6` The `get` method in `bank` objects is now declared `throws`; a read outside registers causes an exception like in DML 1.2, causing the inquiry access to fail. +- `note 6` The parameters `partial` and `overlapping` in banks are now `true` by default. +- `release 6 6052` +- `note 6` Field objects now have a `val` member. This is currently a bitslice into the field's bits within the parent register's storage. The .val parameter can be read, and it can be written using assignment (`=`); however, the operators `--` and `++` do not work yet. Also, `.val` cannot be accessed from a shared method. +- `note 6` Fix a bug that caused DMLC to crash in declarations of field objects in files with a `bitorder be` declaration (fixes SIMINT-1275). +- `release 6 6053` +- `note 6` DMLC will now give you a better error in some cases where a typed template parameter has an initializer that cannot be evaluated in a static context. +- `note 6` The experimental `bank_obj` template is now available in the `utility` file, providing a single shared method `bank_obj` which returns the bank configuration object of a bank. +- `release 6 6056` +- `note 6` The formatting of the log message output in the default implementation of partial register reads and write has been improved. +- `release 6 6059` +- `note 6` You can now access `.len` on lists and sequences to obtain the number of elements they contain. This expression is constant for lists and non-constant for sequences. +- `note 6` Reverted a change that allowed DMLC to provide better error messages when typed parameters had non-static initializers since it was overly conservative in some cases. +- `release 6 6060` +- `note 6` Removed the syntax for goto labels (`label:`). `goto` statements are already forbidden in DML 1.4, so goto labels are useless. `case` and `default` labels in `switch` blocks are still allowed. +- `note 6` If the condition of a `while` loop is statically evaluated to false, then faulty code in the loop body can now cause compile errors. Previously the loop body was silently discarded. +- `release 6 6061` +- `note 6` Removed incorrect documentation of the deprecated 'banks' parameter. +- `release 6 6075` +- `note 6` `session` variable declarations are no longer permitted within methods marked with `inline`. +- `note 6` `saved` variable declarations are now available. These can be used to declare variables that behave similarly to `session` variables, but that are automatically checkpointed (fixes SIMICS-7031). +- `note 6` If a `static` variable is declared within a method declared under an object array, it will now result in a separate instance of the variable for each instance of the containing object (fixes SIMICS-13738). +- `note 6` Fixed a bug that caused a crash in `print-device-regs` and related commands, when inspecting a function-mapped bank array in a DML 1.4 device (fixes HSD-1508646546). +- `release 6 6079` +- `note 6` If a method argument has mismatching type in an override, then an error will now be reported (fixes SIMICS-9337). +- `release 6 6080` +- `note 6` DMLC will now report errors for references to undefined type names in some rare cases that previously were ignored, such as unused typedefs and functions imported from C using `extern` (fixes SIMICS-16187). +- `note 6` DMLC will now report an error for methods in `implement` blocks, if the method's return type does not match the interface method. Previously, only input arguments were typechecked in interface methods +- `release 6 6081` +- `note 6` The parameter `connect` now accepts the values `"none"` and `"pseudo"`, just like attributes and registers do. +- `release 6 6082` +- `note 6` Added a template `init_as_subobj` which can be used on `connect` objects to make it instantiate a subobject automatically (fixes SIMICS-16131). +- `release 6 6084` +- `note 6` Added `saved` variables declared within templates to the template type. +- `note 6` Added parameter `unmapped_offset` which makes a register unmapped. +- `release 6 6095` +- `note 6` Fixed typo in documentation of `miss_pattern_bank` template. +- `release 6 6102` +- `note 6` Corrected documentation in reference manual regarding `read_bits` and `write_bits` methods. +- `note 6` An illegal arithmetic operation, such as a division by zero or negative shift, no longer crashes the simulation. Instead it is reported as a critical error, and evaluates to zero (fixes SIMICS-16639). +- `release 6 6104` +- `note 6` You can now use the syntax `X then Y` for the level in log statements to have the first log happen on log level `X` and subsequent logs happen on level `Y` (fixes SIMICS-13513). +- `note 6` Fixed an issue where multiple registers or fields instantiating `read_only` or similar templates from `utility.dml` would switch log-level at the same time (fixes SIMICS-7025). +- `release 6 6119` +- `note 6` You can now access `.len` on constant-sized object or value arrays to obtain the number of elements they contain. These expressions are constant (fixes SIMICS-13114). +- `release 6 6123` +- `note 6` `after` statements now support cycles as a unit of time (fixes SIMICS-8798). +- `release 6 6127` +- `note 6` The compiler now explicitly forbids using the `export` statement on a method with multiple output parameters. +- `note 6` Various improvements to the reference manual has been made. +- `release 6 6129` +- `note 6` It is no longer an error to instantiate a non-existing template from within a dead branch of an `#if` block. +- `release 6 6131` +- `note 6` Two values of the same template type can now be compared for equality, and are equal when they reference the same object (fixes SIMICS-6998). + + The internal representation of values of template types has been changed. It is no longer allowed to cast such values to integer or pointer types. +- `note 6` Attributes that do not define *either of* the `documentation` parameter or the `desc` parameter are now considered internal by default. Register-attributes are internal by default, regardless if they define `documentation` or `desc`. This can be changed by explicitly overriding the `internal` parameter of the register or attribute. +- `note 6` Fixed an issue where a log statement could fail to switch log levels when used within a shared method and called through trait references. +- `note 6` Fixed an issue where a log statement could incorrectly switch log levels when used within a method declared within an object array. +- `note 6` Writes outside fields in a register will now by default log one `spec-violation` message on log level 1 on first such write, and no logging on further such writes. +- `release 6 6133` +- `note 6` Added a template `map_target` which can be used on `connect` objects to expose methods for reading and writing data from/to the connected object. +- `note 6` The device info XML file is no longer needed by DML 1.4 devices. A dummy XML file is still created to avoid packaging problems. +- `note 6` Optimized the DML-provided implementation of the `register_info` and the `number_of_registers` methods of the `register_view` interface (fixes SIMICS-18427). +- `release 6 6135` +- `note 6` Banks that use the transaction interface (the parameter `use_io_memory` is `false`) now handle accesses that are bigger than 8 bytes. +- `release 6 6137` +- `note 6` Added simple C99-style designated initializers, which may be used together with `struct`-like types (fixes SIMICS-17252). For example, the following is now supported: + ``` + local size_t size = get_size(); + local buffer_t buf = {.len = size, .data = new uint8[size]}; + + ``` + +- `release 6 6139` +- `note 6` Added an optimization that reduces the compile time for devices with huge register arrays (fixes SIMICS-7038). +- `note 6` Added support for cancelling events posted via `after` statement through the use of the `cancel_after()` method, provided as part of the `object` template (fixes SIMICS-17930). +- `release 6 6143` +- `note 6` `break` may now be used within `foreach` statements (fixes SIMICS-18719). +- `release 6 6145` +- `note 6` When declaring an object array, any dimension size specification may now be omitted if already defined through a different declaration of the same object array (fixes HSD-22014423596). Omission is done by specifying `...` instead of the dimension size; for example, the following is now supported: + ``` + group g[i < 4][j < ...] { } + group g[i < ...][j < 7] { } + + ``` + +- `release 6 6147` +- `note 6` The `issue` method in the `map_target` template can now be overridden. +- `release 6 6148` +- `note 6` Objects of type `port` and `bank` can now be placed inside `group` objects. +- `note 6` Added a new object type `subdevice`. This object behaves similar to a `port`, with two differences: It may contain `port` and `bank` objects, and the corresponding Simics object does not add a `port.` prefix. For instance, the object for `subdevice x;` is named `dev.x` instead of `dev.port.x`. +- `note 6` Fixed a bug that caused incorrect Simics object names when the `init_as_subobj` template is instantiated on a `connect` object inside a `bank` or `port` object. +- `release 6 6149` +- `note 6` Multiple variables may now be declared simultaneously using tuple syntax (parentheses), and tuple syntax can now be used for multiple simultaneous assignment or initialization (fixes SIMICS-7027). +- `note 6` Calls to throwing methods or methods with multiple return values may now be used as the argument to a return statement. Compound initializer syntax can now be used to return values of `struct`-like types, e.g.: + ``` + method construct_buffer_t(size_t siz) -> (buffer_t) { + return { .len = siz, .data = new uint8[siz] }; + } + + ``` + +- `release 6 6150` +- `note 6` Added new templates `signal_port` and `signal_connect` which help maintain correct handling of the signal interface, i.e. do not raise signal when already high, and do not lower it when already low. +- `release 6 6153` +- `note 6` Added independent methods (fixes SIMICS-6181), independent startup methods (fixes SIMICS-17632), and independent startup memoized methods. +- `note 6` Invalid definitions of typed parameters now emit compile errors (fixes SIMICS-6182). +- `note 6` Method references can now be converted into function pointers using `&`. This can only be used with methods that that may also be exported using the `export` statement (fixes SIMICS-14921). +- `release 6 6154` +- `note 6` Overlapping field ranges within registers are no longer allowed (fixes SIMICS-19194). +- `note 6` Fixed regression introduced in Simics 6.0.133, where methods or variable named `independent`, `startup` or `memoized` would give a parse error. +- `release 6 6157` +- `note 6` Fixed a bug where independent methods were exported incorrectly. +- `release 6 6161` +- `note 6` The methods `signal_raise` and `signal_lower` are now overridable in HRESET port defined in template `hreset` +- `release 6 6171` +- `note 6` When a transaction misses in a bank, the error message is now logged by the `unmapped_read` and `unmapped_write` methods of the bank, instead of `io_memory_access` or `transaction_access`. This makes it easier to override the default behaviour; however, if a model suppresses logging by providing a local alternative implementation of the `*_access` methods, and that implementation still calls `unmapped_read` or `unmapped_write`, then that model will no longer suppress logging. +- `release 6 6173` +- `note 6` Removed the generation of some broken `#line` directives that caused problems in code coverage reports (fixes HSD-18024044100). +- `note 6` When using designated initializers, partial initialization is now possible through trailing `...` syntax (fixes SIMICS-18705). Members not explicitly initialized are zero-initialized. For example, the following is now supported: + ``` + local struct { int value; bool valid; } x = {.valid = false, ...} + + ``` + +- `release 6 6177` +- `note 6` Template types are now considered serializable (fixes SIMICS-18507). +- `note 6` Casts of constant object references to template types are now considered constant expressions, allowing for their use as initializers for `session`/`saved` variables: + ``` + template t { } + group g is t; + saved t s = cast(g, t); + + ``` + +- `release 6 6178` +- `note 6` Fixed a bug for ports/banks inside groups, that inhibited the creation of attributes for `saved` variables (fixes SIMICS-19422) +- `release 6 6183` +- `note 6` Fixed a bug where `session`/`saved` variables initialized to values of template types could cause internal compiler errors or invalid generated C (fixes SIMICS-20145). +- `release 6 6184` +- `note 6` Fixed a bug where models containing any parameter defined to be a value of a template type resulted in broken generated debug files when compiling with `-g` (fixes SIMICS-20200). +- `note 6` The `set` method in the `map_target` template can now be overridden, to add extra behavior before and after the attribute is set. +- `release 6 6187` +- `note 6` Any value of a template type can now be cast to the template type `object`, even if `object` is not an ancestor of the template (fixes SIMICS-19950). +- `release 6 6190` +- `note 6` A new parameter `init_val` has been introduced to the attribute templates `bool_attr`, `uint64_attr`, `int64_attr` and `double_attr`. These templates now also provide a default `init()` implementation that leverages `init_val` in order to initialize the `val` variable provided by the template (fixes SIMICS-20108). +- `note 6` `NULL` is now considered a constant expression, and equalities between `NULL` and other constant expressions of pointer type (in particular, string literals) are now also considered constant. +- `note 6` Attribute registration for `connect`, `attribute`, and `register` objects has been greatly optimized, reducing the compilation times of models that feature large numbers of such objects (fixes SIMICS-6271). A consequence of this change is that errors in the `get_attribute()`, `set_attribute()`, `set()`, and `get()` methods of such objects are always reported by the compiler, even if the `configuration` parameter is defined to be `"none"`. +- `note 6` Fixed a bug where leveraging serialization of a template type could cause an internal compiler error if there is some object in the model instantiating that template which never gets referenced in a value of that template type (fixes SIMICS-20301). +- `note 6` The `register_info` interface for banks now provide unique names for each field in an array (fixes SIMICS-18244). +- `note 6` Fixed a bug where `.len` on template type sequences could only be used with direct `each`-`in` expressions (fixes SIMICS-20278). +- `release 6 6191` +- `note 6` Fixed Windows-specific gcc compile error on DMLC-generated code, caused by name clashes with the `interface` macro, defined by `windows.h` (fixes HSD-15012582368). +- `release 6 6195` +- `note 6` Fixed a bug in `saved` variables that caused stack overflow during checkpoint restore for huge (multi-megabyte) struct types (fixes HSD-18026246959). +- `release 6 6200` +- `note 6` `--coverity` has been added as an option to DMLC. When used, DMLC will generate Synopsys® Coverity® analysis annotations to suppress common false positives in generated C code created from DML 1.4 devices. +- `note 6` Fixed an ICE caused by constant inlined method parameters being used in constant equalities (fixes HSD-16019548195). +- `note 6` Fixed an issue with debuggable compilation (`-g`) that caused `inline` method calls to inline constant arguments even for parameters not declared `inline` (fixes HSD-16019548195). +- `release 6 6205` +- `note 6` Compound initializer syntax can now be used to construct arguments of a method or function call, e.g: + ``` + method callee(buffer_t buf, bool b) { + ... + } + + method caller() { + callee({ .len = 4, .data = new uint8[4] }, true); + } + + ``` + This syntax can't be used for variadic arguments or any argument corresponding to a method parameter declared `inline` (fixes SIMICS-20473). +- `release 6 6213` +- `note 6` Fixed a bug where a top-level object named the same as the device object could result in invalid generated C when both objects are targets of `each + .. in ..` expressions (fixes SIMICS-21044). +- `release 6 6218` +- `note 6` `--coverity` now suppresses a false positive that the `COPY_PASTE_ERROR` checker reports in `dml-builtins.dml`. +- `note 6` It's now allowed to cast an expression of a struct type to that same struct type. +- `note 6` Fixed an error where const method parameters would cause an internal error if that method is used as the callback of an `after` statement. +- `note 6` Fixed an issue where having a const-qualified layout type could lead to internal compiler errors in certain scenarios. +- `release 6 6223` +- `note 6` Added `hook` declarations; a `hook` is a named object member to which suspended computations may be attached for execution at a later point. Computations suspended on a hook are detached and executed through the `send_now()` operation of the hook, which can also provide data for use by the resumed computations. Currently, the only form of computations that can be suspended on hooks are single method calls. This is done via the `after` statement, which has been extended to permit this. +- `release 6 6231` +- `note 6` Fixed a bug where partial inquiry writes to a bank would incorrectly clear register bits (fixes SIMICS-21382). +- `note 6` Fixed a bug where trying to serialize values of `long` or `size_t` type (via `saved` variables or arguments of `after` statements) would lead to an internal compiler error (fixes SIMICS-21424). +- `note 6` Added a new form of the `after` statement, called *immediate `after`*. Syntax is `after: callback(1, false)`. An immediate after will delay the call to the specified method until all current entries into devices on the call stack have been completed, and the simulation of the current processor would otherwise be ready to move onto the next cycle (fixes SIMICS-20379). +- `note 6` Fixed a bug where an attribute declared within a port, bank or subdevice that is itself declared within an object array would lead to the type of that attribute being incorrectly registered (fixes SIMICS-21474). +- `release 6 6244` +- `note 6` Fixed a bug where log statements within `shared` methods would always use the device's configuration object as the log object instead of the configuration object of the nearest enclosing `device`, `port`, `bank` or `subdevice` (fixes SIMICS-11346). This fix is only enabled by default with Simics API version 7 or above. With version 6 or below it must be explicitly enabled by passing `--no-compat=shared_logs_on_device` to DMLC. +- `major 7` +- `release 6 6252` +- `note 6` Improved the run-time performance of accesses to registers with many fields. +- `release 6 6262` +- `release 7 7006` +- `note 6` Fixed a bug where overlapping registers would not be rejected if they were part of a bank within a group or subdevice. +- `release 6 6287` +- `release 7 7012` +- `note 6` Fixed a bug where executed callbacks posted via immediate after statements would not trigger the device state change notifier. +- `release 6 6295` +- `release 7 7016` +- `note 6` Added support for `uint64_t` and `int64_t` types from C. These types are needed for C interoperability, e.g., calling a function that takes an argument of type `uint64_t *`. +- `note 6` The `miss_pattern_bank` template now allows for its implementations of `unmapped_read`, `unmapped_write`, and `unmapped_get` to be overridden. +- `release 6 6297` +- `release 7 7017` +- `note 6` It's now allowed to instantiate multiple unrelated templates that offer different `shared` implementations of the same method, as long as that method is declared in a common ancestor template, and the conflict is resolved through an implementation that overrides all the unrelated implementations (fixes SIMICS-20431). This mirrors the pre-existing semantics for non-`shared` methods. +- `note 6` Added the `templates` member for all objects and values of template types, which allows for making calls to any particular implementation of a method as provided by a specified template (fixes SIMICS-22264). Example syntax: + ``` + // Call the `write_register()` implementation as provided by the + // `register` template on the `r` register of the bank `b`. + b.r.templates.register.write_register(...); + + ``` + Calls of this form are called *Template-Qualified Method Implementation Calls*, and are primarily meant to make it easier to resolve conflicts in multiple inheritance: it allows any method that overrides multiple implementations from unrelated templates to individually reference and call the implementations it overrides. +- `release 7 7020` +- `note 6` Template `function_io_memory` now searches for the bank in the same `subdevice`/`device` scope as the `implement`. +- `release 6 6309` +- `release 7 7021` +- `note 6` Added a system for *provisional language features*: language features that are disabled by default but can be explicitly enabled per DML file. Each provisional feature is named and documented in an appendix of the reference manual; to enable a feature named `foo_bar` in a DML file, write `provisional + foo_bar;` in the top of the file, right after `dml + 1.4;`. +- `note 6` Added a provisional feature `explicit_param_decls`, which can be enabled per file by a statement `provisional explicit_param_decls;`. This feature adds a syntax `param NAME := VALUE;`, which signifies that the parameter is *not* intended as an override. The existing syntax `param NAME = VALUE;` is re-purposed to signify that the parameter *is* intended as an override. Inconsistent usage will trigger compile errors. This is useful to catch misspelled overrides (fixes SIMICS-21451). +- `note 6` Addressed a bug where DMLC did not report errors when a non-existing template is instantiated within an `#if` block. E.g., the following does not give an error: + ``` + #if (true) { group g { is nonexisting_template; }} + + ``` + The bugfix is opt-in, because an immediate bugfix would risk breaking existing builds; the error will only be reported when the flag `--no-compat=broken_conditional_is` is passed to DMLC. This flag will be automatically enabled in Simics 8 (fixes SIMICS-22403). +- `note 6` When two conflicting definitions of the same parameter are declared within the same scope, then this will now be reported as an error also if they are overridden by a third declaration. In the following example, this gives a new compile error on the `p` declarations within the `t` template: + ``` + template t { + param p default 1; + param p default 1; + } + group g is t { + param p = 2; + } + + ``` + Previously, DMLC would only report an error on `t` if the parameter was not overridden. If this is the desired behaviour, then the idiomatic construct is: + ``` + template t { + param p; + } + + ``` + +- `release 6 6310` +- `release 7 7022` +- `note 6` Any immediate after callbacks posted during object initialization and configuration are now guaranteed to be executed as part of `objects_finalized` of the device. +- `note 6` Any immediate after callbacks of a device that are still pending at the start of the device's deletion will be canceled and give rise to a warning (fixes SIMICS-22268). This can be resolved by leveraging `SIM_process_pending_work()`. Immediate after callbacks posted *during* deletion (e.g. by `destroy()`) will still be executed at the end of device deletion, as before. +- `release 6 6312` +- `release 7 7023` +- `note 6` Calls to methods defined within object arrays now assert that the specified indices for the object arrays are in bounds (fixes SIMICS-22491). For backwards compatibility, these asserts are not performed with Simics API version 7 or below unless `--no-compat=no_method_index_asserts` is passed to DMLC. +- `release 6 6313` +- `release 7 7026` +- `note 6` The warning message for comparing a value of unsigned type to a negative constant has been improved to also warn for unsigned types shorter than 64 bits. +- `release 6 6315` \ No newline at end of file diff --git a/RELEASENOTES.md b/RELEASENOTES.md new file mode 100644 index 00000000..de429ad1 --- /dev/null +++ b/RELEASENOTES.md @@ -0,0 +1,174 @@ + + +# Device Modeling Language (DML) + +- `major 6` +- `note 6` The syntaxes for template instantiation in object declarations and in standalone statements have been unified; you can now write: `register r is read_only { ... }` to instantiate a single template and `is (read_only, write_unimplemented);` to instantiate two templates. Also, templates and traits now permit `is` before the opening brace, just like object declarations do. +- `release 6 6004` +- `note 6` The binary `/bin/dmlc` has been replaced with the script `scripts/dmlc.py`. This is considered an internal change; from a user's perspective, the entry point of DMLC is still `bin/dmlc` +- `release 6 6005` +- `note 6` The type produced by the `<<` operator is now always `uint64` unless both operands are constant. Previously, the result could sometimes be a signed `int`, which could lead to unexpected sign extension when assigning the result to a `uint64` variable. +- `release 6 6006` +- `note 6` Restrictions have been lifted on what values can be assigned to a `bitfields` variable: Previously, only integer values small enough to fit in the bitfield size were permitted; now we permit assignment of any integer value, and truncate upon overflow. This eliminates some compile errors that were introduced by changes in Simics-Base 5.0.180. +- `release 6 6007` +- `note 6` In the `io-memory.dml` standard library file, the `operation` method is now marked `default` (fixes HSD-1507149841). +- `note 6` A new parameter `dml_1_2` has been added to device scope. The parameter is true, but will be false in future versions of the language. +- `note 6` The semantics of a `select` statement has changed to report errors less often in dead code. In particular, the `else` clause may now contain an `error` statement to get a compile-time check that the `where` expression was satisfied. +- `release 6 6008` +- `note 6` Fixed a bug that caused a crash with the deprecated `-M` flag +- `release 6 6010` +- `note 6` Upon object instantiation, required attributes inside banks can now be set through the compatibility attribute `bank_attr` in the device upon object creation. Previously, required attributes had to be set directly on the bank object (fixes HSD-2207518293). +- `note 6` Initial release of DML version 1.4. The new language version is documented in the *DML 1.4 reference manual* document. Some highlights: + - **Better compilation performance** + 2-3 times faster compile for devices with large register banks + - **Improved reset support** + The reset mechanism in 1.4 is not hard-coded, and can be adapted to different reset flows + - **Templates as types** + You can pass around references to banks/registers/fields etc in variables + - **Multiple levels of overrides** + Methods and parameters can be overridden any number of times. In 1.2, this is often prevented by standard library legacy. + - **Syntax simplification** + Many adjustments to improve readability; for instance, removal of `$` and C-like method syntax + - **Standard library API simplification** + Clearer API, easier to understand + - **Updated language semantics** + More consistent and well-specified behaviour of method bodies and expressions, providing more predictable model behaviour + + +- `release 6 6012` +- `note 6` Improved information provided by EATTRDATA error message. +- `release 6 6015` +- `note 6` The bank instrumentation framework no longer invokes callbacks on inquiry accesses. +- `note 6` Fix issue where the inquiry flag of memory operation was modified when the inquire function of the bank instrumentation framework was invoked. This could cause unnecessary trouble for users that recycle memory operations. +- `release 6 6022` +- `note 6` Improved how inline method arguments are handled when porting a device from DML 1.2 to 1.4. +- `note 6` It is now permitted to have `connect` objects inside banks. +- `note 6` Fixed various bugs that caused crashes and errors for inlined methods, in particular when mixing DML 1.2 and DML 1.4 code. +- `release 6 6026` +- `note 6` Multi-dimensional register, attribute, group, connect, event, bank, port, and implement arrays are now available. +- `note 6` Add support to `header` sections for including a `.h` file relative to the currently imported DML file (fixes HSD-2209645860). +- `release 6 6028` +- `note 6` Fixed a bug where the `DMLDIR__H` macro was undefined when generating dependency files. +- `release 6 6030` +- `note 6` DMLC will now report a syntax error if a DML file contains any invalid UTF-8 characters. Previously, invalid UTF-8 characters were ignored in comments. +- `note 6` The parameters `desc` and `documentation` are now required to be correctly encoded as UTF-8. +- `release 6 6032` +- `note 6` Adjusted DMLC code generation to silence false positives reported on `dml-builtins.dml` when analysing DMLC-generated C code using the Synopsis® Coverity® static analysis tool. +- `release 6 6036` +- `note 6` Improved some error messages (fixes SIMICS-15552). +- `note 6` Added some rules to permit DML 1.4 methods to call 1.2 methods without a `try`/`catch` block in some common cases. Details are documented with the `EBADFAIL_dml12` error message. +- `note 6` When using DML 1.4 attribute templates, such as `bool_attr`, from a 1.2 device through `dml12-compatibility.dml`, the `get` method is no longer marked as `throws`. +- `release 6 6044` +- `note 6` Improved compatibility between DML 1.2 and 1.4: The experimental `dml12-compatibility.dml` file now provides default implementations of methods `read_register`, `write_register`, `read_field`, `write_field` and `io_memory_access`. When overriding these methods in a DML 1.4 file, there are templates `dml12_compat_read_register`, `dml12_compat_write_register` etc that will make sure the overrides are invoked if the file is imported from DML 1.2. +- `note 6` The `port-dml` script now accepts an argument `--compat` to generate 1.4 code that works better when imported from DML 1.2. The resulting code is less clean, so it should only be used on code that needs to retain 1.2 compatibility for some time. +- `release 6 6046` +- `note 6` The endian class of integer types are now available. These look like `[u]intX_(be|le)_t` (where X is a multiple of 8, up to 64) and describe an integer of the specified size with the specified byteorder and natural alignment of 1 byte. These can be transparently used as if they were regular `[u]intX`s in calculations (fixes SIMICS-7603). +- `release 6 6049` +- `note 6` Fixed an issue where typedeffed bitfields would get the incorrect size in layouts. +- `release 6 6052` +- `note 6` Added a script `bin/port-dml-module` to port all devices in one Simics module to DML 1.4. +- `note 6` The types `long`, `ulong`, `size_t` and `ssize_t` now correspond to the correct C types. For instance, on Linux, both the `long` and `int64` types are signed 64-bit integers, yet C considers them incompatible and refuses to assign between pointers of type `long *` and `int64 *`. DML now mirrors this behaviour, which makes it easier to call an externally defined C function that takes a `long *` argument. +- `note 6` Bitfield types are now considered compatible with the similarly sized unsigned integer type (e.g. `bitfield 32 {...}` is compatible with `uint32`). +- `release 6 6053` +- `note 6` Improved compatibility between DML 1.2 and 1.4: The experimental `dml12-compatibility.dml` file now also provides shared access to typed variables defined in the common templates `name`, `shown_desc`, `miss_pattern_bank`, and `function_mapped_bank`. See the DML 1.4 reference manual for details on which typed parameters each template provides. +- `note 6` The experimental `bank_obj` template is available in DML 1.2 through the experimental `dml12-compatibility` file. See DML 1.4 releasenotes for the functionality provided. +- `release 6 6056` +- `note 6` Registers and attributes that do not define the `documentation` parameter are now considered internal by default, meaning that they will be excluded from reference documentation by default. This can be changed by explicitly overriding the `internal` parameter of the register or attribute. +- `release 6 6061` +- `note 6` Fixed a bug that could cause a segmentation fault when instantiating a device with register arrays following certain patterns (fixes HSD-1508585437). +- `release 6 6075` +- `note 6` If an array of `connect` objects is declared as `configuration=optional`, then it is now permitted to assign it a shorter list than the array size. For instance, a connect `connect objs[i < 10]` now has the type string `"o|[os]|n{0:10}"` (fixes SIMICS-16132). +- `note 6` Improved DML's type system. DMLC will now detect and report many type errors instead of generating broken C code. +- `note 6` typedefs of `layout` types may no longer be declared `extern`. It never worked to access members of such types, so they can safely be replaced with an opaque extern struct. E.g., if you have this declaration: + ``` + extern typedef layout "big-endian" { + uint24 member; + } my_type_t; + ``` + then you can safely replace it with: + ``` + extern typedef struct { } my_type_t; + ``` + +- `release 6 6079` +- `note 6` `group` objects are now allowed anywhere in the device hierarchy. All kinds of objects except `bank`, `port`, `interface` and `implement` may reside inside a group (in DML 1.2, `field` objects are also disallowed inside groups) (fixes SIMICS-16563). +- `note 6` `attribute`, `saved` and `session` objects are now permitted also inside `implement` objects. +- `release 6 6082` +- `note 6` Fixed an issue where interfaces defined as typedeffed aliases of other interfaces would not work correctly in some cases. +- `release 6 6088` +- `note 6` Fixed a problem with strict aliasing; it is now safe to cast a `uint8` array to a layout pointer, assign to the layout members, and then access the arrays as bytes. This would sometimes give problems when using `-fstrict-aliasing` with new GCC versions (fixes SIMICS-16978). +- `release 6 6090` +- `note 6` DML devices compiled with simics-base 6.0.82 or later cannot be loaded with simics-base earlier than 6.0.76 +- `release 6 6095` +- `note 6` `after` statements now support methods with serializable method parameters (fixes SIMICS-7030). +- `release 6 6118` +- `note 6` DMLC will now emit a warning when comparing an unsigned operand with a negative constant (fixes SIMICS-17096). +- `release 6 6119` +- `note 6` Single-bit wide ranges within bitfield declarations can now be specified through `@ [i]`, as with field objects (fixes SIMICS-18156). +- `release 6 6124` +- `note 6` The DMLC standard library is now licensed under the BSD Zero Clause License. +- `note 6` References to interface methods and `shared` methods are now allowed as parameter definitions. +- `note 6` The file `dmllib.h`, needed to compile DMLC-generated C files, has been moved to `host/bin/dml/include/simics`. Makefiles have been updated to add this directory to the include path. +- `release 6 6131` +- `note 6` Fixed a problem with `log error` statements when there are more than 32 log groups (fixes HSD-1305472692). +- `note 6` Unicode BiDi control characters are no longer permitted in DML source files, for security reasons. +- `release 6 6132` +- `note 6` Addressed code generation efficiency issues when using array types in `saved` variables or parameters to methods called with `after` (fixes SIMICS-18440). + + Serialized representation of `uint8[(be|le)_t]` array types has been changed. The old serialized representation is still accepted for deserialization in order to preserve checkpoint compatibility. +- `release 6 6135` +- `note 6` Added support for non-constant compound initializers inside methods. For example, the following is now supported: + ``` + local size_t size = get_size(); + local buffer_t buf = {size, new uint8[size]}; + + ``` + +- `release 6 6139` +- `note 6` `break` may now be used within `foreach` statements in DML 1.2 and `#foreach` statements in DML 1.4 (fixes HSD-1309451301). +- `release 6 6141` +- `note 6` (Partially) const-qualified `session` variables no longer result in invalid generated C (fixes SIMICS-9440). +- `note 6` Implicitly initialized `local` variables of (partially) const-qualified struct type no longer result in invalid generated C (fixes SIMICS-10197). +- `release 6 6143` +- `note 6` `default` can now be called within `destroy()` without causing an internal compiler error (fixes SIMICS-19598). +- `release 6 6176` +- `note 6` The DMLC implementation is now shipped as source code, as `.py` files instead of `.pyc`. +- `note 6` The C code emitted by DMLC is now identical every time, when given the same DML files as input. Previously, the compiler had nondeterministic behaviour that affected things like in what order C functions are output. Deterministic output allows more efficient use of tools like `ccache`. +- `release 6 6200` +- `note 6` Fixed a bug with how template types were handled by DMLC that could cause the compiler to still exhibit nondeterministic behaviour. +- `release 6 6205` +- `note 6` Added an error if a device declares more than 63 log groups (including the two built-in log groups.) +- `release 6 6244` +- `note 6` Added a warning for if a specified log level of a log statement is likely intended to instead specify the log groups, and/or vice versa (fixes HSD-22018374443). This warning is only enabled by default with Simics API version 7 or above. With version 6 and below it must be explicitly enabled by passing `--warn=WLOGMIXUP` to DMLC. +- `release 6 6247` +- `note 6` Added a flag `--no-compat` to selectively disable compatibility features. In particular, `--no-compat=port_proxy_ifaces` disables generation of interface trampolines, which can speed up compilation of devices with huge arrays of ports. The option `--help-no-compat` lists all features that can be disabled. +- `release 6 6252` +- `note 6` Addressed multiple issues with line directive generation which were detrimental to the use of debugging and coverage tools. Generated C lines should now only ever be redirected to DML when the DML line in question can be reasonably considered to describe the operation of the C line. +- `note 6` Fixed an issue where attempting to use inlined method parameters in constant equalities could lead to internal compiler errors or invalid generated C, if the corresponding arguments are themselves constant inlined method parameters (i.e. an inline method call propagates an inline parameter to an inline method call of its own.) +- `major 7` +- `release 6 6255` +- `note 6` The DMLC behaviour of suppressing the warning `WLOGMIXUP` by default below Simics API version 7 is now controlled by the compatibility feature `suppress_WLOGMIXUP`. This is in order to increase visibility of the API-dependent behaviour, and to provide migration documentation about it. As a consequence, `WLOGMIXUP` can be enabled below Simics API version 7 by passing either `--warn=WLOGMIXUP` (as before) or `--no-compat=suppress_WLOGMIXUP` to DMLC. +- `release 6 6274` +- `release 7 7007` +- `note 6` Fixed an issue where leveraging `typeof` within a method signature would lead to incorrect compile-time errors when the method is overridden. +- `release 6 6283` +- `release 7 7011` +- `note 6` Added support for the `log warning` statement. +- `release 6 6297` +- `note 6` DMLC will now report errors for some uses of function types that are illegal in C. These would previously yield broken C code. +- `note 6` Created a compatibility feature `function_in_extern_struct`. The syntax `void + m(conf_object_t)` for function pointers is only permitted when this feature is enabled. The feature will be disabled in Simics API versions \> 7. +- `release 6 6298` +- `release 7 7017` +- `note 6` Fixed a bug in the `dead_dml_methods` library, which caused it to never detect methods as dead if they occur directly after a `footer` block. +- `release 6 6310` +- `release 7 7022` +- `note 6` DMLC's use of the legacy Simics API for attribute registration is now controlled by the compatibility feature `legacy_attributes`. This feature can be disabled by passing `--no-compat=legacy_attributes` to DMLC, in which case the modern API will be used instead, which does not support the use of dictionary attribute values (fixes SIMICS-22406). `legacy_attributes` will always be disabled with Simics API version 8 or above. +- `note 6` Typechecking has been reworked to be more strict, and more accurately reject type mismatch that would result in invalid C or GCC warnings (fixes SIMICS-9504). To avoid breakage from novel type errors from the stricter typechecking, which particularly affects pointer types, the legacy lenient typechecking is still used by default with Simics API version 7 or below. The strict typechecking can be enabled by passing `--no-compat=lenient_typechecking` to DMLC. +- `release 7 7024` +- `note 6` Multiple \`extern\` declarations for the same identifier are now allowed as long as they all declare the same type for the identifier (fixes SIMICS-22472). +- `release 6 6313` +- `release 7 7025` \ No newline at end of file