|
<< Click to Display Table of Contents >> Navigation: ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 4 - Functional Execution Domains ("Boxes) > 4.6 FBox - Floating-Point Box |
The FBox implements all floating-point execution semantics. It is the largest Box by code volume, reflecting the complexity of Alpha's multi-format floating-point architecture.
•IEEE-754 arithmetic — ADD, SUB, MUL, DIV in S (single) and T (double) formats
•VAX floating-point compatibility — F-float and G-float operations
•Format conversions — CVTST, CVTTS, CVTTQ, CVTQS, CVTQT, and cross-format conversions
•Rounding mode enforcement — round-to-nearest, round-to-zero, round-to-positive-infinity, round-to-negative-infinity, controlled by FPCR and per-instruction qualifiers (via FPVariant)
•FPCR interaction — reads and updates the Floating-Point Control Register for exception status, dynamic rounding, and trap enables
•FP exception detection — overflow, underflow, inexact, invalid operation, division by zero
•FP trap generation — handleFPTrap() checks FPCR and variant for trap conditions
•NaN propagation rules per IEEE-754 and Alpha AXP specification
•FP comparisons — CMPTUN, CMPTEQ, CMPTLT, CMPTLE
•FP conditional moves — FCMOVEQ, FCMOVNE, FCMOVLT, FCMOVGE, FCMOVLE, FCMOVGT
Floating-point operations are modeled as blocking within EX. The grain's execute() calls FBox methods (executeAdd, executeSub, executeMul, executeDiv, etc.) which read FP operands from the FP register file via slot.readFpReg(), compute the result using the appropriate FPVariant, update the FPCR, and write the result into slot.payLoad.
FBox maintains its own scoreboard (m_fpRegisterDirty, 32-bit bitmask for F0–F30, F31 always reads as zero) and busy/cycle tracking (m_busy, m_cyclesRemaining, tick()).
•Does not schedule FP operations — the pipeline controls advancement
•Does not track latency externally — multi-cycle stalling is handled internally
•Does not interact with barriers directly — CBox owns ordering
This model trades microarchitectural realism for deterministic correctness and debuggability.
Implementation: FBoxBase.h, 2,639 lines, 236 execute methods — the largest Box by method count.
See Also: FBoxLib/FBoxBase.h; Chapter 7 - Exceptions, Faults, and Interrupts.