目的与范围
用途与范围
HiF4X2 是 PTO 已分配的数值格式。本页帮助读者把载体布局、有限值分解和值分类联系起来;确切契约仍由 ASL 所有者中的 HiF4X2NumericFormatDescriptor、HiF4X2FiniteDecomposition 和 ClassifyHiF4X2 定义。
PTO-ARCH-DATA-TYPES-FORMAT-HIF4X2下面是该指令所有者中的 Operation;页面没有重写这段行为。
// PTO-REQ-HARDWARE-NUMERIC-001: exact HiF4 E1M2 logical lanes.
pure func HiF4X2NumericFormatDescriptor() => NumericFormatDescriptorbegin return NumericFormatDescriptor { available = TRUE, kind = NumericFormatKind_FixedBinary, carrier_bits = 8, lane_bits = 4, lanes_per_carrier = 2, sign_bits = 1, sign_bit = 3, exponent_bits_min = 1, exponent_bits_max = 1, fraction_bits_min = 2, fraction_bits_max = 2, exponent_bias_available = TRUE, exponent_bias = 1, required_low_zero_bits = 0, required_high_zero_bits = 0, has_zero = TRUE, has_signed_zero = TRUE, has_subnormal = FALSE, has_infinity = FALSE, has_quiet_nan = FALSE, has_signaling_nan = FALSE };end;
pure func HiF4X2FiniteDecomposition(value: Word) => (boolean, boolean, Word, integer {-1074..1023})begin let lane = value[3:0]; let exponent = lane[2:2]; let fraction = lane[1:0]; if exponent == Zeros{1} then if fraction == Zeros{2} then return (TRUE, lane[3] == '1', Zeros{PTO_XLEN}, 0); else return (TRUE, lane[3] == '1', ZeroExtend{PTO_XLEN}(fraction), -2); end; else return (TRUE, lane[3] == '1', LSL(Zeros{PTO_XLEN} + 1, 2) + ZeroExtend{PTO_XLEN}(fraction), -2); end;end;pure func ClassifyHiF4X2(value: Word) => NumericValueClassbegin return NumericValueClassFromFiniteSign(value[3], value[2:0] == Zeros{3}, FALSE);end;
pure func HiF4X2SignedZeroEncodings() => (Word, Word)begin return (Zeros{PTO_XLEN}, Zeros{PTO_XLEN} + 0x8);end;// PTO-UNIT: {"id":"PTO-ARCH-DATA-TYPES-FORMAT-HIF4X2","surface":"arch","classification":["data-types","formats","hif4x2"],"depends_on":["PTO-ARCH-DATA-TYPES-FORMAT-DESCRIPTOR"]}// DOC-BEGIN: operation// PTO-REQ-HARDWARE-NUMERIC-001: exact HiF4 E1M2 logical lanes.
pure func HiF4X2NumericFormatDescriptor() => NumericFormatDescriptorbegin return NumericFormatDescriptor { available = TRUE, kind = NumericFormatKind_FixedBinary, carrier_bits = 8, lane_bits = 4, lanes_per_carrier = 2, sign_bits = 1, sign_bit = 3, exponent_bits_min = 1, exponent_bits_max = 1, fraction_bits_min = 2, fraction_bits_max = 2, exponent_bias_available = TRUE, exponent_bias = 1, required_low_zero_bits = 0, required_high_zero_bits = 0, has_zero = TRUE, has_signed_zero = TRUE, has_subnormal = FALSE, has_infinity = FALSE, has_quiet_nan = FALSE, has_signaling_nan = FALSE };end;
pure func HiF4X2FiniteDecomposition(value: Word) => (boolean, boolean, Word, integer {-1074..1023})begin let lane = value[3:0]; let exponent = lane[2:2]; let fraction = lane[1:0]; if exponent == Zeros{1} then if fraction == Zeros{2} then return (TRUE, lane[3] == '1', Zeros{PTO_XLEN}, 0); else return (TRUE, lane[3] == '1', ZeroExtend{PTO_XLEN}(fraction), -2); end; else return (TRUE, lane[3] == '1', LSL(Zeros{PTO_XLEN} + 1, 2) + ZeroExtend{PTO_XLEN}(fraction), -2); end;end;pure func ClassifyHiF4X2(value: Word) => NumericValueClassbegin return NumericValueClassFromFiniteSign(value[3], value[2:0] == Zeros{3}, FALSE);end;
pure func HiF4X2SignedZeroEncodings() => (Word, Word)begin return (Zeros{PTO_XLEN}, Zeros{PTO_XLEN} + 0x8);end;// DOC-END: operation
HiF4X2 是 PTO 已分配的数值格式。本页帮助读者把载体布局、有限值分解和值分类联系起来;确切契约仍由 ASL 所有者中的 HiF4X2NumericFormatDescriptor、HiF4X2FiniteDecomposition 和 ClassifyHiF4X2 定义。
描述符使用 8 位载体、4 位逻辑 lane,并且每个载体包含 2 个 lane。lane 的符号位位于 3,具有 1 个指数位、2 个尾数位,指数偏置为 1。
描述符一次描述一个 4 位逻辑 lane;两个 lane 共同占用 8 位载体。
HiF4X2FiniteDecomposition 先报告有限值分解是否可用;可用时返回符号、整数有效数和二进制指数。ClassifyHiF4X2 则独立地把原始 lane 归入该格式所支持的零、次正规数、正规数、无穷大或 NaN 类别。
它具有带符号零,但没有次正规数类别、无穷大或 NaN 类别。每个非零 4 位 lane 都被分类为带符号正规值。
lane 编码 0x0 和 0x8 分别表示正零与负零。
有限值分解函数在返回的元组中报告可用性;值分类是另一个函数的独立结果。
下面的示例只演示如何阅读这些函数,不增加编码规则。
例如,lane 0x1 分解为正的有效数 1 和指数 -2;lane 0x9 具有相同幅值但符号为负。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
8 matching entries
PTO-AVS-ARCH-DATA-TYPES-FORMAT-HIF4X2-STATIC-001tests/asl/arch/data-types/formats/hif4x2/arch-static-hif4x2-contract-001.asl3eff9ff2db2faf23172a669f09c457d6b8a77942e868ad54893f3b1ed2a8f8d8PTO-AVS-ARCH-HIF4X2-DECOMP-001tests/asl/arch/data-types/formats/hif4x2/arch-bound-hif4x2-decomp-001.asld18caabbe5124c6ee837f6efcaeb40c4271a3f6f3331927aba34d61f1195082fPTO-EVIDENCE-RELEASE-TRACEABILITYPTO-EVIDENCE-RELEASE-TRACEABILITYspec/evidence/release-traceability-readiness.jsonc7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3ePTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREspec/evidence/instruction-contract-closure.json3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106aPTO-EVIDENCE-ARCHITECTURE-READINESSPTO-EVIDENCE-ARCHITECTURE-READINESSspec/evidence/architecture-readiness.json4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004PTO-EVIDENCE-RELEASE-GATE-READINESSPTO-EVIDENCE-RELEASE-GATE-READINESSspec/evidence/release-gate-readiness.jsona0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0PTO-EVIDENCE-RELEASE-MANIFESTPTO-EVIDENCE-RELEASE-MANIFESTspec/release-manifest.json1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8Loading ADR-0048…
ADR-0048docs/status/decisions/0048-numeric-format-value-classification.mdce3ecd1851e22b5517d07076ab8bd2db36b6b4582111c761db19240275853d9c{
"classification": [
"data-types",
"formats",
"hif4x2"
],
"documentation": "docs/arch/data-types/formats/hif4x2.md",
"id": "PTO-ARCH-DATA-TYPES-FORMAT-HIF4X2",
"mnemonic": null,
"readiness_subjects": [
"ADR-0048"
],
"semantic_tests": [
"PTO-AVS-ARCH-HIF4X2-DECOMP-001"
],
"source": "asl/arch/data-types/formats/hif4x2.asl",
"surface": "arch",
"tests": [
"PTO-AVS-ARCH-DATA-TYPES-FORMAT-HIF4X2-STATIC-001",
"PTO-AVS-ARCH-HIF4X2-DECOMP-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd8681223949a2352947103162ec73c6b37ff9f905e5ea6de3caebeb89c80f399c5e62245c3dd899fe1211d45cd5bfa68f01c3bfb4d672051e4eadcfa3423675e499633asl/arch/data-types/formats/hif4x2.asl