跳到主要内容
页面框架已切换为简体中文。尚未完成本地化的交互标签暂时使用英文;ASL/NDF 源、稳定标识和证据在所有语言中保持原文。

PTO-SCALAR-MODEL-DISPATCH-FSU

PTO-SCALAR-MODEL-DISPATCH-FSU

ASL 伪代码

下面直接显示完整的 ASL 所有者。

// PTO-UNIT: {"id":"PTO-SCALAR-MODEL-DISPATCH-FSU","surface":"scalar","classification":["model","dispatch","fsu"],"depends_on":["PTO-SCALAR-MODEL-DISPATCH-DECODE","PTO-SCALAR-MODEL-FSU-PROFILE","PTO-SCALAR-FABS","PTO-SCALAR-FADD","PTO-SCALAR-FCVT","PTO-SCALAR-FCVTA","PTO-SCALAR-FCVTM","PTO-SCALAR-FCVTN","PTO-SCALAR-FCVTP","PTO-SCALAR-FCVTZ","PTO-SCALAR-FDIV","PTO-SCALAR-FEQ","PTO-SCALAR-FEQS","PTO-SCALAR-FEXP","PTO-SCALAR-FGE","PTO-SCALAR-FGES","PTO-SCALAR-FLT","PTO-SCALAR-FLTS","PTO-SCALAR-FMADD","PTO-SCALAR-FMAX","PTO-SCALAR-FMIN","PTO-SCALAR-FMSUB","PTO-SCALAR-FMUL","PTO-SCALAR-FNE","PTO-SCALAR-FNES","PTO-SCALAR-FNMADD","PTO-SCALAR-FNMSUB","PTO-SCALAR-FRECIP","PTO-SCALAR-FSQRT","PTO-SCALAR-FSUB","PTO-SCALAR-SCVTF","PTO-SCALAR-UCVTF"]}pure func ScalarDecodedFPSourceType(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1}) => bits(2)begin    return DecodeScalarOperandRaw(instruction, form, ScalarField_SrcType)[1:0];end;
func ExecuteDecodedFPBinary(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    operation: FloatingBinaryOperation)begin    let source_selector = ScalarDecodedFPSourceType(instruction, form);    let source_type = ScalarFPSourceTypeCode(source_selector);    if !ScalarFPTypeCodeSupported(source_type) then        SetFault(Fault_IllegalInstruction, ReadPC());        return;    end;    let left = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        source_type);    let right = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        source_type);    var result: Word;    var flags: bits(5);    if operation == FloatingBinary_MIN || operation == FloatingBinary_MAX then        result = ScalarFPMinMax(operation, left, right, source_selector);        flags = if ScalarFPIsSignalingNaN(left, source_selector) ||                   ScalarFPIsSignalingNaN(right, source_selector)                then Zeros{5} + 1 else Zeros{5};    else        (result, flags) = ScalarFPBinaryProfile(            operation, ScalarFPActiveRoundingMode(), source_type, left, right);    end;    ScalarFPRecordFlags(flags);    WriteScalarDestination(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        NormalizeScalarFPResult(result, source_type));end;
func ExecuteDecodedFPUnary(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    operation: FloatingUnaryOperation)begin    let source_selector = ScalarDecodedFPSourceType(instruction, form);    let source_type = ScalarFPSourceTypeCode(source_selector);    if !ScalarFPTypeCodeSupported(source_type) then        SetFault(Fault_IllegalInstruction, ReadPC());        return;    end;    let value = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        source_type);    var result: Word;    var flags: bits(5);    if operation == FloatingUnary_ABS then        if source_selector == '01' then            result = ZeroExtend{PTO_XLEN}(                value[31:0] AND (Zeros{32} + 0x7fffffff));        else            result = value AND (Zeros{PTO_XLEN} + 0x7fffffffffffffff);        end;        flags = Zeros{5};    else        (result, flags) = ScalarFPUnaryProfile(            operation, ScalarFPActiveRoundingMode(), source_type, value);    end;    ScalarFPRecordFlags(flags);    WriteScalarDestination(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        NormalizeScalarFPResult(result, source_type));end;
func ExecuteDecodedFPCompare(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    operation: FloatingCompareOperation, signaling: boolean)begin    let source_selector = ScalarDecodedFPSourceType(instruction, form);    let source_type = ScalarFPSourceTypeCode(source_selector);    if !ScalarFPTypeCodeSupported(source_type) then        SetFault(Fault_IllegalInstruction, ReadPC());        return;    end;    let left = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        source_type);    let right = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        source_type);    let any_nan = ScalarFPIsNaN(left, source_selector) ||                  ScalarFPIsNaN(right, source_selector);    let any_signaling_nan = ScalarFPIsSignalingNaN(left, source_selector) ||                            ScalarFPIsSignalingNaN(right, source_selector);    if (signaling && any_nan) || any_signaling_nan then        ScalarFPRecordFlags(Zeros{5} + 1);    end;    let comparison = ScalarFPEncodingCompare(        operation, left, right, source_selector);    WriteScalarDestination(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        if comparison then Zeros{PTO_XLEN} + 1 else Zeros{PTO_XLEN});end;
func ExecuteDecodedFPFused(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    operation: FloatingFusedOperation)begin    let source_selector = ScalarDecodedFPSourceType(instruction, form);    let source_type = ScalarFPSourceTypeCode(source_selector);    if !ScalarFPTypeCodeSupported(source_type) then        SetFault(Fault_IllegalInstruction, ReadPC());        return;    end;    let addend = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcA),        source_type);    let left = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        source_type);    let right = NormalizeScalarFPSource(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        source_type);    let (result, flags) = ScalarFPFusedProfile(        operation, ScalarFPActiveRoundingMode(), source_type,        addend, left, right);    ScalarFPRecordFlags(flags);    WriteScalarDestination(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        NormalizeScalarFPResult(result, source_type));end;
func ExecuteDecodedFPConvert(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    operation: ScalarOperation)begin    let source_selector = ScalarDecodedFPSourceType(instruction, form);    let destination_type = ScalarDecodedBits5(        instruction, form, ScalarField_DstType);    var source_type: bits(5);    var source_supported: boolean;    var destination_supported: boolean;    if operation == ScalarOperation_SCVTF then        source_type = ScalarSignedIntegerSourceTypeCode(source_selector);        source_supported = ScalarIntegerTypeCodeSupported(source_type);        destination_supported = ScalarFPTypeCodeSupported(destination_type);    elsif operation == ScalarOperation_UCVTF then        source_type = ScalarUnsignedIntegerSourceTypeCode(source_selector);        source_supported = ScalarIntegerTypeCodeSupported(source_type);        destination_supported = ScalarFPTypeCodeSupported(destination_type);    else        source_type = ScalarFPSourceTypeCode(source_selector);        source_supported = ScalarFPTypeCodeSupported(source_type);        if operation == ScalarOperation_FCVT then            destination_supported = ScalarFPTypeCodeSupported(destination_type);        else            destination_supported = ScalarIntegerTypeCodeSupported(destination_type);        end;    end;    if !source_supported || !destination_supported then        SetFault(Fault_IllegalInstruction, ReadPC());        return;    end;
    // Type legality is resolved before this first architectural source read.    let value = ReadDecodedScalarRegister(        instruction, form, ScalarField_SrcL);    var result: Word;    var flags: bits(5);    if operation == ScalarOperation_FCVT then        (result, flags) = ScalarFPConvertProfile(            ScalarFPActiveRoundingMode(), destination_type, source_type,            NormalizeScalarFPSource(value, source_type));        result = NormalizeScalarFPResult(result, destination_type);    elsif operation == ScalarOperation_SCVTF ||          operation == ScalarOperation_UCVTF then        (result, flags) = ScalarIntegerToFPProfile(            ScalarFPActiveRoundingMode(), source_type, destination_type,            NormalizeScalarIntegerSource(value, source_type));        result = NormalizeScalarFPResult(result, destination_type);    else        let rounding_mode = ScalarFPFixedConversionRoundingMode(operation);        (result, flags) = ScalarFPToIntegerProfile(            rounding_mode, destination_type, source_type,            NormalizeScalarFPSource(value, source_type));        result = NormalizeScalarIntegerResult(result, destination_type);    end;    ScalarFPRecordFlags(flags);    WriteScalarDestination(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst), result);end;
func ExecuteDecodedFSUForm(instruction: bits(48),                           form: integer {0..PTO_SCALAR_FORM_COUNT-1})begin    let operation = ScalarOperationOfForm(form);    case operation of        when ScalarOperation_FABS =>            ExecuteDecodedFPUnary(instruction, form, FloatingUnary_ABS);        when ScalarOperation_FEXP =>            ExecuteDecodedFPUnary(instruction, form, FloatingUnary_EXP);        when ScalarOperation_FRECIP =>            ExecuteDecodedFPUnary(instruction, form, FloatingUnary_RECIP);        when ScalarOperation_FSQRT =>            ExecuteDecodedFPUnary(instruction, form, FloatingUnary_SQRT);        when ScalarOperation_FADD =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_ADD);        when ScalarOperation_FSUB =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_SUB);        when ScalarOperation_FMUL =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_MUL);        when ScalarOperation_FDIV =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_DIV);        when ScalarOperation_FMIN =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_MIN);        when ScalarOperation_FMAX =>            ExecuteDecodedFPBinary(instruction, form, FloatingBinary_MAX);        when ScalarOperation_FEQ => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_EQ, FALSE);        when ScalarOperation_FEQS => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_EQ, TRUE);        when ScalarOperation_FNE => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_NE, FALSE);        when ScalarOperation_FNES => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_NE, TRUE);        when ScalarOperation_FLT => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_LT, FALSE);        when ScalarOperation_FLTS => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_LT, TRUE);        when ScalarOperation_FGE => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_GE, FALSE);        when ScalarOperation_FGES => ExecuteDecodedFPCompare(            instruction, form, FloatingCompare_GE, TRUE);        when ScalarOperation_FMADD => ExecuteDecodedFPFused(            instruction, form, FloatingFused_MADD);        when ScalarOperation_FMSUB => ExecuteDecodedFPFused(            instruction, form, FloatingFused_MSUB);        when ScalarOperation_FNMADD => ExecuteDecodedFPFused(            instruction, form, FloatingFused_NMADD);        when ScalarOperation_FNMSUB => ExecuteDecodedFPFused(            instruction, form, FloatingFused_NMSUB);        when ScalarOperation_FCVT, ScalarOperation_FCVTA,             ScalarOperation_FCVTM, ScalarOperation_FCVTN,             ScalarOperation_FCVTP, ScalarOperation_FCVTZ,             ScalarOperation_SCVTF, ScalarOperation_UCVTF =>            ExecuteDecodedFPConvert(instruction, form, operation);        otherwise => unreachable;    end;end;

架构行为

该内部模型单元不在双语读者指南迁移范围内;请直接阅读本页的 ASL/NDF 所有者与验证证据。

NDF 条款

正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。

No NDF clause is attached to this unit.

Evidence index

8 matching entries

Executable evidence3
  • Floating-point status flags accumulate every incoming exception bit without clearing sticky state.
    1. surfaceSCALAR
    2. ownerPTO-SCALAR-MODEL-DISPATCH-FSU
    3. categorySTATE-TRANSITION
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-SCALAR-FP-FLAGS-001
    Path
    tests/asl/scalar/model/dispatch/fsu/scalar-state-fp-flags-001.asl
    Kind / role
    state-transition
    Pass condition
    ValidateScalarFPFlagHelpers completes without assertion failure
    SHA-256
    5f55bfdfd25ff338cfdbe133858b37b2c8d5f999917d3d3961a9cfc968c09559
    Open exact source ↗ for PTO-AVS-SCALAR-FP-FLAGS-001
  • Active and fixed scalar floating-point rounding selectors map to their assigned architectural modes.
    1. surfaceSCALAR
    2. ownerPTO-SCALAR-MODEL-DISPATCH-FSU
    3. categoryBOUNDARY
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-SCALAR-FP-ROUND-001
    Path
    tests/asl/scalar/model/dispatch/fsu/scalar-bound-fp-rounding-001.asl
    Kind / role
    boundary
    Pass condition
    ValidateScalarFPRoundingHelpers completes without assertion failure
    SHA-256
    1e0f6cdd59d7b3241dcb5fb9bdcb84246e6358b3e82eeb1fdd22ee1d1c0a06bb
    Open exact source ↗ for PTO-AVS-SCALAR-FP-ROUND-001
  • PTO-SCALAR-MODEL-DISPATCH-FSU compiles as an independent normative unit
    1. surfaceSCALAR
    2. ownerPTO-SCALAR-MODEL-DISPATCH-FSU
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-SCALAR-MODEL-DISPATCH-FSU-STATIC-001
    Path
    tests/asl/scalar/model/dispatch/fsu/scalar-static-fsu-contract-001.asl
    Kind / role
    static-invariant
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    2f39d6a58e57fb8a44515ee31e68865214905e9ffdf35f64387da572cddd6454
    Open exact source ↗ for PTO-AVS-SCALAR-MODEL-DISPATCH-FSU-STATIC-001
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

Unit metadata

Open 4 generated metadata fields
id
PTO-SCALAR-MODEL-DISPATCH-FSU
surface
scalar
classification
[
  "model",
  "dispatch",
  "fsu"
]
depends_on
[
  "PTO-SCALAR-MODEL-DISPATCH-DECODE",
  "PTO-SCALAR-MODEL-FSU-PROFILE",
  "PTO-SCALAR-FABS",
  "PTO-SCALAR-FADD",
  "PTO-SCALAR-FCVT",
  "PTO-SCALAR-FCVTA",
  "PTO-SCALAR-FCVTM",
  "PTO-SCALAR-FCVTN",
  "PTO-SCALAR-FCVTP",
  "PTO-SCALAR-FCVTZ",
  "PTO-SCALAR-FDIV",
  "PTO-SCALAR-FEQ",
  "PTO-SCALAR-FEQS",
  "PTO-SCALAR-FEXP",
  "PTO-SCALAR-FGE",
  "PTO-SCALAR-FGES",
  "PTO-SCALAR-FLT",
  "PTO-SCALAR-FLTS",
  "PTO-SCALAR-FMADD",
  "PTO-SCALAR-FMAX",
  "PTO-SCALAR-FMIN",
  "PTO-SCALAR-FMSUB",
  "PTO-SCALAR-FMUL",
  "PTO-SCALAR-FNE",
  "PTO-SCALAR-FNES",
  "PTO-SCALAR-FNMADD",
  "PTO-SCALAR-FNMSUB",
  "PTO-SCALAR-FRECIP",
  "PTO-SCALAR-FSQRT",
  "PTO-SCALAR-FSUB",
  "PTO-SCALAR-SCVTF",
  "PTO-SCALAR-UCVTF"
]
Open generated traceability record
{
  "classification": [
    "model",
    "dispatch",
    "fsu"
  ],
  "documentation": "docs/scalar/model/dispatch/fsu.md",
  "id": "PTO-SCALAR-MODEL-DISPATCH-FSU",
  "mnemonic": null,
  "readiness_subjects": [],
  "semantic_tests": [
    "PTO-AVS-SCALAR-FP-FLAGS-001",
    "PTO-AVS-SCALAR-FP-ROUND-001"
  ],
  "source": "asl/scalar/model/dispatch/fsu.asl",
  "surface": "scalar",
  "tests": [
    "PTO-AVS-SCALAR-FP-FLAGS-001",
    "PTO-AVS-SCALAR-FP-ROUND-001",
    "PTO-AVS-SCALAR-MODEL-DISPATCH-FSU-STATIC-001"
  ]
}

来源与发布信息

展开 commit、路径、hash、版本和规范所有者
发布
0.58.5 · 候选发布
Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812
ASL SHA-256
07ea4132a13f28b549578473df9ba986a9e6d107c3514ac300b5ea44bc0a54a3
生成文档
docs/scalar/model/dispatch/fsu.md · 已融合到当前页面
文档 SHA-256
0028b652ed811f2c550f6b2fec339e7b3f5415afb5de6587f2c5c851ff5f7488

精确所有者