TEMU
4.4
The Terma Emulator
VTables.h
Go to the documentation of this file.
1
//===------------------------------------------------------------*- C++ -*-===//
2
//
3
// TEMU: The Terma Emulator
4
// (c) Terma 2016
5
// Authors: Mattias Holm <maho (at) terma.com>
6
//
7
//===----------------------------------------------------------------------===//
8
9
// This file contains all the public VTables used. Note that even
10
// though this is a public header, the code here is UNSTABLE. That is,
11
// the structures may change without notice (though not between bug
12
// fix releases).
13
//
14
// For that reason use this with care and only for code where it is
15
// unpractical for you to use interfaces directly.
16
17
#
ifndef
TEMU_SUPPORT_VTABLE_H
18
#
define
TEMU_SUPPORT_VTABLE_H
19
20
#
include
"temu-c/Models/Machine.h"
21
#
include
"temu-c/Support/Events.h"
22
#
include
"temu-c/Models/IrqController.h"
23
#
include
"temu-c/Memory/Memory.h"
24
#
include
"temu-c/Models/Clock.h"
25
26
#
ifdef
__cplusplus
27
extern
"C"
{
28
#
endif
29
30
// Typically you would call:
31
// temu_setVTable(Cls, &MyVT);
32
// temu_qualifyAsMachine/Cpu/Memory(Cls);
33
// In your machine implementation.
34
35
/*!
36
* All processors provide the CpuVTable
37
*/
38
typedef
struct
{
39
temu_CpuIface
*
Cpu
;
//!< CPU interface
40
temu_IrqCtrlIface
*
Irq
;
//!< IRQ interface
41
temu_MemAccessIface
*
InvalidAccess
;
//!< Invalid memory access interface
42
temu_ClockIface
*
Clock
;
//!< Clock interface
43
temu_BinaryTranslationControlIface
*
Translation
;
//!< Binary translator control interface
44
} temu_CpuVTable;
45
46
47
/*!
48
* All machines must implement this VTable interface.
49
* These are used to speedup certain operations on machine objects.
50
*/
51
typedef
struct
{
52
temu_MachineIface
*
Machine
;
//!< Machine interface
53
} temu_MachineVTable;
54
55
//! Fast memory operations
56
typedef
struct
{
57
temu_MemAccessIface
*
MemAccess
;
//!< Memory access interface
58
temu_MemoryIface
*
Memory
;
//!< Memory interface (deprecated)
59
temu_PDCIface
*
PDC
;
//!< Pre-decode cache interface
60
} temu_MemVTable;
61
62
#
ifdef
__cplusplus
63
}
64
#
endif
65
66
#
endif
/* ! TEMU_SUPPORT_VTABLE_H */
temu_CpuVTable::Translation
temu_BinaryTranslationControlIface * Translation
Binary translator control interface.
Definition:
VTables.h:43
temu_MachineVTable::Machine
temu_MachineIface * Machine
Machine interface.
Definition:
VTables.h:52
temu_CpuVTable::InvalidAccess
temu_MemAccessIface * InvalidAccess
Invalid memory access interface.
Definition:
VTables.h:41
temu_MemVTable::MemAccess
temu_MemAccessIface * MemAccess
Memory access interface.
Definition:
VTables.h:57
temu_CpuVTable::Cpu
temu_CpuIface * Cpu
CPU interface.
Definition:
VTables.h:39
temu_CpuVTable::Irq
temu_IrqCtrlIface * Irq
IRQ interface.
Definition:
VTables.h:40
temu_MemVTable::Memory
temu_MemoryIface * Memory
Memory interface (deprecated)
Definition:
VTables.h:58
temu_CpuVTable::Clock
temu_ClockIface * Clock
Clock interface.
Definition:
VTables.h:42
temu_MemVTable::PDC
temu_PDCIface * PDC
Pre-decode cache interface.
Definition:
VTables.h:59
temu-c
Support
VTables.h
Generated by
1.8.17