Intel Device Modeling Language for virtual platforms

DML is a domain-specific language for creating fast device models for virtual platforms like Intel Simics. It uses high-level abstractions and compiles to C code for efficient simulation.
The Device Modeling Language (DML) is a domain-specific language for writing fast functional or transaction-level device models for virtual platforms. DML provides high-level abstractions suitable for functional device models, including constructs like register banks, registers, bit fields, event posting, interfaces between models, and logging. DML code is compiled by the DML Compiler (DMLC), producing C code with API calls tailored for a particular simulator.
Currently, the compiler supports building models for the Intel® Simics® simulator, but other back-ends may be added in the future.
To build DMLC, you need to have a Simics simulator installation and a Simics project set up. If you do not already have a Simics simulator installation or access to the Simics simulator via commercial channels, install the Public Release of the Intel Simics simulator and create a Simics project.
In your Simics project, check out the DML repository into the modules/dmlc directory. At the top-level of the project, do make dmlc (or bin\make dmlc on Windows). To run the unit tests provided with DMLC, run make test-dmlc or bin/test-runner --suite modules/dmlc/test from the top-level of the project.
The following environment variables are handy when developing DMLC: DMLC_DIR, T126_JOBS, DMLC_PATHSUBST, and PY_SYMLINKS. After building DMLC, you need to set DMLC_DIR to <your-project>/<hosttype>/bin in subsequent invocations of make in order to build devices with the locally built compiler.
When PY_SYMLINKS is set to 1, make dmlc will symlink Python files instead of copying them. This allows Python tracebacks to point to the source file in the repository, and you don't need to re-run make after editing Python files.
DMLC also outputs a file ending with -size-stats.json, which shows code generation statistics useful to reduce generated code size and increase compile speed. An entry with a large size can be reduced by declaring the method as shared. The compiler can also emit a .tar.bz2 archive containing all DML source files for isolated problem reproduction.
Source: Hacker News










