Introduction
The machine class is used to assemble and group related processors in machines. The machine class is intended to be used for SMP and multi-core systems. It provides the following capabilities:
-
A multi-CPU scheduler that executes all the CPUs in the machine in sequence (for a fixed time quanta).
-
A synchronised event queue. CPUs can post events in the next time quanta to be executed after all the processors have reached a specific time point.
-
A scheduling interface enabling the machine to be run for a time specified in seconds, not cycles.
Note that the machine class supports the scheduling of different CPUs with different clock frequencies.
Synchronised events are posted on a CPUs event queue by adding the flag TEMU_EVENT_SYNC to the posting function, this will bypass the CPU event queue and put it in the machine object’s queue.
Configuration
Property | Type | Purpose |
---|---|---|
quanta |
uint64_t |
Length of time quanta in nanoseconds |
syncMask |
uint64_t |
Considered when checking whether the CPUs are synced |
cpus |
CpuIface Object Array |
For controlling CPUs |
devices |
EventIface Object Array |
For distributing machine resets |
Limitations
-
The machine class cannot have more than 64 CPU cores connected.