Skip to content

Commit 2ceffbc

Browse files
committed
Document bank's set, get, unmapped_get -- SIMICS-23287
1 parent b2a137a commit 2ceffbc

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

lib/1.4/dml-builtins.dml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,11 +1803,49 @@ of `unmapped_read` if the access is not fully
18031803
mapped.
18041804
</dd><dt>
18051805

1806-
<small>unmapped\_read(uint64 offset, uint64 bits, void \*aux) throws</small>
1806+
<small>unmapped\_read(uint64 offset, uint64 bits, void \*aux) -> (uint64) throws</small>
18071807
</dt><dd>
18081808

1809-
Like `unmapped_write` but for reads. The default
1810-
implementation unconditionally throws an exception.
1809+
Like `unmapped_write` but for reads. The default implementation unconditionally
1810+
throws an exception, which causes the read access to be rejected. However, the
1811+
method may be overridden to instead return a value specifying the read bits
1812+
corresponding to the unmapped bytes, which will then be composed together with
1813+
the values read from the accessed registers.
1814+
</dd><dt>
1815+
1816+
<small>set(uint64 offset, uint64 size, uint64 value)</small>
1817+
</dt><dd>
1818+
A simpler variant of `write()` used exclusively for inquiry write accesses to
1819+
the bank. Unlike `write()`, `set()` unconditionally operates over an entire
1820+
range of bytes (hence `size` rather than `enabled_bytes`), does not have an
1821+
`aux` parameter, and cannot throw. Any invocation of `write` is considered
1822+
valid, even if some part of the access is not covered by mapped accesses (in
1823+
which case no action should be taken for those bytes.)
1824+
1825+
The default implementation invokes `set()` of the accessed registers rather
1826+
than `write_register()`, and instead of calling to something similar to
1827+
`unmapped_write()`, the default implementation simply logs a low-level `info`
1828+
message about unmapped accesses.
1829+
</dd><dt>
1830+
1831+
<small>get(uint64 offset, uint64 size) -> (uint64) throws</small>
1832+
</dt><dd>
1833+
A simpler variant of `read()` used exclusively for inquiry read accesses to
1834+
the bank. Unlike `read`, `get()` unconditionally operates over an entire
1835+
range of bytes (hence `size` rather than `enabled_bytes`) and does not have an
1836+
`aux` parameter. Unlike `set()`, invocations to `get()` may throw if some part,
1837+
in particular when some part of the access is not covered by mapped accesses.
1838+
1839+
The default implementation invokes `get()` of the accessed registers rather
1840+
than `read_register()`, and calls to `unmapped_get()` upon unmapped accesses
1841+
rather than `unmapped_read()`.
1842+
</dd></dt>
1843+
1844+
<small>unmapped\_get(uint64 offset, uint64 bits) -> (uint64) throws</small>
1845+
</dt><dd>
1846+
1847+
Like `unmapped_read` but for inquiry reads. The default implementation
1848+
unconditionally throws an exception.
18111849
</dd></dl>
18121850

18131851
The `bank` template contains the following parameters:

0 commit comments

Comments
 (0)