The complete ASL owner is shown directly below.
1 2 func SetFaultWithCause ( code : FaultCode , address : Word , cause : bits ( 24 ) ) 3 begin 4 let source_ring = CurrentACR ( ) ; 5 let ring = if code == Fault_None then source_ring 6 else TrapTargetForFault ( source_ring ) ; 7 if code != Fault_None then 8 SaveTrapContext ( ring , source_ring ) ; 9 end ; 10 _LastFault = code ; 11 _FaultAddress = address ; 12 _ACRTrapAsynchronous [ [ ring ] ] = FALSE ; 13 _ACRTrapArgumentValid [ [ ring ] ] = code != Fault_None ; 14 _ACRTrapCause [ [ ring ] ] = cause ; 15 case code of 16 when Fault_None => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } ; 17 when Fault_ExecutionStateCheck => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } ; 18 when Fault_IllegalInstruction => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 4 ; 19 when Fault_InstructionPC => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 32 ; 20 when Fault_InstructionPage => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 33 ; 21 when Fault_DataAlignment => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 34 ; 22 when Fault_DataPage => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 35 ; 23 when Fault_HardwareBreakpoint => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 49 ; 24 when Fault_SoftwareBreakpoint => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 50 ; 25 when Fault_HardwareWatchpoint => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 51 ; 26 when Fault_Assert => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 52 ; 27 when Fault_TileLegality => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 5 ; 28 when Fault_TileAllocation => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 5 ; 29 when Fault_BundleControl => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 5 ; 30 31 32 33 when Fault_BundlePostCommit => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 5 ; 34 when Fault_ServiceRequest => _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 6 ; 35 end ; 36 _ACRTrapArgument0 [ [ ring ] ] = address ; 37 if code != Fault_None then 38 SetCurrentACR ( ring ) ; 39 WriteTPC ( TrapVectorEntry ( ring , address ) ) ; 40 end ; 41 end ; 42
43 func SetFault ( code : FaultCode , address : Word ) 44 begin 45 SetFaultWithCause ( code , address , Zeros { 24 } ) ; 46 end ; 47
48 func RaiseServiceRequest ( request_type : bits ( 4 ) ) => boolean 49 begin 50 let source_ring = CurrentACR ( ) ; 51 if ! ServiceRequestPermitted ( source_ring , request_type ) then 52 SetFault ( Fault_IllegalInstruction , ReadTPC ( ) ) ; 53 return FALSE ; 54 end ; 55
56 let source_tpc = ReadTPC ( ) ; 57 let resume_tpc = source_tpc + ( Zeros { PTO_XLEN } + 4 ) ; 58 let target_ring = ServiceRequestTarget ( source_ring , request_type ) ; 59 SaveTrapContext ( target_ring , source_ring ) ; 60 _TrapContexts [ [ target_ring ] ] . tpc = resume_tpc ; 61 let ebarg_tpc_index = ( ( target_ring * 4096 ) + 0x0f43 ) 62 as SystemRegisterFileIndex ; 63 _ExtendedSystemRegisters [ [ ebarg_tpc_index ] ] = resume_tpc ; 64
65 _LastFault = Fault_ServiceRequest ; 66 _FaultAddress = source_tpc ; 67 _ACRTrapAsynchronous [ [ target_ring ] ] = FALSE ; 68 _ACRTrapArgumentValid [ [ target_ring ] ] = TRUE ; 69 _ACRTrapCause [ [ target_ring ] ] = ZeroExtend { 24 } ( request_type ) ; 70 _ACRTrapNumber [ [ target_ring ] ] = Zeros { 6 } + 6 ; 71 _ACRTrapArgument0 [ [ target_ring ] ] = source_tpc ; 72 SetCurrentACR ( target_ring ) ; 73 WriteTPC ( TrapVectorEntry ( target_ring , source_tpc ) ) ; 74 return TRUE ; 75 end ; 76
77 func ClearFault ( ) 78 begin 79 let ring = CurrentACR ( ) ; 80 _LastFault = Fault_None ; 81 _FaultAddress = Zeros { PTO_XLEN } ; 82 _ACRTrapAsynchronous [ [ ring ] ] = FALSE ; 83 _ACRTrapArgumentValid [ [ ring ] ] = FALSE ; 84 _ACRTrapCause [ [ ring ] ] = Zeros { 24 } ; 85 _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } ; 86 _ACRTrapArgument0 [ [ ring ] ] = Zeros { PTO_XLEN } ; 87 end ; 88
89 func RaiseInterrupt ( interrupt_id : InterruptID , cause : bits ( 24 ) ) 90 begin 91 let source_ring = CurrentACR ( ) ; 92 let ring = TrapTargetForInterrupt ( source_ring ) ; 93 SetInterruptPending ( ring , interrupt_id ) ; 94 if ! InterruptEnabled ( ring , interrupt_id ) then return ; end ; 95 SaveTrapContext ( ring , source_ring ) ; 96 _LastFault = Fault_None ; 97 _FaultAddress = Zeros { PTO_XLEN } ; 98 _ACRTrapAsynchronous [ [ ring ] ] = TRUE ; 99 _ACRTrapArgumentValid [ [ ring ] ] = TRUE ; 100 _ACRTrapCause [ [ ring ] ] = cause ; 101 _ACRTrapNumber [ [ ring ] ] = Zeros { 6 } + 44 ; 102 _ACRTrapArgument0 [ [ ring ] ] = 103 NaturalToWord ( interrupt_id as integer { 0 . . 262144 } ) ; 104 SetCurrentACR ( ring ) ; 105 WriteTPC ( TrapVectorEntry ( ring , ReadTPC ( ) ) ) ; 106 end ; 107
108 readonly func PackTrapStatus ( ring : AccessControlRing ) => Word 109 begin 110 var value : Word = Zeros { PTO_XLEN } ; 111 value [ 63 ] = if _ACRTrapAsynchronous [ [ ring ] ] then '1' else '0' ; 112 value [ 62 ] = if _ACRTrapArgumentValid [ [ ring ] ] then '1' else '0' ; 113 value [ 24 + : 24 ] = _ACRTrapCause [ [ ring ] ] ; 114 value [ 0 + : 6 ] = _ACRTrapNumber [ [ ring ] ] ; 115 return value ; 116 end ; 117
118 func UnpackTrapStatus ( ring : AccessControlRing , value : Word ) 119 begin 120 _ACRTrapAsynchronous [ [ ring ] ] = value [ 63 ] == '1' ; 121 _ACRTrapArgumentValid [ [ ring ] ] = value [ 62 ] == '1' ; 122 _ACRTrapCause [ [ ring ] ] = value [ 24 + : 24 ] ; 123 _ACRTrapNumber [ [ ring ] ] = value [ 0 + : 6 ] ; 124 end ; 125
purpose scope
Purpose and scope This unit centralizes fault, service-request, and interrupt entry plus trap-status packing. For synchronous SetFaultWithCause, context save and redirection to a target AccessControlRing occur only when the code is not Fault_None.
concepts state
Trap-entry state SetFaultWithCause records the fault code, address, cause, and trap status for every input code.When the code is not Fault_None, it saves context, selects the target AccessControlRing as current, and redirects TPC. For Fault_None, it keeps the source ring and performs neither the save nor the redirect. RaiseServiceRequest checks permission, saves a resume TPC four bytes past the source TPC, and enters the service target.RaiseInterrupt marks the interrupt pending and enters only when that interrupt is enabled.rules interactions
State-transition rules Synchronous fault entry sets asynchronous false and makes the trap argument valid for nonzero faults. Interrupt entry sets asynchronous true, records trap number 44, and places the InterruptID in argument 0. ClearFault clears current-ring fault reporting without reconstructing an earlier context.PackTrapStatus and UnpackTrapStatus map asynchronous, argument-valid, 24-bit cause, and 6-bit number fields.boundaries
Commit boundaries Fault_BundlePostCommit is represented as a successful-commit boundary trap: the continuation has already been chosen when the context is saved. A denied service request instead raises Fault_IllegalInstruction and returns false.
example usage
illustrative reading example Use this example block only as a reading aid: apply the rules above, then confirm the result in the normative ASL owner. It does not add an architectural contract.
related owners navigation
Related owners PTO-ARCH-STATE-TRAP-CONTEXT owns the saved-context representation.Trap-context recovery defines the inverse profile path for a recoverable saved context.
No NDF clause is attached to this unit.
Evidence index Search evidence by identity or path Expand groups Collapse groups
8 matching entries
Executable evidence 1 PTO-ARCH-MEMORY-MODEL-FAULT-PRECISION compiles as an independent normative unit surface ARCH owner PTO-ARCH-MEMORY-MODEL-FAULT-PRECISION category STATIC-INVARIANT case 001 Copy ID
Show exact test source Sources and references Complete stable ID PTO-AVS-ARCH-MEMORY-MODEL-FAULT-PRECISION-STATIC-001Path tests/asl/arch/memory-model/fault-precision/arch-static-fault-precision-contract-001.aslKind / role static-invariant Pass condition the complete model and this unit's static invariant compile SHA-256 39d43ace5ca58e8c5bd335cd727dad9e83262f40f61f95edf6ed0ac002b4a298Open exact source ↗ for PTO-AVS-ARCH-MEMORY-MODEL-FAULT-PRECISION-STATIC-001 Commit-scoped evidence 5 spec/evidence/release-traceability-readiness.json · closed PTO-EVIDENCE-RELEASE-TRACEABILITYSources and references Complete stable ID PTO-EVIDENCE-RELEASE-TRACEABILITYPath spec/evidence/release-traceability-readiness.jsonKind / role ASL/NDF/documentation/AVS traceability SHA-256 c7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3eOpen exact source ↗ for PTO-EVIDENCE-RELEASE-TRACEABILITY spec/evidence/instruction-contract-closure.json · closed PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURESources and references Complete stable ID PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREPath spec/evidence/instruction-contract-closure.jsonKind / role mnemonic and encoding contract closure SHA-256 3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106aOpen exact source ↗ for PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE spec/evidence/architecture-readiness.json · open PTO-EVIDENCE-ARCHITECTURE-READINESSSources and references Complete stable ID PTO-EVIDENCE-ARCHITECTURE-READINESSPath spec/evidence/architecture-readiness.jsonKind / role architecture maturity and blockers SHA-256 4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004Open exact source ↗ for PTO-EVIDENCE-ARCHITECTURE-READINESS spec/evidence/release-gate-readiness.json · ready-for-exact-head-verification PTO-EVIDENCE-RELEASE-GATE-READINESSSources and references Complete stable ID PTO-EVIDENCE-RELEASE-GATE-READINESSPath spec/evidence/release-gate-readiness.jsonKind / role exact-head gate readiness SHA-256 a0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0Open exact source ↗ for PTO-EVIDENCE-RELEASE-GATE-READINESS spec/release-manifest.json · draft PTO-EVIDENCE-RELEASE-MANIFESTSources and references Complete stable ID PTO-EVIDENCE-RELEASE-MANIFESTPath spec/release-manifest.jsonKind / role release content and encoding fingerprints SHA-256 1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8Open exact source ↗ for PTO-EVIDENCE-RELEASE-MANIFEST Decision history 2 PTO total store order candidate model · accepted decision record ADR case 0006 Copy ID
Decision record Loading ADR-0006…
Sources and references Complete stable ID ADR-0006Path docs/status/decisions/0006-pto-total-store-order.mdAffected units PTO-ARCH-MEMORY-MODEL-ADDRESS-SPACE, PTO-ARCH-MEMORY-MODEL-ATOMICITY, PTO-ARCH-MEMORY-MODEL-FAULT-PRECISION, PTO-ARCH-MEMORY-MODEL-MEMORY-EVENTS, PTO-ARCH-MEMORY-MODEL-ORDERING, PTO-ARCH-OVERVIEW-ARCHITECTURE Affected NDF PTO-ARCH-COMMIT-EVENT-CONFORMANCE-001 SHA-256 b80d8782e4587d4023edf02df9d2ba4d3cb2b2999fdc8991e49a2af4f9817735Open exact decision source ↗ for ADR-0006 Production memory events and atomic corners · accepted decision record ADR case 0020 Copy ID
Decision record Loading ADR-0020…
Sources and references Complete stable ID ADR-0020Path docs/status/decisions/0020-production-memory-events-and-atomic-corners.mdAffected units PTO-ARCH-MEMORY-MODEL-ADDRESS-SPACE, PTO-ARCH-MEMORY-MODEL-ATOMICITY, PTO-ARCH-MEMORY-MODEL-FAULT-PRECISION, PTO-ARCH-MEMORY-MODEL-GLOBAL-MEMORY-ACCESS, PTO-ARCH-MEMORY-MODEL-MEMORY-EVENTS, PTO-ARCH-MEMORY-MODEL-ORDERING, PTO-BLOCK-BSTART-GMOV, PTO-BLOCK-BSTART-MGATHER, PTO-BLOCK-BSTART-MGATHER-CAS, PTO-BLOCK-BSTART-MGATHER-MASK, PTO-BLOCK-BSTART-MSCATTER, PTO-BLOCK-BSTART-MSCATTER-MASK, PTO-BLOCK-BSTART-TLOAD, PTO-BLOCK-BSTART-TPREFETCH, PTO-BLOCK-BSTART-TSTORE, PTO-SCALAR-CASB, PTO-SCALAR-CASD, PTO-SCALAR-CASH, PTO-SCALAR-CASW, PTO-SCALAR-DMA, PTO-SCALAR-HL-CASB, PTO-SCALAR-HL-CASD, PTO-SCALAR-HL-CASH, PTO-SCALAR-HL-CASW, PTO-SCALAR-LD-ADD, PTO-SCALAR-LD-AND, PTO-SCALAR-LD-OR, PTO-SCALAR-LD-SMAX, PTO-SCALAR-LD-SMIN, PTO-SCALAR-LD-UMAX, PTO-SCALAR-LD-UMIN, PTO-SCALAR-LD-XOR, PTO-SCALAR-LR-B, PTO-SCALAR-LR-D, PTO-SCALAR-LR-H, PTO-SCALAR-LR-W, PTO-SCALAR-LW-ADD, PTO-SCALAR-LW-AND, PTO-SCALAR-LW-OR, PTO-SCALAR-LW-SMAX, PTO-SCALAR-LW-SMIN, PTO-SCALAR-LW-UMAX, PTO-SCALAR-LW-UMIN, PTO-SCALAR-LW-XOR, PTO-SCALAR-SC-B, PTO-SCALAR-SC-D, PTO-SCALAR-SC-H, PTO-SCALAR-SC-W, PTO-SCALAR-SD-ADD, PTO-SCALAR-SD-AND, PTO-SCALAR-SD-OR, PTO-SCALAR-SD-SMAX, PTO-SCALAR-SD-SMIN, PTO-SCALAR-SD-UMAX, PTO-SCALAR-SD-UMIN, PTO-SCALAR-SD-XOR, PTO-SCALAR-SW-ADD, PTO-SCALAR-SW-AND, PTO-SCALAR-SW-OR, PTO-SCALAR-SW-SMAX, PTO-SCALAR-SW-SMIN, PTO-SCALAR-SW-UMAX, PTO-SCALAR-SW-UMIN, PTO-SCALAR-SW-XOR, PTO-SCALAR-SWAPB, PTO-SCALAR-SWAPD, PTO-SCALAR-SWAPH, PTO-SCALAR-SWAPW, PTO-TILE-GMOV, PTO-TILE-MGATHER, PTO-TILE-MGATHER-CAS, PTO-TILE-MGATHER-MASK, PTO-TILE-MSCATTER, PTO-TILE-MSCATTER-MASK, PTO-TILE-TLOAD, PTO-TILE-TMOV, PTO-TILE-TPREFETCH, PTO-TILE-TSTORE Affected NDF PTO-ARCH-GM-ACCESS-001, PTO-BSTART-GMOV-COLLECTIVE-001, PTO-BSTART-MGATHER-CAS-SCHEMA-001, PTO-BSTART-MGATHER-MASK-SCHEMA-001, PTO-BSTART-MGATHER-SCHEMA-001, PTO-BSTART-MSCATTER-MASK-SCHEMA-001, PTO-BSTART-MSCATTER-SCHEMA-001, PTO-BSTART-TLOAD-CUBE-001, PTO-BSTART-TLOAD-MEMORY-001, PTO-BSTART-TPREFETCH-MEMORY-001, PTO-BSTART-TSTORE-CUBE-001, PTO-BSTART-TSTORE-MEMORY-001, PTO-GMOV-CORE4-PEER-001, PTO-MGATHER-BYTE-DISPLACEMENT-001, PTO-MGATHER-CAS-ATOMIC-001, PTO-MGATHER-CAS-PUBLICATION-001, PTO-MGATHER-MASK-PREDICATE-001, PTO-MGATHER-MASK-PUBLICATION-001, PTO-MGATHER-MASK-TYPE-002, PTO-MSCATTER-BYTE-DISPLACEMENT-001, PTO-MSCATTER-DUPLICATE-ORDER-001, PTO-MSCATTER-MASK-DUPLICATE-001, PTO-MSCATTER-MASK-PREDICATE-001, PTO-MSCATTER-MASK-TYPE-002, PTO-SD-XOR-ADR-CONTRACT-001, PTO-SW-ADD-ADR-CONTRACT-001, PTO-SW-AND-ADR-CONTRACT-001, PTO-SW-OR-ADR-CONTRACT-001, PTO-SW-SMAX-ADR-CONTRACT-001, PTO-SW-SMIN-ADR-CONTRACT-001, PTO-SW-UMAX-ADR-CONTRACT-001, PTO-SW-UMIN-ADR-CONTRACT-001, PTO-SW-XOR-ADR-CONTRACT-001, PTO-SWAPB-ADR-CONTRACT-001, PTO-SWAPD-ADR-CONTRACT-001, PTO-SWAPH-ADR-CONTRACT-001, PTO-SWAPW-ADR-CONTRACT-001, PTO-TLOAD-CUBE-001, PTO-TLOAD-MEMORY-001, PTO-TMOV-CONTRACT-001, PTO-TPREFETCH-FOOTPRINT-001, PTO-TSTORE-CUBE-001, PTO-TSTORE-MEMORY-001 SHA-256 215b18f05d0b53120949373fce6a5ce22f7ab534fb22df24743a9b2b4beb2decOpen exact decision source ↗ for ADR-0020 Open 4 generated metadata fields Open generated traceability record {
"classification": [
"memory-model",
"fault-precision"
],
"documentation": "docs/arch/memory-model/fault-precision.md",
"id": "PTO-ARCH-MEMORY-MODEL-FAULT-PRECISION",
"mnemonic": null,
"readiness_subjects": [
"ADR-0006",
"ADR-0020"
],
"semantic_tests": [],
"source": "asl/arch/memory-model/fault-precision.asl",
"surface": "arch",
"tests": [
"PTO-AVS-ARCH-MEMORY-MODEL-FAULT-PRECISION-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 b6118998eef77d70e5aec9fffbf56c3ea02bf6d817b713e30b9dc543d68adf47
Documentation SHA-256 b69bd8ace611277ec9b9983f57cd0e12b48c2cf5243eaefbb729773ca81d2253