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

PTO-SCALAR-MODEL-DISPATCH-BRU

PTO-SCALAR-MODEL-DISPATCH-BRU

ASL 伪代码

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

// PTO-UNIT: {"id":"PTO-SCALAR-MODEL-DISPATCH-BRU","surface":"scalar","classification":["model","dispatch","bru"],"depends_on":["PTO-SCALAR-MODEL-DISPATCH-DECODE","PTO-SCALAR-MODEL-BRU-SEMANTICS","PTO-SCALAR-ADDTPC","PTO-SCALAR-C-CMP-EQI","PTO-SCALAR-C-CMP-NEI","PTO-SCALAR-C-SETC-EQ","PTO-SCALAR-C-SETC-NE","PTO-SCALAR-CMP-AND","PTO-SCALAR-CMP-ANDI","PTO-SCALAR-CMP-EQ","PTO-SCALAR-CMP-EQI","PTO-SCALAR-CMP-GE","PTO-SCALAR-CMP-GEI","PTO-SCALAR-CMP-GEU","PTO-SCALAR-CMP-GEUI","PTO-SCALAR-CMP-LT","PTO-SCALAR-CMP-LTI","PTO-SCALAR-CMP-LTU","PTO-SCALAR-CMP-LTUI","PTO-SCALAR-CMP-NE","PTO-SCALAR-CMP-NEI","PTO-SCALAR-CMP-OR","PTO-SCALAR-CMP-ORI","PTO-SCALAR-HL-ADDTPC","PTO-SCALAR-HL-CMP-ANDI","PTO-SCALAR-HL-CMP-EQI","PTO-SCALAR-HL-CMP-GEI","PTO-SCALAR-HL-CMP-GEUI","PTO-SCALAR-HL-CMP-LTI","PTO-SCALAR-HL-CMP-LTUI","PTO-SCALAR-HL-CMP-NEI","PTO-SCALAR-HL-CMP-ORI","PTO-SCALAR-HL-SETC-ANDI","PTO-SCALAR-HL-SETC-EQI","PTO-SCALAR-HL-SETC-GEI","PTO-SCALAR-HL-SETC-GEUI","PTO-SCALAR-HL-SETC-LTI","PTO-SCALAR-HL-SETC-LTUI","PTO-SCALAR-HL-SETC-NEI","PTO-SCALAR-HL-SETC-ORI","PTO-SCALAR-HL-SETRET","PTO-SCALAR-J","PTO-SCALAR-JR","PTO-SCALAR-SETC-AND","PTO-SCALAR-SETC-ANDI","PTO-SCALAR-SETC-EQ","PTO-SCALAR-SETC-EQI","PTO-SCALAR-SETC-GE","PTO-SCALAR-SETC-GEI","PTO-SCALAR-SETC-GEU","PTO-SCALAR-SETC-GEUI","PTO-SCALAR-SETC-LT","PTO-SCALAR-SETC-LTI","PTO-SCALAR-SETC-LTU","PTO-SCALAR-SETC-LTUI","PTO-SCALAR-SETC-NE","PTO-SCALAR-SETC-NEI","PTO-SCALAR-SETC-OR","PTO-SCALAR-SETC-ORI","PTO-SCALAR-SETRET"]}pure func ScalarConditionForOperation(operation: ScalarOperation) => ScalarConditionbegin    case operation of        when ScalarOperation_C_CMP_EQI,             ScalarOperation_C_SETC_EQ, ScalarOperation_CMP_EQ,             ScalarOperation_CMP_EQI, ScalarOperation_HL_CMP_EQI,             ScalarOperation_HL_SETC_EQI, ScalarOperation_SETC_EQ,             ScalarOperation_SETC_EQI => return ScalarCondition_EQ;        when ScalarOperation_C_CMP_NEI,             ScalarOperation_C_SETC_NE, ScalarOperation_CMP_NE,             ScalarOperation_CMP_NEI, ScalarOperation_HL_CMP_NEI,             ScalarOperation_HL_SETC_NEI, ScalarOperation_SETC_NE,             ScalarOperation_SETC_NEI => return ScalarCondition_NE;        when ScalarOperation_CMP_LT,             ScalarOperation_CMP_LTI, ScalarOperation_HL_CMP_LTI,             ScalarOperation_HL_SETC_LTI, ScalarOperation_SETC_LT,             ScalarOperation_SETC_LTI => return ScalarCondition_LT;        when ScalarOperation_CMP_GE,             ScalarOperation_CMP_GEI, ScalarOperation_HL_CMP_GEI,             ScalarOperation_HL_SETC_GEI, ScalarOperation_SETC_GE,             ScalarOperation_SETC_GEI => return ScalarCondition_GE;        when ScalarOperation_CMP_LTU,             ScalarOperation_CMP_LTUI, ScalarOperation_HL_CMP_LTUI,             ScalarOperation_HL_SETC_LTUI, ScalarOperation_SETC_LTU,             ScalarOperation_SETC_LTUI => return ScalarCondition_LTU;        when ScalarOperation_CMP_GEU,             ScalarOperation_CMP_GEUI, ScalarOperation_HL_CMP_GEUI,             ScalarOperation_HL_SETC_GEUI, ScalarOperation_SETC_GEU,             ScalarOperation_SETC_GEUI => return ScalarCondition_GEU;        otherwise => unreachable;    end;end;
func ExecuteDecodedCompareRegister(instruction: bits(48),                                   form: integer {0..PTO_SCALAR_FORM_COUNT-1},                                   operation: ScalarOperation)begin    let right = ApplyRestrictedCompareModifier(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        ScalarDecodedComparisonRightModifier(instruction, form));    ExecuteCompare(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        ScalarConditionForOperation(operation),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL), right);end;
func ExecuteDecodedCompareImmediate(instruction: bits(48),                                    form: integer {0..PTO_SCALAR_FORM_COUNT-1},                                    operation: ScalarOperation,                                    immediate_field: ScalarOperandField)begin    ExecuteCompare(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        ScalarConditionForOperation(operation),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        ScalarDecodedWord(instruction, form, immediate_field));end;
func ExecuteDecodedCompareLogicalRegister(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    combine_or: boolean)begin    let right = ApplyScalarRightModifier(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        ScalarDecodedComparisonRightModifier(instruction, form), TRUE);    ExecuteCompareLogical(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        right, combine_or);end;
func ExecuteDecodedCompareLogicalImmediate(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    immediate_field: ScalarOperandField, combine_or: boolean)begin    ExecuteCompareLogical(        ScalarDecodedSelector(instruction, form, ScalarField_RegDst),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        ScalarDecodedWord(instruction, form, immediate_field), combine_or);end;
func ExecuteDecodedSetCommitRegister(instruction: bits(48),                                     form: integer {0..PTO_SCALAR_FORM_COUNT-1},                                     operation: ScalarOperation)begin    let right = ApplyRestrictedCompareModifier(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        ScalarDecodedComparisonRightModifier(instruction, form));    ExecuteSetCommit(ScalarConditionForOperation(operation),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL), right);end;
func ExecuteDecodedSetCommitImmediate(instruction: bits(48),                                      form: integer {0..PTO_SCALAR_FORM_COUNT-1},                                      operation: ScalarOperation,                                      immediate_field: ScalarOperandField)begin    let shifted_immediate = LSL(        ScalarDecodedWord(instruction, form, immediate_field),        ScalarDecodedUInt6(instruction, form, ScalarField_shamt));    ExecuteSetCommit(ScalarConditionForOperation(operation),        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        shifted_immediate);end;
func ExecuteDecodedSetCommitLogicalRegister(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    combine_or: boolean)begin    let right = ApplyScalarRightModifier(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR),        ScalarDecodedComparisonRightModifier(instruction, form), TRUE);    ExecuteSetCommitLogical(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        right, combine_or);end;
func ExecuteDecodedSetCommitLogicalImmediate(    instruction: bits(48), form: integer {0..PTO_SCALAR_FORM_COUNT-1},    immediate_field: ScalarOperandField, combine_or: boolean)begin    let shifted_immediate = LSL(        ScalarDecodedWord(instruction, form, immediate_field),        ScalarDecodedUInt6(instruction, form, ScalarField_shamt));    ExecuteSetCommitLogical(        ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),        shifted_immediate, combine_or);end;
func ExecuteDecodedBRUForm(instruction: bits(48),                           form: integer {0..PTO_SCALAR_FORM_COUNT-1})begin    let operation = ScalarOperationOfForm(form);    case operation of        when ScalarOperation_CMP_EQ, ScalarOperation_CMP_NE,             ScalarOperation_CMP_LT, ScalarOperation_CMP_GE,             ScalarOperation_CMP_LTU, ScalarOperation_CMP_GEU =>            ExecuteDecodedCompareRegister(instruction, form, operation);        when ScalarOperation_CMP_EQI, ScalarOperation_CMP_NEI,             ScalarOperation_CMP_LTI, ScalarOperation_CMP_GEI =>            ExecuteDecodedCompareImmediate(instruction, form, operation,                ScalarField_simm12);        when ScalarOperation_CMP_LTUI, ScalarOperation_CMP_GEUI =>            ExecuteDecodedCompareImmediate(instruction, form, operation,                ScalarField_uimm12);        when ScalarOperation_HL_CMP_EQI, ScalarOperation_HL_CMP_NEI,             ScalarOperation_HL_CMP_LTI, ScalarOperation_HL_CMP_GEI =>            ExecuteDecodedCompareImmediate(instruction, form, operation,                ScalarField_simm24);        when ScalarOperation_HL_CMP_LTUI, ScalarOperation_HL_CMP_GEUI =>            ExecuteDecodedCompareImmediate(instruction, form, operation,                ScalarField_uimm24);        when ScalarOperation_CMP_AND =>            ExecuteDecodedCompareLogicalRegister(instruction, form, FALSE);        when ScalarOperation_CMP_OR =>            ExecuteDecodedCompareLogicalRegister(instruction, form, TRUE);        when ScalarOperation_CMP_ANDI =>            ExecuteDecodedCompareLogicalImmediate(instruction, form,                ScalarField_simm12, FALSE);        when ScalarOperation_CMP_ORI =>            ExecuteDecodedCompareLogicalImmediate(instruction, form,                ScalarField_simm12, TRUE);        when ScalarOperation_HL_CMP_ANDI =>            ExecuteDecodedCompareLogicalImmediate(instruction, form,                ScalarField_simm24, FALSE);        when ScalarOperation_HL_CMP_ORI =>            ExecuteDecodedCompareLogicalImmediate(instruction, form,                ScalarField_simm24, TRUE);
        when ScalarOperation_C_CMP_EQI, ScalarOperation_C_CMP_NEI =>            ExecuteCompare(31, ScalarConditionForOperation(operation),                ReadScalarRegisterOperand(24),                ScalarDecodedWord(instruction, form, ScalarField_simm5));
        when ScalarOperation_SETC_EQ, ScalarOperation_SETC_NE,             ScalarOperation_SETC_LT, ScalarOperation_SETC_GE,             ScalarOperation_SETC_LTU, ScalarOperation_SETC_GEU =>            ExecuteDecodedSetCommitRegister(instruction, form, operation);        when ScalarOperation_SETC_EQI, ScalarOperation_SETC_NEI,             ScalarOperation_SETC_LTI, ScalarOperation_SETC_GEI =>            ExecuteDecodedSetCommitImmediate(instruction, form, operation,                ScalarField_simm12);        when ScalarOperation_SETC_LTUI, ScalarOperation_SETC_GEUI =>            ExecuteDecodedSetCommitImmediate(instruction, form, operation,                ScalarField_uimm12);        when ScalarOperation_HL_SETC_EQI, ScalarOperation_HL_SETC_NEI,             ScalarOperation_HL_SETC_LTI, ScalarOperation_HL_SETC_GEI =>            ExecuteDecodedSetCommitImmediate(instruction, form, operation,                ScalarField_simm24);        when ScalarOperation_HL_SETC_LTUI, ScalarOperation_HL_SETC_GEUI =>            ExecuteDecodedSetCommitImmediate(instruction, form, operation,                ScalarField_uimm24);        when ScalarOperation_SETC_AND =>            ExecuteDecodedSetCommitLogicalRegister(instruction, form, FALSE);        when ScalarOperation_SETC_OR =>            ExecuteDecodedSetCommitLogicalRegister(instruction, form, TRUE);        when ScalarOperation_SETC_ANDI =>            ExecuteDecodedSetCommitLogicalImmediate(instruction, form,                ScalarField_simm12, FALSE);        when ScalarOperation_SETC_ORI =>            ExecuteDecodedSetCommitLogicalImmediate(instruction, form,                ScalarField_simm12, TRUE);        when ScalarOperation_HL_SETC_ANDI =>            ExecuteDecodedSetCommitLogicalImmediate(instruction, form,                ScalarField_simm24, FALSE);        when ScalarOperation_HL_SETC_ORI =>            ExecuteDecodedSetCommitLogicalImmediate(instruction, form,                ScalarField_simm24, TRUE);        when ScalarOperation_C_SETC_EQ, ScalarOperation_C_SETC_NE =>            ExecuteSetCommit(ScalarConditionForOperation(operation),                ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL),                ReadDecodedScalarRegister(instruction, form, ScalarField_SrcR));
        when ScalarOperation_J =>            JumpRelative(ScalarDecodedWord(instruction, form, ScalarField_simm22));        when ScalarOperation_JR =>            JumpRegister(                ReadDecodedScalarRegister(instruction, form, ScalarField_SrcL) +                LSL(ScalarDecodedWord(instruction, form, ScalarField_simm12), 1));
        when ScalarOperation_ADDTPC =>            AddToPC(ScalarDecodedSelector(instruction, form, ScalarField_RegDst),                SignExtend{PTO_XLEN}(                    ScalarDecodedBits20(instruction, form, ScalarField_imm20)));        when ScalarOperation_HL_ADDTPC =>            AddToPC(ScalarDecodedSelector(instruction, form, ScalarField_RegDst),                SignExtend{PTO_XLEN}(                    ScalarDecodedBits32(instruction, form, ScalarField_imm32)));        when ScalarOperation_SETRET =>            SetReturnAddress(ZeroExtend{PTO_XLEN}(                ScalarDecodedBits20(instruction, form, ScalarField_imm20)));        when ScalarOperation_HL_SETRET =>            SetReturnAddress(ZeroExtend{PTO_XLEN}(                ScalarDecodedBits32(instruction, form, ScalarField_imm32)));        otherwise => unreachable;    end;end;

架构行为

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

NDF 条款

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

No NDF clause is attached to this unit.

Evidence index

6 matching entries

Executable evidence1
  • PTO-SCALAR-MODEL-DISPATCH-BRU compiles as an independent normative unit
    1. surfaceSCALAR
    2. ownerPTO-SCALAR-MODEL-DISPATCH-BRU
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-SCALAR-MODEL-DISPATCH-BRU-STATIC-001
    Path
    tests/asl/scalar/model/dispatch/bru/scalar-static-bru-contract-001.asl
    Kind / role
    static-invariant
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    5960be4542a0a31813171bbada059c9b95ccec5c35941ac73c0abb8ff4257677
    Open exact source ↗ for PTO-AVS-SCALAR-MODEL-DISPATCH-BRU-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-BRU
surface
scalar
classification
[
  "model",
  "dispatch",
  "bru"
]
depends_on
[
  "PTO-SCALAR-MODEL-DISPATCH-DECODE",
  "PTO-SCALAR-MODEL-BRU-SEMANTICS",
  "PTO-SCALAR-ADDTPC",
  "PTO-SCALAR-C-CMP-EQI",
  "PTO-SCALAR-C-CMP-NEI",
  "PTO-SCALAR-C-SETC-EQ",
  "PTO-SCALAR-C-SETC-NE",
  "PTO-SCALAR-CMP-AND",
  "PTO-SCALAR-CMP-ANDI",
  "PTO-SCALAR-CMP-EQ",
  "PTO-SCALAR-CMP-EQI",
  "PTO-SCALAR-CMP-GE",
  "PTO-SCALAR-CMP-GEI",
  "PTO-SCALAR-CMP-GEU",
  "PTO-SCALAR-CMP-GEUI",
  "PTO-SCALAR-CMP-LT",
  "PTO-SCALAR-CMP-LTI",
  "PTO-SCALAR-CMP-LTU",
  "PTO-SCALAR-CMP-LTUI",
  "PTO-SCALAR-CMP-NE",
  "PTO-SCALAR-CMP-NEI",
  "PTO-SCALAR-CMP-OR",
  "PTO-SCALAR-CMP-ORI",
  "PTO-SCALAR-HL-ADDTPC",
  "PTO-SCALAR-HL-CMP-ANDI",
  "PTO-SCALAR-HL-CMP-EQI",
  "PTO-SCALAR-HL-CMP-GEI",
  "PTO-SCALAR-HL-CMP-GEUI",
  "PTO-SCALAR-HL-CMP-LTI",
  "PTO-SCALAR-HL-CMP-LTUI",
  "PTO-SCALAR-HL-CMP-NEI",
  "PTO-SCALAR-HL-CMP-ORI",
  "PTO-SCALAR-HL-SETC-ANDI",
  "PTO-SCALAR-HL-SETC-EQI",
  "PTO-SCALAR-HL-SETC-GEI",
  "PTO-SCALAR-HL-SETC-GEUI",
  "PTO-SCALAR-HL-SETC-LTI",
  "PTO-SCALAR-HL-SETC-LTUI",
  "PTO-SCALAR-HL-SETC-NEI",
  "PTO-SCALAR-HL-SETC-ORI",
  "PTO-SCALAR-HL-SETRET",
  "PTO-SCALAR-J",
  "PTO-SCALAR-JR",
  "PTO-SCALAR-SETC-AND",
  "PTO-SCALAR-SETC-ANDI",
  "PTO-SCALAR-SETC-EQ",
  "PTO-SCALAR-SETC-EQI",
  "PTO-SCALAR-SETC-GE",
  "PTO-SCALAR-SETC-GEI",
  "PTO-SCALAR-SETC-GEU",
  "PTO-SCALAR-SETC-GEUI",
  "PTO-SCALAR-SETC-LT",
  "PTO-SCALAR-SETC-LTI",
  "PTO-SCALAR-SETC-LTU",
  "PTO-SCALAR-SETC-LTUI",
  "PTO-SCALAR-SETC-NE",
  "PTO-SCALAR-SETC-NEI",
  "PTO-SCALAR-SETC-OR",
  "PTO-SCALAR-SETC-ORI",
  "PTO-SCALAR-SETRET"
]
Open generated traceability record
{
  "classification": [
    "model",
    "dispatch",
    "bru"
  ],
  "documentation": "docs/scalar/model/dispatch/bru.md",
  "id": "PTO-SCALAR-MODEL-DISPATCH-BRU",
  "mnemonic": null,
  "readiness_subjects": [],
  "semantic_tests": [],
  "source": "asl/scalar/model/dispatch/bru.asl",
  "surface": "scalar",
  "tests": [
    "PTO-AVS-SCALAR-MODEL-DISPATCH-BRU-STATIC-001"
  ]
}

来源与发布信息

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

精确所有者