Skip to main content

PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT

PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT

ASL pseudocode

The complete ASL owner is shown directly below.

// PTO-UNIT: {"id":"PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT","surface":"arch","classification":["system-registers","interrupt"],"depends_on":["PTO-ARCH-SYSTEM-REGISTERS-TIMER"]}func RefreshTopPendingInterrupt(ring: AccessControlRing)begin    let pending = _ExtendedSystemRegisters[[        ContextRegisterIndex(ring, 0x0f08)]];    var found = FALSE;    var top: InterruptID = 0;    for interrupt_id = 0 to 63 do        if !found && pending[interrupt_id] == '1' then            top = interrupt_id as InterruptID;            found = TRUE;        end;    end;    _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f09)]] =        NaturalToWord(top as integer {0..262144});end;
func SetInterruptPending(ring: AccessControlRing,                         interrupt_id: InterruptID)begin    let index = ContextRegisterIndex(ring, 0x0f08);    _ExtendedSystemRegisters[[index]][interrupt_id] = '1';    RefreshTopPendingInterrupt(ring);end;
func ClearInterruptPending(ring: AccessControlRing,                           interrupt_id: InterruptID)begin    let index = ContextRegisterIndex(ring, 0x0f08);    _ExtendedSystemRegisters[[index]][interrupt_id] = '0';    RefreshTopPendingInterrupt(ring);end;
readonly func InterruptEnabled(ring: AccessControlRing,                               interrupt_id: InterruptID) => booleanbegin    let interrupt_config = _ExtendedSystemRegisters[[        ContextRegisterIndex(ring, 0x0f07)]];    if interrupt_id == TimerInterruptId(ring) then        return interrupt_config[1] == '1';    else return interrupt_config[0] == '1';    end;end;
func ReadInterruptPending(ring: AccessControlRing) => Wordbegin    RefreshTimerPending(ring);    return _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f08)]];end;
func ReadTopPendingInterrupt(ring: AccessControlRing) => Wordbegin    RefreshTimerPending(ring);    return _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f09)]];end;
func EndOfInterrupt(ring: AccessControlRing, value: Word)begin    if value[63:6] == Zeros{58} then        ClearInterruptPending(ring, UInt(value[5:0]) as InterruptID);    end;    _ACRTrapAsynchronous[[ring]] = FALSE;    _ACRTrapArgumentValid[[ring]] = FALSE;end;

Architecture behavior

purpose scope

Purpose and scope

This unit owns pending-interrupt updates, top-pending selection, enable checks, timer refresh on reads, and end-of-interrupt state changes.

concepts state

Context-register layout used here

For each ACR, low index 0x0f07 holds interrupt configuration, 0x0f08 holds the pending bitmap, and 0x0f09 holds the selected top-pending interrupt ID.

RefreshTopPendingInterrupt scans pending bits from interrupt ID 0 through 63 and records the first set ID. If no bit is set, the stored top value remains 0.

rules interactions

Pending, enable, and read behavior

SetInterruptPending sets one pending bit; ClearInterruptPending clears one. Both immediately recompute the top-pending value.

InterruptEnabled tests configuration bit 1 for the ring's timer interrupt and bit 0 for every other interrupt ID.

ReadInterruptPending and ReadTopPendingInterrupt call RefreshTimerPending before returning their respective context-register values.

boundaries

End-of-interrupt boundary

EndOfInterrupt clears a pending interrupt only when bits 63:6 of its input are zero; the low six bits then select the ID. Regardless of that encoding check, it clears _ACRTrapAsynchronous and _ACRTrapArgumentValid for the ring.

Top-pending value 0 alone does not distinguish no pending interrupt from pending interrupt ID 0; the pending bitmap provides that information.

example usage

illustrative priority example

If pending IDs 5 and 9 are both set, refresh records 5 because the scan stops at the first set bit. Clearing ID 5 recomputes the top value as 9.

Related owners

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

12 matching entries

Executable evidence2
  • PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT compiles as an independent normative unit
    1. surfaceARCH
    2. ownerPTO-ARCH-SYSTEM-REGISTERS-INTERRUPT
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-SYSTEM-REGISTERS-INTERRUPT-STATIC-001
    Path
    tests/asl/arch/system-registers/interrupt/arch-static-interrupt-contract-001.asl
    Kind / role
    static-invariant
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    95732ad1696857b64611f72d130cd82f331b7711b2c68d7b6595a832d9645166
    Open exact source ↗ for PTO-AVS-ARCH-SYSTEM-REGISTERS-INTERRUPT-STATIC-001
  • Covers Interrupt Register State.
    1. surfaceARCH
    2. ownerPTO-ARCH-SYSTEM-REGISTERS-INTERRUPT
    3. categorySTATE-TRANSITION
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001
    Path
    tests/asl/arch/system-registers/interrupt/arch-state-register-001.asl
    Kind / role
    state-transition
    Pass condition
    TestInterruptRegisterState completes without assertion failure
    SHA-256
    a64d42334a45d3834287228bb415e2c1d492d7d90323b099bea087aae3f7c78f
    Open exact source ↗ for PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-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
Decision history5
  • Use PTO-owned system-register names · accepted
    1. decision recordADR
    2. case0003

    Decision record

    Loading ADR-0003…

    Sources and references
    Complete stable ID
    ADR-0003
    Path
    docs/status/decisions/0003-pto-owned-system-register-names.md
    Affected units
    PTO-ARCH-SYSTEM-REGISTERS-ACCESS-CONTROL, PTO-ARCH-SYSTEM-REGISTERS-ADDRESSING, PTO-ARCH-SYSTEM-REGISTERS-CONTEXT, PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT, PTO-ARCH-SYSTEM-REGISTERS-MAINTENANCE, PTO-ARCH-SYSTEM-REGISTERS-TIMER, PTO-SCALAR-C-SSRGET, PTO-SCALAR-HL-SSRGET, PTO-SCALAR-HL-SSRSET, PTO-SCALAR-SSRGET, PTO-SCALAR-SSRSET, PTO-SCALAR-SSRSWAP
    Affected NDF
    PTO-C-SSRGET-DIRECT-IDS-001, PTO-HL-SSRGET-DECISION-BINDING-001, PTO-HL-SSRSET-DECISION-BINDING-001, PTO-SSRGET-ADR-CONTRACT-001, PTO-SSRSET-ADR-CONTRACT-001, PTO-SSRSWAP-ADR-CONTRACT-001
    SHA-256
    c6a5379776c3b29c25f0896bc56f84d8f5c15832bbba0859b822aa99a65e342d
    Open exact decision source ↗ for ADR-0003
  • PTO v0 ACR routing and context reset · accepted
    1. decision recordADR
    2. case0010

    Decision record

    Loading ADR-0010…

    Sources and references
    Complete stable ID
    ADR-0010
    Path
    docs/status/decisions/0010-acr-routing-and-context-reset.md
    Affected units
    PTO-ARCH-PROFILE-RESET, PTO-ARCH-PROGRAMMING-MODEL-EXECUTION-CONTEXT, PTO-ARCH-SYSTEM-REGISTERS-ACCESS-CONTROL, PTO-ARCH-SYSTEM-REGISTERS-ADDRESSING, PTO-ARCH-SYSTEM-REGISTERS-CONTEXT, PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT, PTO-ARCH-SYSTEM-REGISTERS-MAINTENANCE, PTO-ARCH-SYSTEM-REGISTERS-TIMER
    Affected NDF
    PTO-REQ-STATE-001
    SHA-256
    7594432a33c54880227fa3ab495bf5b29d406ac3b4e83634ffefe0a713e85f35
    Open exact decision source ↗ for ADR-0010
  • Define interrupt pending and timer state · accepted
    1. decision recordADR
    2. case0016

    Decision record

    Loading ADR-0016…

    Sources and references
    Complete stable ID
    ADR-0016
    Path
    docs/status/decisions/0016-interrupt-pending-and-timer-state.md
    Affected units
    PTO-ARCH-OVERVIEW-ARCHITECTURE, PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT, PTO-ARCH-SYSTEM-REGISTERS-TIMER
    Affected NDF
    PTO-ARCH-COMMIT-EVENT-CONFORMANCE-001, PTO-ARCH-STATE-CLOSURE-001, PTO-RELEASE-VERIFICATION, PTO-SOURCE-HIERARCHY, PTO-TILE-CAPACITY-PER-PE
    SHA-256
    d864e76e1cd097d55d05e36cc28adc756a2b2cc46df5720a6f6afa5b3f9b9fe0
    Open exact decision source ↗ for ADR-0016
  • Classify every visible system register behavior · accepted
    1. decision recordADR
    2. case0017

    Decision record

    Loading ADR-0017…

    Sources and references
    Complete stable ID
    ADR-0017
    Path
    docs/status/decisions/0017-system-register-behavior-classes.md
    Affected units
    PTO-ARCH-OVERVIEW-ARCHITECTURE, PTO-ARCH-SYSTEM-REGISTERS-ACCESS-CONTROL, PTO-ARCH-SYSTEM-REGISTERS-ADDRESSING, PTO-ARCH-SYSTEM-REGISTERS-CONTEXT, PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT, PTO-ARCH-SYSTEM-REGISTERS-MAINTENANCE, PTO-ARCH-SYSTEM-REGISTERS-TIMER
    Affected NDF
    PTO-ARCH-COMMIT-EVENT-CONFORMANCE-001, PTO-ARCH-STATE-CLOSURE-001, PTO-RELEASE-VERIFICATION, PTO-SOURCE-HIERARCHY, PTO-TILE-CAPACITY-PER-PE
    SHA-256
    6b4f7a29546952e4c5c61b0f4f921b04ecbc8340ba4ad86619277f17da97f95f
    Open exact decision source ↗ for ADR-0017
  • Scalar SYS totality and PTO-v0 profile boundaries · accepted
    1. decision recordADR
    2. case0031

    Decision record

    Loading ADR-0031…

    Sources and references
    Complete stable ID
    ADR-0031
    Path
    docs/status/decisions/0031-scalar-sys-totality-and-profile-boundaries.md
    Affected units
    PTO-ARCH-SYSTEM-REGISTERS-ACCESS-CONTROL, PTO-ARCH-SYSTEM-REGISTERS-ADDRESSING, PTO-ARCH-SYSTEM-REGISTERS-CONTEXT, PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT, PTO-ARCH-SYSTEM-REGISTERS-MAINTENANCE, PTO-ARCH-SYSTEM-REGISTERS-TIMER, PTO-SCALAR-ACRC, PTO-SCALAR-ACRE, PTO-SCALAR-ASSERT, PTO-SCALAR-BC-IALL, PTO-SCALAR-BC-IVA, PTO-SCALAR-BSE, PTO-SCALAR-BWE, PTO-SCALAR-BWI, PTO-SCALAR-BWT, PTO-SCALAR-C-EBREAK, PTO-SCALAR-C-SSRGET, PTO-SCALAR-DC-CISW, PTO-SCALAR-DC-CIVA, PTO-SCALAR-DC-CSW, PTO-SCALAR-DC-CVA, PTO-SCALAR-DC-IALL, PTO-SCALAR-DC-ISW, PTO-SCALAR-DC-IVA, PTO-SCALAR-DC-ZVA, PTO-SCALAR-EBREAK, PTO-SCALAR-FENCE-D, PTO-SCALAR-FENCE-I, PTO-SCALAR-HL-SSRGET, PTO-SCALAR-HL-SSRSET, PTO-SCALAR-IC-IALL, PTO-SCALAR-IC-IVA, PTO-SCALAR-LSRGET, PTO-SCALAR-SETC-TGT, PTO-SCALAR-SSRGET, PTO-SCALAR-SSRSET, PTO-SCALAR-SSRSWAP, PTO-SCALAR-TLB-IA, PTO-SCALAR-TLB-IALL, PTO-SCALAR-TLB-IAV, PTO-SCALAR-TLB-IV
    Affected NDF
    PTO-ACRC-DECISION-BINDING-001, PTO-ACRE-IMPLICIT-STOP-001, PTO-BSE-DECISION-BINDING-001, PTO-BWE-DECISION-BINDING-001, PTO-BWI-DECISION-BINDING-001, PTO-BWT-DECISION-BINDING-001, PTO-C-EBREAK-CAUSE-001, PTO-C-SSRGET-DIRECT-IDS-001, PTO-EBREAK-DECISION-BINDING-001, PTO-FENCE-D-DECISION-BINDING-001, PTO-FENCE-I-DECISION-BINDING-001, PTO-HL-SSRGET-DECISION-BINDING-001, PTO-HL-SSRSET-DECISION-BINDING-001, PTO-LSRGET-BARG-001, PTO-SETC-TGT-ADR-CONTRACT-001, PTO-SSRGET-ADR-CONTRACT-001, PTO-SSRSET-ADR-CONTRACT-001, PTO-SSRSWAP-ADR-CONTRACT-001, PTO-TLB-IA-ADR-CONTRACT-001, PTO-TLB-IALL-ADR-CONTRACT-001, PTO-TLB-IAV-ADR-CONTRACT-001, PTO-TLB-IV-ADR-CONTRACT-001
    SHA-256
    5680b3516be6c28a1ccb198c99f5efb66317c65330f6d87434173024d2795a7d
    Open exact decision source ↗ for ADR-0031

Unit metadata

Open 4 generated metadata fields
id
PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT
surface
arch
classification
[
  "system-registers",
  "interrupt"
]
depends_on
[
  "PTO-ARCH-SYSTEM-REGISTERS-TIMER"
]
Open generated traceability record
{
  "classification": [
    "system-registers",
    "interrupt"
  ],
  "documentation": "docs/arch/system-registers/interrupt.md",
  "id": "PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT",
  "mnemonic": null,
  "readiness_subjects": [
    "ADR-0003",
    "ADR-0010",
    "ADR-0016",
    "ADR-0017",
    "ADR-0031"
  ],
  "semantic_tests": [
    "PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001"
  ],
  "source": "asl/arch/system-registers/interrupt.asl",
  "surface": "arch",
  "tests": [
    "PTO-AVS-ARCH-SYSTEM-REGISTERS-INTERRUPT-STATIC-001",
    "PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001"
  ]
}

Sources and release identity

Show commit, paths, hashes, version, and canonical owners
Release
0.58.5 · Release candidate
Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812
ASL SHA-256
2341ac0204294c8619bbfc70f514e70f535ff7bc1ddb3d799639378d5071af34
Generated documentation
docs/arch/system-registers/interrupt.md · embedded in this page
Documentation SHA-256
c85ef285453cfdbd6050f1efcefd7188ee77f7fa91d5c44191467734a9f41177

Exact owners