Skip to main content

PTO-ARCH-DATA-TYPES-FP19

PTO-ARCH-DATA-TYPES-FP19

ASL pseudocode

The complete ASL owner is shown directly below.

// PTO-UNIT: {"id":"PTO-ARCH-DATA-TYPES-FP19","surface":"arch","classification":["data-types","fp19"],"depends_on":["PTO-ARCH-DATA-TYPES-NUMERIC-CLASSIFICATION"]}// FP19 is the architectural scalar/vector parameter carrier used by B.FPATR.// NDF-BEGIN: PTO-FP19-PARAMETER-CARRIER-001// ndf: kind=contract level=L1 layer=architecture status=accepted// FP19 MUST use one sign bit, an eight-bit bias-127 exponent, and a ten-bit// fraction. B.FPATR scales MUST be positive normal values; activation// parameters MUST be positive zero or positive normal values. Subnormal and// non-finite FP19 parameter carriers are illegal before architectural effects.// NDF-END: PTO-FP19-PARAMETER-CARRIER-001
pure func FP19PowerOfTwo(exponent: integer {-136..127}) => realbegin    var result: real = 1.0;    if exponent > 0 then        for step = 1 to exponent looplimit 127 do            result = result * 2.0;        end;    elsif exponent < 0 then        for step = 1 to -exponent looplimit 136 do            result = result / 2.0;        end;    end;    return result;end;
pure func FP19ValueClass(value: bits(19)) => NumericValueClassbegin    let exponent = value[17:10];    let fraction = value[9:0];    if exponent == Ones{8} then        if fraction == Zeros{10} then            if value[18] == '1' then                return NumericValue_NegativeInfinity;            else                return NumericValue_PositiveInfinity;            end;        elsif fraction[9] == '1' then            return NumericValue_QuietNaN;        else            return NumericValue_SignalingNaN;        end;    end;    return NumericValueClassFromFiniteSign(        value[18],        exponent == Zeros{8} && fraction == Zeros{10},        exponent == Zeros{8} && fraction != Zeros{10});end;
pure func FP19FiniteValue(value: bits(19)) => realbegin    let exponent = UInt(value[17:10]);    let fraction = UInt(value[9:0]);    assert exponent != 255;    var magnitude: real = 0.0;    if exponent == 0 then        magnitude = Real(fraction) * FP19PowerOfTwo(-136);    else        magnitude = (1.0 + Real(fraction) / 1024.0) *            FP19PowerOfTwo((exponent - 127) as integer {-126..127});    end;    if value[18] == '1' then return -magnitude; end;    return magnitude;end;
pure func FP19ScaleLegal(value: bits(19)) => booleanbegin    return FP19ValueClass(value) == NumericValue_PositiveNormal;end;
pure func FP19ActivationParameterLegal(value: bits(19)) => booleanbegin    let value_class = FP19ValueClass(value);    return value_class == NumericValue_PositiveZero ||           value_class == NumericValue_PositiveNormal;end;
pure func FP32ToFP19(value: Word) => bits(19)begin    let source = value[31:0];    let source_class = ClassifyFP32(source);    if NumericValueClassIsNaN(source_class) then        return '0111111111100000000';    end;    var exponent: integer {0..256} = UInt(source[30:23]);    var fraction: integer {0..1024} = UInt(source[22:13]);    let discarded = UInt(source[12:0]);    let halfway = 0x1000;    if discarded > halfway ||       (discarded == halfway && fraction MOD 2 == 1) then        assert fraction <= 1023;        fraction = (fraction + 1) as integer {0..1024};        if fraction == 0x400 then            fraction = 0;            if exponent < 255 then                exponent = (exponent + 1) as integer {0..256};            end;        end;    end;    var result = Zeros{19};    assert exponent <= 255;    assert fraction <= 1023;    result[18] = source[31];    result[17:10] = Zeros{8} + (exponent as integer {0..255});    result[9:0] = Zeros{10} + (fraction as integer {0..1023});    return result;end;

Architecture behavior

purpose scope

Purpose and scope

FP19 is the 19-bit scalar and vector parameter carrier consumed by B.FPATR; this unit fixes its representation, legal parameter domains, finite interpretation, and conversion from FP32.

The carrier is defined here so scale and activation legality can be checked before an instruction produces architectural effects.

concepts state

Concepts and visible state

  • The layout is one sign bit, an eight-bit exponent with bias 127, and a ten-bit fraction.
  • FP19ValueClass classifies zero, subnormal, normal, infinity, quiet NaN, and signaling NaN using the 19-bit fields.
  • FP19FiniteValue interprets finite carriers; FP32ToFP19 narrows FP32 by retaining the upper ten fraction bits and rounding discarded bits to nearest with ties to even.
rules interactions

Rules and interactions

FP19ScaleLegal accepts only NumericValue_PositiveNormal.

FP19ActivationParameterLegal accepts NumericValue_PositiveZero or NumericValue_PositiveNormal.

FP32ToFP19 maps any FP32 NaN to the fixed carrier 0111111111100000000 and handles fraction carry into the exponent.

boundaries

Architectural boundaries

Subnormal, negative, infinity, and NaN carriers are outside the legal scale domain. Activation additionally permits positive zero, but no other extra class.

FP19FiniteValue asserts that the exponent is not 255; non-finite inputs must be classified and rejected before calling it.

example usage

illustrative reading example

A positive normal scale passes FP19ScaleLegal; the same bit pattern with the sign bit set does not, even though it still represents a finite value.

For an activation parameter, positive zero is legal while negative zero is not. The exact result follows the value-class check in the ASL owner.

NDF clauses

Bodies come from owning ASL. Dragging or buttons change only this page-session view order.

    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FP19
    3. categoryFP19-PARAMETER-CARRIER
    4. case001

    Normative contract

    contract · L1 · accepted

    FP19 MUST use one sign bit, an eight-bit bias-127 exponent, and a ten-bit fraction. B.FPATR scales MUST be positive normal values; activation parameters MUST be positive zero or positive normal values. Subnormal and non-finite FP19 parameter carriers are illegal before architectural effects.

    Sources and references
    Complete stable ID
    PTO-FP19-PARAMETER-CARRIER-001
    Source path
    asl/arch/data-types/fp19.asl
    Affected units
    PTO-ARCH-DATA-TYPES-FP19
    Source SHA-256
    3733d0d930df3f890b4aa5237dfface8f0cc2081f42244f45aae711435865fa6
    Clause SHA-256
    933963f2da6a418a8bb89abf397bd1f33c34df14b804492ff3509011821a1535
    Open exact canonical source ↗

Evidence index

10 matching entries

Executable evidence4
  • PTO-ARCH-DATA-TYPES-FP19 compiles as an independent normative unit
    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FP19
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-DATA-TYPES-FP19-STATIC-001
    Path
    tests/asl/arch/data-types/fp19/arch-static-fp19-contract-001.asl
    Kind / role
    static-invariant
    Requirements
    PTO-FP19-PARAMETER-CARRIER-001
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    50df6e60423b3392350e3af3ee65daebd30fd5d6b262d73f408aaaddb8ab852e
    Open exact source ↗ for PTO-AVS-ARCH-DATA-TYPES-FP19-STATIC-001
  • FP19 classifies and decodes its assigned sign, exponent, and fraction fields
    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FP19
    3. categoryBOUNDARY
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-FP19-ENC-001
    Path
    tests/asl/arch/data-types/fp19/arch-bound-fp19-encoding-001.asl
    Kind / role
    boundary
    Requirements
    PTO-FP19-PARAMETER-CARRIER-001
    Pass condition
    zero, finite scales, infinity, NaN, and exact FP32 conversion use canonical FP19 encodings
    SHA-256
    4589d293a72d48a38f0ed10e3ff043b9e40a853c35496e28e57bca7bebf92967
    Open exact source ↗ for PTO-AVS-ARCH-FP19-ENC-001
  • FP19 scale and activation carriers reject subnormal and non-finite encodings
    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FP19
    3. categoryBOUNDARY
    4. case002
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-FP19-PARAMETER-DOMAIN-002
    Path
    tests/asl/arch/data-types/fp19/arch-bound-fp19-parameter-domain-002.asl
    Kind / role
    boundary
    Requirements
    PTO-FP19-PARAMETER-CARRIER-001
    Pass condition
    only positive normal scales and positive zero or normal activation parameters are legal
    SHA-256
    972bd0e343c30dbb0c240c2175f0c276b9b8aa6cf9c0ca5cdb1ec36c5a33175e
    Open exact source ↗ for PTO-AVS-ARCH-FP19-PARAMETER-DOMAIN-002
  • Matrix vector parameter preflight rejects subnormal FP19 carriers
    1. surfaceTILE
    2. ownerPTO-TILE-MODEL-LEGALITY-MATRIX-POSTPROCESS
    3. categoryBOUNDARY
    4. case002
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-TILE-MATRIX-PARAMS-002
    Path
    tests/asl/tile/model/legality/matrix-postprocess/tile-bound-matrix-params-002.asl
    Kind / role
    boundary
    Requirements
    PTO-MATRIX-POSTPROCESS-BITEXACT-001, PTO-FP19-PARAMETER-CARRIER-001
    Pass condition
    normal quantization and activation carriers pass while subnormal and nonzero-unused-bit words reject
    SHA-256
    9103c56ebc98d0f221d43e774a367f91d6e5c7cd530cfaa2b88dc95daec57f49
    Open exact source ↗ for PTO-AVS-TILE-MATRIX-PARAMS-002
Commit-scoped evidence5
  • spec/evidence/release-traceability-readiness.json · closedPTO-EVIDENCE-RELEASE-TRACEABILITY
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-TRACEABILITY
    Path
    spec/evidence/release-traceability-readiness.json
    Kind / role
    ASL/NDF/documentation/AVS traceability
    SHA-256
    c7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3e
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-TRACEABILITY
  • spec/evidence/instruction-contract-closure.json · closedPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
    Path
    spec/evidence/instruction-contract-closure.json
    Kind / role
    mnemonic and encoding contract closure
    SHA-256
    3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106a
    Open exact source ↗ for PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
  • spec/evidence/architecture-readiness.json · openPTO-EVIDENCE-ARCHITECTURE-READINESS
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-ARCHITECTURE-READINESS
    Path
    spec/evidence/architecture-readiness.json
    Kind / role
    architecture maturity and blockers
    SHA-256
    4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004
    Open exact source ↗ for PTO-EVIDENCE-ARCHITECTURE-READINESS
  • spec/evidence/release-gate-readiness.json · ready-for-exact-head-verificationPTO-EVIDENCE-RELEASE-GATE-READINESS
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-GATE-READINESS
    Path
    spec/evidence/release-gate-readiness.json
    Kind / role
    exact-head gate readiness
    SHA-256
    a0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-GATE-READINESS
  • spec/release-manifest.json · draftPTO-EVIDENCE-RELEASE-MANIFEST
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-MANIFEST
    Path
    spec/release-manifest.json
    Kind / role
    release content and encoding fingerprints
    SHA-256
    1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-MANIFEST
Decision history1
  • Numeric post-process and format operations · accepted
    1. decision recordADR
    2. case0085

    Decision record

    Loading ADR-0085…

    Sources and references
    Complete stable ID
    ADR-0085
    Path
    docs/status/decisions/0085-numeric-postprocess-and-format-operations.md
    Affected units
    PTO-ARCH-DATA-TYPES-FP19, PTO-BLOCK-B-FPATR, PTO-TILE-TCVT
    Affected NDF
    PTO-B-FPATR-MATRIX-POSTPROCESS-001, PTO-FP19-PARAMETER-CARRIER-001, PTO-TCVT-CONTRACT-001
    SHA-256
    d4f1057dcc23ae62c01a08c6c4664b0b6ffa024ae45eafd776f67327d98cb9e9
    Open exact decision source ↗ for ADR-0085

Unit metadata

Open 4 generated metadata fields
id
PTO-ARCH-DATA-TYPES-FP19
surface
arch
classification
[
  "data-types",
  "fp19"
]
depends_on
[
  "PTO-ARCH-DATA-TYPES-NUMERIC-CLASSIFICATION"
]
Open generated traceability record
{
  "classification": [
    "data-types",
    "fp19"
  ],
  "documentation": "docs/arch/data-types/fp19.md",
  "id": "PTO-ARCH-DATA-TYPES-FP19",
  "mnemonic": null,
  "readiness_subjects": [
    "ADR-0085"
  ],
  "semantic_tests": [
    "PTO-AVS-ARCH-FP19-ENC-001",
    "PTO-AVS-ARCH-FP19-PARAMETER-DOMAIN-002"
  ],
  "source": "asl/arch/data-types/fp19.asl",
  "surface": "arch",
  "tests": [
    "PTO-AVS-ARCH-DATA-TYPES-FP19-STATIC-001",
    "PTO-AVS-ARCH-FP19-ENC-001",
    "PTO-AVS-ARCH-FP19-PARAMETER-DOMAIN-002"
  ]
}

Sources and release identity

Show commit, paths, hashes, version, and canonical owners
Release
0.58.5 · Release candidate
Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812
ASL SHA-256
3733d0d930df3f890b4aa5237dfface8f0cc2081f42244f45aae711435865fa6
Generated documentation
docs/arch/data-types/fp19.md · embedded in this page
Documentation SHA-256
dd496a42435846c1805e45d9f0dfa579a38906c90eb9b6bcced2bc7f46d4297d

Exact owners