|
<< 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 |
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.
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;
TRAPB is released when: all older pipeline slots are empty and all pending arithmetic traps are resolved.
See Also: CBoxLib/CBoxBase.h (executeTRAPB).