D Programming Language
Overview
The D Programming Language (Dlang) is presented in the evidence primarily through its role as the implementation language for eUVM, an open-source, multicore-enabled implementation of Universal Verification Methodology (UVM). The cited DVCon paper states that eUVM is coded in D and that eUVM inherits an automatic garbage collector from the D Programming Language.[C1]
Role in eUVM
In the eUVM architecture described by the source, D is used to support a systems-centric verification environment. Because eUVM is implemented in D, the paper states that it enables Application Binary Interface (ABI) level compatibility with C/C++; as a result, C/C++ functions can be called directly from eUVM testbenches and vice versa without runtime overhead.[C2]
The same source describes eUVM as using D language metaprogramming capabilities to build a high-performance constraint processor. The named D features include:
- User-Defined Attributes (UDA)
- Compile-Time Function Evaluation (CTFE)
- Code introspection
- Generative programming
According to the paper, code introspection and CTFE allow eUVM to parse and analyze constraints at compile time, while UDAs help eUVM maintain a native memory footprint for randomized data elements, aiding interoperability with C and C++.[C3]
Concurrency-related usage
The RISCV-DV eUVM port is described as refactoring parts of the RISCV-DV architecture to comply with the concurrency semantics of the D Programming Language. The paper discusses avoiding globally or statically scoped variables that would otherwise require synchronization locks when accessed by multiple threads.[C4]
Within eUVM, processes can be forked and delegated to specified processor threads. The paper contrasts this with SystemVerilog by stating that eUVM can execute threads on multiple cores. It also notes that an eUVM fork returns a Fork object that can be collected into a list, configured, and joined later.[C5]
Language facilities noted in the evidence
Object copying and slice operations
The paper describes a shallow-copy implementation in eUVM that uses D object introspection to determine an object's memory footprint. It then copies a memory slice from the source object to the destination. The source specifically states that such a slice-copy operation in D results in a single call to memcopy, which is more efficient than copying individual elements through a UVM utility copy construct.[C6]
Formatting APIs and allocation control
The evidence distinguishes between two D formatting functions:
format, described as having functionality comparable to SystemVerilog$sformatfsformat, described as allowing the user to provide scratch memory where the formatted string is stored
The paper uses this distinction to explain how eUVM can reduce trivial memory allocations when formatting a 32-bit number into a decimal string.[C7]
Dynamic arrays
The evidence also mentions the D ~= operator, describing it as shorthand for appending an object to a dynamic array in the D language.[C8]
Technical significance in the cited source
Across the cited material, D is significant not as a standalone topic but as the language foundation enabling eUVM features: garbage collection, C/C++ ABI interoperability, compile-time metaprogramming, efficient memory-copy idioms, allocation-aware formatting, dynamic arrays, and multicore-oriented execution behavior in an eUVM-based verification workflow.