Section D.1

LRM-62

Changes:

Formal arguments in SystemVerilog can be specified as open arrays solely in import declarations; exported SystemVerilog functions can not have formal arguments specified as open arrays. A formal argument is an open array when a range of one or more of its dimensions is unspecified (denoted in SystemVerilog by using empty square brackets ([])). This corresponds to a relaxation of the DPI argument-matching rules (section 1.5.1 26.5.1). An actual argument shall match the corresponding formal argument regardless of the range(s) for its corresponding dimension(s), which facilitates writing generalized C code that can handle SystemVerilog arrays of different sizes.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.5

LRM-63

Changes:

Note that the constraints expressed here merely restate those expressed in section 26.4.1 1.4.1.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.5.5

LRM-64

Changes:

Also refer to section 26.4.3 1.4.3.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.5.6

LRM-65

Changes:

See also 26.4.2 1.4.2.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.5.7

LRM-66

Changes:

See also section 26.4.1.4 1.4.1.4.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.6.6

LRM-67

Changes:

1) If a packed part of an array has more than one dimension, it is linearized as specified by the equivalence of packed types (see section 4.2 ??).

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.7.2

LRM-68

Changes:

There is no difference in argument passing between calls from SystemVerilog to C and calls from C to SystemVerilog. Functions exported from SystemVerilog can not have open arrays as arguments. Apart from this restriction, the same types of formal arguments can be declared in SystemVerilog for exported functions and imported functions. A function exported from SystemVerilog shall have the same function header in C as would an imported function with the same function result type and same formal argument list. In the case of arguments passed by reference, an actual argument to SystemVerilog function called from C shall be allocated using the same layout of data as SystemVerilog uses for that type of argument; the caller is responsible for the allocation. It can be done while preserving the binary compatibility, see Annex D.11.5 and section D.11.11 A.11.11.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.7.5

LRM-69

Changes:

Sometimes binary compatibility can be achieved by using dynamic allocation functions. The functions svSizeOfLogicPackedArr() and svSizeOfBitPackedArr() provide the size of the actual representation of a packed array, which can be used for the dynamic allocation of an actual argument without compromising the portability (see section D.11.11 A.11.11). Such a technique does not work if a packed array is a part of another type.

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.7.7

LRM-70

Changes:

      byte, shortint, int, longint, real, shortreal

 

      handle, string

 

      bit (i.e., 2-state) packed arrays up to 64 (previously 32) bit (canonical representation shall be used, like for a function result)

 

[There is a problem here: ‘int’ is the same as svBitVec32, long long is not the snae as svBitVect32[2],

so how to return a value in the canonical representation as a function result, if this value is between

33 and 64 bits?]

Remove editor’s note:

Editor’s Note: Has the preceding note been taken care of?

Section D.10.2

LRM-72

Changes:

Unpacked arrays, with the exception of formal arguments specified as open arrays, shall have the same layout as used by a C compiler; they are accessed using C indexing (see section D.6.6 A.6.6).

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?

Section D.8

LRM-71

Changes:

To avoid any unnecessary overhead, imported function calls in SystemVerilog code are not instrumented unless the imported function is specified as context in its SystemVerilog import declaration. A small set of DPI utility functions are is available to assist programmers when working with context functions (see section D.8.3 A.8.3). If those utility functions are used with any non-context function, a system error will result.

Remove editor’s note:

Editor’s Note: Has the preceding note been taken care of?

Section D.11.1

LRM-69

Changes:

In the former case, all indices are normalized on the C side (i.e., 0 and up) and the programmer needs to know the size of an array and be capable of determining how the ranges of the actual argument map onto C-style ranges (see section D.6.6 A.6.6).

Remove editor’s note:

Editor’s Note: What is the correct cross reference, above?