Skip to main content

PTO-SCALAR-MODEL-BRU-SEMANTICS

PTO-SCALAR-MODEL-BRU-SEMANTICS

ASL pseudocode

The complete ASL owner is shown directly below.

// PTO-UNIT: {"id":"PTO-SCALAR-MODEL-BRU-SEMANTICS","surface":"scalar","classification":["model","bru","semantics"],"depends_on":["PTO-SCALAR-MODEL-ALU-SEMANTICS"]}// PTO-REQ-SCALAR-CONTROL-001: direct scalar comparison and control transfer.
pure func ConditionHolds(condition: ScalarCondition, left: Word, right: Word) => booleanbegin    case condition of        when ScalarCondition_EQ  => return left == right;        when ScalarCondition_NE  => return left != right;        when ScalarCondition_LT  => return SInt(left) < SInt(right);        when ScalarCondition_GE  => return SInt(left) >= SInt(right);        when ScalarCondition_LTU => return UInt(left) < UInt(right);        when ScalarCondition_GEU => return UInt(left) >= UInt(right);        when ScalarCondition_Z   => return IsZero(left);        when ScalarCondition_NZ  => return !IsZero(left);    end;end;
readonly func ReadBranchPredicate() => Wordbegin    // SETC.* supplies the coupled-bundle predicate. P0..P7 are a distinct    // register file and have no accepted PTO instruction consumer.    return _CommitArgument;end;
func BranchRelative(condition: ScalarCondition, left: Word, right: Word,                    halfword_offset: Word)begin    let current_pc = ReadPC();    if ConditionHolds(condition, left, right) then        WritePC(current_pc + LSL(halfword_offset, 1));    else        WritePC(current_pc + 4);    end;end;
func JumpRegister(target: Word)begin    if target[0] == '1' then        SetFault(Fault_InstructionPC, target);    else        WritePC(target);    end;end;
func ExecuteCompare(destination: Reg5Selector, condition: ScalarCondition,                    left: Word, right: Word)begin    let result = if ConditionHolds(condition, left, right) then        Zeros{PTO_XLEN} + 1 else Zeros{PTO_XLEN};    WriteScalarDestination(destination, result);end;
func ExecuteCompareLogical(destination: Reg5Selector, left: Word,                           right: Word, combine_or: boolean)begin    let logical_result = if combine_or then left OR right else left AND right;    WriteScalarDestination(destination,        if IsZero(logical_result) then Zeros{PTO_XLEN}        else Zeros{PTO_XLEN} + 1);end;
func ExecuteSetCommit(condition: ScalarCondition, left: Word, right: Word)begin    _CommitArgument = if ConditionHolds(condition, left, right) then        Zeros{PTO_XLEN} + 1 else Zeros{PTO_XLEN};    if _BundleActive then _BARG.taken = !IsZero(_CommitArgument); end;    _BundleConditionSet = TRUE;end;
func ExecuteSetCommitLogical(left: Word, right: Word, combine_or: boolean)begin    let logical_result = if combine_or then left OR right else left AND right;    _CommitArgument = if IsZero(logical_result) then Zeros{PTO_XLEN}                      else Zeros{PTO_XLEN} + 1;    if _BundleActive then _BARG.taken = !IsZero(_CommitArgument); end;    _BundleConditionSet = TRUE;end;
func SetReturnAddress(halfword_offset: Word)begin    let target = ReadTPC() + LSL(halfword_offset, 1);    // SETRET's assembly destination is Ra (R10). The bundle-local return    // address mirrors the same target for BSTART.RET and frame recovery.    WriteGPR(10, target);    _ReturnAddress = target;end;
func JumpRelative(halfword_offset: Word)begin    WritePC(ReadPC() + LSL(halfword_offset, 1));end;
func AddToPC(destination: Reg5Selector, page_offset: Word)begin    WriteScalarDestination(destination, ReadTPC() + LSL(page_offset, 12));end;

Architecture behavior

This internal model unit is documented through its normative ASL/NDF owners and validation evidence; it has no reader-guide migration target.

NDF clauses

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

No NDF clause is attached to this unit.

Evidence index

6 matching entries

Executable evidence1
  • PTO-SCALAR-MODEL-BRU-SEMANTICS compiles as an independent normative unit
    1. surfaceSCALAR
    2. ownerPTO-SCALAR-MODEL-BRU-SEMANTICS
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-SCALAR-MODEL-BRU-SEMANTICS-STATIC-001
    Path
    tests/asl/scalar/model/bru/semantics/scalar-static-semantics-contract-001.asl
    Kind / role
    static-invariant
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    f468f142a5a81e5b1e8d8ea35ccdce48be6e318e14ca1a79a1b67ebe7f3b2884
    Open exact source ↗ for PTO-AVS-SCALAR-MODEL-BRU-SEMANTICS-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-BRU-SEMANTICS
surface
scalar
classification
[
  "model",
  "bru",
  "semantics"
]
depends_on
[
  "PTO-SCALAR-MODEL-ALU-SEMANTICS"
]
Open generated traceability record
{
  "classification": [
    "model",
    "bru",
    "semantics"
  ],
  "documentation": "docs/scalar/model/bru/semantics.md",
  "id": "PTO-SCALAR-MODEL-BRU-SEMANTICS",
  "mnemonic": null,
  "readiness_subjects": [],
  "semantic_tests": [],
  "source": "asl/scalar/model/bru/semantics.asl",
  "surface": "scalar",
  "tests": [
    "PTO-AVS-SCALAR-MODEL-BRU-SEMANTICS-STATIC-001"
  ]
}

Sources and release identity

Show commit, paths, hashes, version, and canonical owners
Release
0.58.5 · Release candidate
Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812
ASL SHA-256
3b5af1348da6e2027354beb3557a0631f9217af450482432faa77cec67d699a8
Generated documentation
docs/scalar/model/bru/semantics.md · embedded in this page
Documentation SHA-256
b914238beabfd0e0b9090ca7027dc73993ce1c8246504dfb66ea2e8d525a1deb

Exact owners