summaryrefslogtreecommitdiffstatshomepage
path: root/docs/source/techspecs/memory.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/techspecs/memory.rst')
-rw-r--r--docs/source/techspecs/memory.rst28
1 files changed, 17 insertions, 11 deletions
diff --git a/docs/source/techspecs/memory.rst b/docs/source/techspecs/memory.rst
index 5d18c4e1202..ebdca9646d1 100644
--- a/docs/source/techspecs/memory.rst
+++ b/docs/source/techspecs/memory.rst
@@ -126,7 +126,8 @@ A memory share can be created if it doesn’t exist in a memory map
through that creator class. If it already exists it is just
retrieved. That class behaves like a pointer but also has the
``target()``, ``length()``, ``bytes()``, ``endianness()``,
-``bitwidth()`` and ``bytewidth()`` methods for share information.
+``bitwidth()`` and ``bytewidth()`` methods for share information. The
+desired size is specified in bytes.
.. code-block:: C++
@@ -154,12 +155,17 @@ A memory bank is a named memory zone indirection that can be mapped in
address spaces. It points to ``nullptr`` when created.
``configure_entry`` associates an entry number and a base pointer.
``configure_entries`` does the same for multiple consecutive entries
-spanning a memory zone. Alternatively ``set_base`` sets the base for
-entry 0 and selects it.
+spanning a memory zone.
-``set_entry`` allows to dynamically and efficiently select the current
-active entry, ``entry()`` gets that selection back, and ``base()`` gets
-the associated base pointer.
+``set_base`` sets the base address for the active entry. If there are
+no entries, entry 0 (zero) is automatically created and selected. Use
+of ``set_base`` should be avoided in favour of pre-configured entries
+unless there are an impractically large number of possible base
+addresses.
+
+``set_entry`` dynamically and efficiently selects the active entry,
+``entry()`` returns the active entry number, and ``base()`` gets the
+associated base pointer.
.. code-block:: C++
@@ -180,7 +186,7 @@ retrieved by building one of these four finders.
[device constructor] m_bank(*this, "name"),
-A memory share can be created if it doesn’t exist in a memory map
+A memory bank can be created if it doesn’t exist in a memory map
through that creator class. If it already exists it is just
retrieved.
@@ -197,7 +203,7 @@ that the lookup can be expensive, prefer finders instead.
.. code-block:: C++
- class memory_bank {
+ class memory_region {
u8 *base();
u8 *end();
u32 bytes() const;
@@ -355,7 +361,7 @@ Sets a method of the current device or driver to read, write or both
for the current entry. The prototype of the method can take multiple
forms making some elements optional. ``uNN`` represents ``u8``,
``u16``, ``u32`` or ``u64`` depending on the data width of the handler.
-The handler can be narrower than the bus itself (for instance a 8-bit
+The handler can be narrower than the bus itself (for instance an 8-bit
device on a 32-bit bus).
The offset passed in is built from the access address. It starts at
@@ -597,7 +603,7 @@ parameter is that trigger width (would be 16 in the 68000 case).
This parameter allows to set user-defined flags on the handler which
can then be retrieved by an accessing device to change their
-behaviour. An example of use the the i960 which marks burstable zones
+behaviour. An example of use the i960 which marks burstable zones
that way (they have a specific hardware-level support).
@@ -647,7 +653,7 @@ changed on-the-fly. They’re powerful but have some issues:
* changing the mappings repeatedly can be slow
* the address space state is not saved in the saved states, so it has to
be rebuilt after state load
-* they can be hidden anywhere rather that be grouped in an address map,
+* they can be hidden anywhere rather than be grouped in an address map,
which can be less readable
The methods, rather than decomposing the information in handler, handler