6.10 TRAPB - Trap Barrier

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 6 - Serialization and Stall Model >

6.10 TRAPB - Trap Barrier

6.10.1 Semantics

 

TRAPB ensures precise arithmetic trap behavior. It guarantees that all arithmetic traps from prior instructions are resolved and no later instruction executes before trap resolution.

 

6.10.2 Implementation

 

CBox::executeTRAPB() drains write buffers (to ensure memory-side operations have completed), then sets both slot.serialized = true and slot.mustComplete = true. The mustComplete flag signals the pipeline that all older slots must retire before this barrier advances.

 

// CBox::executeTRAPB()

drainWriteBuffers(&slot);

slot.serialized = true;

slot.mustComplete = true;

 

6.10.3 Release Conditions

 

TRAPB is released when: all older pipeline slots are empty and all pending arithmetic traps are resolved.

 

See Also: CBoxLib/CBoxBase.h (executeTRAPB).