TEMU  4.4
The Terma Emulator
temu_MemAccessIface Struct Reference

#include </builds/termade/temu/temu/include/temu-c/Memory/Memory.h>

Collaboration diagram for temu_MemAccessIface:

Data Fields

void(* fetch )(void *Obj, temu_MemTransaction *Mt)
 
void(* read )(void *Obj, temu_MemTransaction *Mt)
 Function called on reads. More...
 
void(* write )(void *Obj, temu_MemTransaction *Mt)
 Function called on writes. More...
 
void(* exchange )(void *Obj, temu_MemTransaction *Mt)
 
void(* mapped )(void *Obj, uint64_t Pa, uint64_t Len)
 Optional method, called when interface is mapped. More...
 
const temu_MemAccessCapabilities *(* getCapabilities )(void *Obj)
 
void(* probe )(void *Obj, temu_MemTransaction *Mt)
 

Detailed Description

Memory access interface implemented by all memory mapped devices Exposed to the emulator core by a memory object.

Field Documentation

◆ exchange

void(* temu_MemAccessIface::exchange) (void *Obj, temu_MemTransaction *Mt)

Function called on atomic exchanges, by default if this is not defined, the memory space will call read followed by write in order.

◆ fetch

void(* temu_MemAccessIface::fetch) (void *Obj, temu_MemTransaction *Mt)

Function called on fetches. The function can be null in case fetches are not allowed from the model.

◆ getCapabilities

const temu_MemAccessCapabilities*(* temu_MemAccessIface::getCapabilities) (void *Obj)

Query for supported features Function is optional. By default the assumption is that the base capabilities are equal to R_ALL | W_ALL, custom memories must explicitly register itself as fetchable memory. in addition, the default assumption is that the device does not support large transactions.

◆ mapped

void(* temu_MemAccessIface::mapped) (void *Obj, uint64_t Pa, uint64_t Len)

Optional method, called when interface is mapped.

◆ probe

void(* temu_MemAccessIface::probe) (void *Obj, temu_MemTransaction *Mt)

Probe access Must be implemented for RAM and ROM models When probing the memory subsystem, the transaction is not supposed to trigger semantics. Instead the models should populate the memory transaction contents, with metadata. Thus a probe should for example fill in the page pointer, IR pointer, etc. To support correct probing for atomic transactions, probes should handle the TEMU_MT_READ and TEMU_MT_WRITE bits.

◆ read

void(* temu_MemAccessIface::read) (void *Obj, temu_MemTransaction *Mt)

Function called on reads.

◆ write

void(* temu_MemAccessIface::write) (void *Obj, temu_MemTransaction *Mt)

Function called on writes.


The documentation for this struct was generated from the following file: