Purpose and scope
This unit defines scalar GPR reads and writes for the current memory agent and for an explicitly selected PE.
PTO-ARCH-PROGRAMMING-MODEL-SCALAR-REGISTERSThe complete ASL owner is shown directly below.
// PTO-UNIT: {"id":"PTO-ARCH-PROGRAMMING-MODEL-SCALAR-REGISTERS","surface":"arch","classification":["programming-model","scalar-registers"],"depends_on":["PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT"]}readonly func ReadGPR(index: GPRIndex) => Wordbegin return ReadPEGPR(_CurrentMemoryAgent, index);end;
readonly func ReadPEGPR(pe: MemoryAgentId, index: GPRIndex) => Wordbegin if index == 0 then return Zeros{PTO_XLEN}; else return _PEGPRs[[pe]][[index]]; end;end;
func WriteGPR(index: GPRIndex, value: Word)begin WritePEGPR(_CurrentMemoryAgent, index, value);end;
func WritePEGPR(pe: MemoryAgentId, index: GPRIndex, value: Word)begin if index != 0 then _PEGPRs[[pe]][[index]] = value; end;end;
This unit defines scalar GPR reads and writes for the current memory agent and for an explicitly selected PE.
ReadGPR and WriteGPR delegate to ReadPEGPR and WritePEGPR using _CurrentMemoryAgent. The per-PE helpers index _PEGPRs with both the selected memory-agent identity and the GPR index.
GPR index 0 reads as Zeros{PTO_XLEN} for every PE. A write to index 0 has no state effect.
For every nonzero index, reads return the selected _PEGPRs entry and writes replace that same entry with the supplied Word.
The current-agent wrappers do not broadcast a write across PEs. They select exactly _CurrentMemoryAgent; explicit cross-PE inspection or update uses the per-PE helpers.
Suppose the current memory agent is PE1. Writing a value with WriteGPR to a nonzero index changes PE1's corresponding _PEGPRs element; reading the same index through ReadPEGPR for PE0 is a different state lookup.
Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
No NDF clause is attached to this unit.
10 matching entries
PTO-AVS-ARCH-PROGRAMMING-MODEL-PE-GPR-STATE-001tests/asl/arch/programming-model/scalar-registers/arch-state-programming-model-pe-gpr-001.asl7c69affbf0458e09198d6a314cc158cfa5348800b1ddd8eae6048b9044c7b91fPTO-AVS-ARCH-PROGRAMMING-MODEL-SCALAR-REGISTERS-STATIC-001tests/asl/arch/programming-model/scalar-registers/arch-static-scalar-registers-contract-001.aslf82a27988ff3b68a15ed36203916280aa87a0e83fa226efd43ecf94adb3148bcPTO-AVS-ARCH-TESTSCALARQUEUEDISPATCH-EXECUTION-001tests/asl/arch/programming-model/scalar-registers/arch-exec-queue-dispatch-001.asl7a5616e33ee2d0d6c1e236c2c687545e5dccaebcae8dd963a077cba1ba2282e4PTO-AVS-ARCH-TESTSCALARTEMPORARYQUEUES-EXECUTION-001tests/asl/arch/programming-model/scalar-registers/arch-exec-temporary-queues-001.asl7cfa876d3353471a75c25a8e0072a513f6b6d92d57528855b82af91c1ffb4b72PTO-EVIDENCE-RELEASE-TRACEABILITYPTO-EVIDENCE-RELEASE-TRACEABILITYspec/evidence/release-traceability-readiness.jsonc7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3ePTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREspec/evidence/instruction-contract-closure.json3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106aPTO-EVIDENCE-ARCHITECTURE-READINESSPTO-EVIDENCE-ARCHITECTURE-READINESSspec/evidence/architecture-readiness.json4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004PTO-EVIDENCE-RELEASE-GATE-READINESSPTO-EVIDENCE-RELEASE-GATE-READINESSspec/evidence/release-gate-readiness.jsona0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0PTO-EVIDENCE-RELEASE-MANIFESTPTO-EVIDENCE-RELEASE-MANIFESTspec/release-manifest.json1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8Loading ADR-0008…
ADR-0008docs/status/decisions/0008-architectural-state-contract.md9c33e1b57d0f04c4d808ee61aaf975187a3dbd32a071329ca65a916dc0e614ca{
"classification": [
"programming-model",
"scalar-registers"
],
"documentation": "docs/arch/programming-model/scalar-registers.md",
"id": "PTO-ARCH-PROGRAMMING-MODEL-SCALAR-REGISTERS",
"mnemonic": null,
"readiness_subjects": [
"ADR-0008"
],
"semantic_tests": [
"PTO-AVS-ARCH-PROGRAMMING-MODEL-PE-GPR-STATE-001",
"PTO-AVS-ARCH-TESTSCALARQUEUEDISPATCH-EXECUTION-001",
"PTO-AVS-ARCH-TESTSCALARTEMPORARYQUEUES-EXECUTION-001"
],
"source": "asl/arch/programming-model/scalar-registers.asl",
"surface": "arch",
"tests": [
"PTO-AVS-ARCH-PROGRAMMING-MODEL-PE-GPR-STATE-001",
"PTO-AVS-ARCH-PROGRAMMING-MODEL-SCALAR-REGISTERS-STATIC-001",
"PTO-AVS-ARCH-TESTSCALARQUEUEDISPATCH-EXECUTION-001",
"PTO-AVS-ARCH-TESTSCALARTEMPORARYQUEUES-EXECUTION-001"
]
}0.58.5 · Release candidate7dc8b7e5b121d2b2499a2273bebff29e2cd8681276b63e6e3f5109fe6143d8c337b3d95738ecdadca6501693e2b744801d9fdc63b22e523be9f71b031902861371b1922c45a76607e6c664e5dff9a1f634172900asl/arch/programming-model/scalar-registers.asl