12.3 Ownership Model

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 12 – AlphaCPU Core >

12.3 Ownership Model

12.3.1 AlphaCPU Owns

 

AlphaCPU directly owns or controls the following per-CPU subsystems (created in the constructor):

 

// Box Ownership (AlphaCPU owns all boxes)

QScopedPointer<AlphaPipeline> m_alphaPipeline; // Pipeline engine

QScopedPointer<PalBox> m_pBox; // PAL execution box

QScopedPointer<EBox> m_eBox; // Integer execution box

QScopedPointer<FBox> m_fBox; // Floating-point execution box

QScopedPointer<MBox> m_mBox; // Memory execution box

QScopedPointer<IBox> m_iBox; // Instruction fetch/decode box

CBox* m_cBox; // Cache/barrier box (injected)

 

// Interrupt subsystem (per-CPU)

QScopedPointer<IRQPendingState> m_pending; // Per-CPU interrupt tracking

QScopedPointer<InterruptRouter> m_router; // Interrupt routing

 

// CPU state

CPUStateView* m_iprGlobalMaster; // Register files, PS, IPL, PC

FaultDispatcher* m_faultDispatcher; // Per-CPU fault/event queue

Ev6Translator m_ev6Translate; // Address translation engine

 

No other subsystem may mutate this state directly. The boxes are created in the constructor: m_pBox(new PalBox(cpuId, ...)), m_eBox(new EBox(cpuId)), m_fBox(new FBox(cpuId)), m_mBox(new MBox(cpuId)), m_iBox(new IBox(cpuId, ...)).

 


 

12.3.2 AlphaCPU Does Not Own

 

AlphaCPU holds references to shared subsystems but does not own them:

 

// Subsystem References (Injected)

ReservationManager* m_reservationManager; // → globalReservationManager()

IPIManager* m_ipiManager; // → global_IPIManager()

MemoryBarrierCoordinator* m_memoryBarrierCoordinator; // → global_MemoryBarrierCoordinator()

Ev6SPAMShardManager* m_tlb; // → globalEv6SPAM()

 

Also not owned: GuestMemory (shared), SafeMemory (shared), MMIOManager, DeviceManager, and ExecutionCoordinator. These are accessed via global accessor functions or injected pointers only.

 

See Also: 4.2 Box-Based (six execution boxes) Execution Model; cpuCoreLib/AlphaCPU.h.