操作数与参数
SrcL- Reg5 halfword store-value source
SrcR- Reg5 store-address source
RegDst- Reg5 success-status destination
aq- acquire ordering bit
rl- release ordering bit
far- flat-address routing hint
SC.H conditionally stores one halfword when the local 64-byte-line reservation matches.
PTO-SCALAR-SC-Hsc.h SrcL, [SrcR], ->Rdsc.h.aq SrcL, [SrcR], ->Rdsc.h.rl SrcL, [SrcR], ->Rdsc.h.f SrcL, [SrcR], ->Rdsc.h.aqrl SrcL, [SrcR], ->Rdsc.h.aqf SrcL, [SrcR], ->Rdsc.h.rlf SrcL, [SrcR], ->Rdsc.h.aqrlf SrcL, [SrcR], ->Rd| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
RegDst | 5 | encoding-defined | Reg5 success-status destination | Encoded zero discards the success status. |
SrcL | 5 | encoding-defined | Reg5 halfword store-value source | Encoded zero supplies numeric zero as the store value. |
SrcR | 5 | encoding-defined | Reg5 store-address source | Encoded zero reads the architectural zero register as the store address. |
aq | 1 | encoding-defined | acquire ordering bit | Encoded zero disables acquire ordering. |
far | 1 | encoding-defined | flat-address routing hint | Encoded zero selects the default flat-address route. |
rl | 1 | encoding-defined | release ordering bit | Encoded zero disables release ordering. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| Constant | 31:28 | 4'b0001 |
| far | 27 | variable |
| aq | 26 | variable |
| rl | 25 | variable |
| SrcR | 24:20 | variable |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b001 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b0001011 |
{
"reg": [
{
"bits": 7,
"name": "7'b0001011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b001"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 1,
"name": "rl"
},
{
"bits": 1,
"name": "aq"
},
{
"bits": 1,
"name": "far"
},
{
"bits": 4,
"name": "4'b0001"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}sc.h<.{aq, rl, f, aqrl, aqf, rlf, aqrlf}> SrcL, [SrcR], {->t, ->u, ->Rd}
SrcLSrcRRegDstaqrlfar下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_SC_H() => ScalarOperationbegin return ScalarOperation_SC_H;end;readonly func InstructionContractHandler_SC_H() => ScalarSemanticHandlerbegin return ScalarHandler_StoreConditional;end;
pure func InstructionContractStoreSizeBytes_SC_H() => integer {1,2,4,8}begin return 2;end;
pure func InstructionContractReservationGranuleBytes_SC_H() => integer {1..262144}begin return PTO_RESERVATION_GRANULE_BYTES;end;
pure func InstructionContractSuccessStatus_SC_H() => Wordbegin return Zeros{PTO_XLEN};end;
pure func InstructionContractMissStatus_SC_H() => Wordbegin return Zeros{PTO_XLEN} + 1;end;
pure func InstructionContractMissIsProbeFree_SC_H() => booleanbegin return TRUE;end;// PTO-INSTRUCTION: {"assembly":["sc.h SrcL, [SrcR], ->Rd","sc.h.aq SrcL, [SrcR], ->Rd","sc.h.rl SrcL, [SrcR], ->Rd","sc.h.f SrcL, [SrcR], ->Rd","sc.h.aqrl SrcL, [SrcR], ->Rd","sc.h.aqf SrcL, [SrcR], ->Rd","sc.h.rlf SrcL, [SrcR], ->Rd","sc.h.aqrlf SrcL, [SrcR], ->Rd"],"block":[],"catalog_indices":[382],"catalog_records":[{"asm":"sc.h<.{aq, rl, f, aqrl, aqf, rlf, aqrlf}> SrcL, [SrcR], {->t, ->u, ->Rd}","constraints":[],"encoding":[{"index":0,"mask":"0xf000707f","match":"0x1000100b","width_bits":32}],"encoding_kind":"L32","fields":[{"name":"RegDst","pieces":[{"instruction_lsb":7,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcL","pieces":[{"instruction_lsb":15,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcR","pieces":[{"instruction_lsb":20,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"aq","pieces":[{"instruction_lsb":26,"value_lsb":0,"width":1}],"signedness":"encoding-defined","width":1},{"name":"far","pieces":[{"instruction_lsb":27,"value_lsb":0,"width":1}],"signedness":"encoding-defined","width":1},{"name":"rl","pieces":[{"instruction_lsb":25,"value_lsb":0,"width":1}],"signedness":"encoding-defined","width":1}],"form_id":"sc_h_32_108941eabac6","length_bits":32,"mnemonic":"SC.H","semantic_family":"AMO","semantic_group":"AMO","semantic_handler":"StoreConditional","semantic_summary":"SC.H conditionally stores one halfword when the local 64-byte-line reservation matches.","status":"accepted"}],"classification":["amo"],"contract":{"block_composition":["none"],"canonical_assembly":["sc.h SrcL, [SrcR], ->Rd","sc.h.aq SrcL, [SrcR], ->Rd","sc.h.rl SrcL, [SrcR], ->Rd","sc.h.f SrcL, [SrcR], ->Rd","sc.h.aqrl SrcL, [SrcR], ->Rd","sc.h.aqf SrcL, [SrcR], ->Rd","sc.h.rlf SrcL, [SrcR], ->Rd","sc.h.aqrlf SrcL, [SrcR], ->Rd"],"defaults":["SrcL, SrcR, and RegDst are required Reg5 fields. Encoded source zero reads the architectural zero register; encoded destination zero discards the status.","aq=0 and rl=0 select relaxed ordering. aq=1 selects acquire, rl=1 selects release, and aq=1 with rl=1 selects acquire-release.","far=0 selects the default flat-address route. far=1 is a profile routing hint; the reference profile preserves the same address and reservation comparison."],"encoding_class":"standalone-encoded","examples":["sc.h a0, [a1], ->a2","sc.h.aqrl t#1, [u#1], ->u","sc.h.f zero, [sp], ->t"],"exceptions":["A line-matched effective address must be aligned to 2 bytes. On a line-matched attempt, alignment, translation, and write permission are checked after reservation clear and before memory or destination effects.","A line-matched access fault reports the original address, emits no event, preserves memory and destination, and enters the ordinary trap envelope. Recovery restores the original TPC.","A reservation miss is probe-free even for a misaligned or inaccessible address and therefore does not raise a data-access fault.","An undecodable fixed-bit pattern raises Fault_IllegalInstruction before effects. All explicit field values are assigned."],"field_contracts":{},"field_zero_meanings":{"RegDst":"Encoded zero discards the success status.","SrcL":"Encoded zero supplies numeric zero as the store value.","SrcR":"Encoded zero reads the architectural zero register as the store address.","aq":"Encoded zero disables acquire ordering.","far":"Encoded zero selects the default flat-address route.","rl":"Encoded zero disables release ordering."},"legality":["All 32 SrcL and SrcR Reg5 encodings are assigned: 0..23 select absolute GPRs, 24..27 select T#1..T#4, and 28..31 select U#1..U#4.","All 32 RegDst encodings are assigned. Code 0 and codes 24..29 discard, code 30 pushes U, code 31 pushes T, and codes 1..23 write the named absolute GPR.","All aq, rl, and far combinations are assigned. Reservation match is based only on the containing 64-byte line; LR byte address and width do not narrow it.","A line-matched effective address must be aligned to 2 bytes."],"memory_effects":["A matching reservation is cleared before access preflight. After successful preflight, store SrcL bits 15:0 as one 2-byte little-endian halfword, emit one ordered store event, and publish status zero.","A missing or different-line reservation is cleared and publishes status one without alignment, translation, permission, bounded-memory probe, memory event, or memory access.","The reservation is cleared by every attempt. A line-matched access fault leaves memory and destination unchanged; after recovery, reissue without a new LR is a probe-free miss."],"operands":[{"field":"SrcL","role":"Reg5 halfword store-value source"},{"field":"SrcR","role":"Reg5 store-address source"},{"field":"RegDst","role":"Reg5 success-status destination"},{"field":"aq","role":"acquire ordering bit"},{"field":"rl","role":"release ordering bit"},{"field":"far","role":"flat-address routing hint"}],"ordering":["aq=0,rl=0 records relaxed ordering; aq=1,rl=0 acquire; aq=0,rl=1 release; aq=1,rl=1 acquire-release on a successful store.","A reservation miss emits no memory event. far changes only the route hint in the reference profile."],"standalone_opcode":true,"state_effects":["Snapshot SrcL and SrcR before reservation, memory, or destination effects, including repeated GPR and same-queue aliases.","Publish status zero after a nonfaulting matching store and status one after a reservation miss. A line-matched fault publishes no status.","Clear the local reservation for success, miss, and line-matched fault before any possible trap.","Successful or miss completion advances TPC by four bytes. A line-matched fault saves the original TPC; recovery restores it, and reissue without a new LR completes as a miss."]},"depends_on":["PTO-BLOCK-MODEL-SCHEMA-PROFILE-ENCODING"],"id":"PTO-SCALAR-SC-H","mnemonic":"SC.H","summary":"SC.H conditionally stores one halfword when the local 64-byte-line reservation matches.","surface":"scalar"}// PTO-REVIEW: {"review_method":"formal-definition-read","outcome":"FORMAL-COMPLETE","reviewed_fields":["assembly","encoding","defaults","operation","state","memory","ordering","faults","reserved"]}// DOC-BEGIN: decodereadonly func InstructionContractOperation_SC_H() => ScalarOperationbegin return ScalarOperation_SC_H;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_SC_H() => ScalarSemanticHandlerbegin return ScalarHandler_StoreConditional;end;
pure func InstructionContractStoreSizeBytes_SC_H() => integer {1,2,4,8}begin return 2;end;
pure func InstructionContractReservationGranuleBytes_SC_H() => integer {1..262144}begin return PTO_RESERVATION_GRANULE_BYTES;end;
pure func InstructionContractSuccessStatus_SC_H() => Wordbegin return Zeros{PTO_XLEN};end;
pure func InstructionContractMissStatus_SC_H() => Wordbegin return Zeros{PTO_XLEN} + 1;end;
pure func InstructionContractMissIsProbeFree_SC_H() => booleanbegin return TRUE;end;// DOC-END: operation
SC.H 在本地 64 字节缓存行保留匹配时有条件地存储一个半字,成功发布状态零,未命中发布状态一。
ASL DOC 契约选择 ScalarHandler_StoreConditional,访问宽度为 2 字节。
每次尝试都会清除保留。保留未命中不会进行探测;匹配尝试则在内存或目的地效果之前执行写入预检。
SrcL 承载 Reg5 半字存储值源;SrcR 承载 Reg5 存储地址源;RegDst 承载 Reg5 成功状态目的地;aq 承载获取排序位;rl 承载释放排序位;far 承载平坦地址路由提示。
aq 与 rl 选择宽松、获取、释放或获取-释放排序;far 是配置档路由提示,在参考配置档中不改变架构结果。
匹配且无故障时,操作会存储源的低位部分并发出一个带排序属性的存储事件;未命中保持内存不变且不发出事件。
成功、未命中和缓存行匹配故障都会清除保留;成功或未命中会让 TPC 前进 4 字节。
有效地址必须按 2 字节对齐。对齐、地址翻译和权限检查都先于架构效果。
保留未命中不会进行探测。缓存行匹配故障会清除保留,但不发布状态、事件、内存更新或 TPC 前进;恢复后若没有新的 LR,重新执行会未命中。
本示例只展示一种已接受写法;下方生成的契约仍是权威来源。
初次阅读可从 sc.h SrcL, [SrcR], ->Rd 开始,再只改变上文说明的排序或路由修饰位。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
12 matching entries
PTO-AVS-SCALAR-SC-H-DECODE-001tests/asl/scalar/amo/SC.H/scalar-decode-sc-h-canonical-001.asl43eaf567155e7933cb723a8181a1c450315e79090ed01c69b6dc6b76c0eb2747PTO-AVS-SCALAR-SC-H-MISS-001tests/asl/scalar/amo/SC.H/scalar-bound-sc-h-miss-001.asl25c5e360c0e4b7c8c0dee199ec14e9d762aba3bdf6f91ec7637cb09dc0d643d6PTO-AVS-SCALAR-SC-H-PRECISE-001tests/asl/scalar/amo/SC.H/scalar-fault-sc-h-precise-001.asl035f63e8a57e9ad1b322459644bc9a975fa203b6e1775a119106a75ebfc229a6PTO-AVS-SCALAR-SC-H-SUCCESS-001tests/asl/scalar/amo/SC.H/scalar-exec-sc-h-success-001.asleccf6246c6ccb9b72794d6632e8d3da6255705aaa5491edfbd347fbba3b0f963PTO-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-0020…
ADR-0020docs/status/decisions/0020-production-memory-events-and-atomic-corners.md215b18f05d0b53120949373fce6a5ce22f7ab534fb22df24743a9b2b4beb2decLoading ADR-0030…
ADR-0030docs/status/decisions/0030-scalar-amo-totality-and-reservation.md110bd32b3004a8383913ac6053cc7d0a1d0b8e03e3ef7c47d83292c94a6a17ebLoading ADR-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196{
"classification": [
"amo"
],
"documentation": "docs/scalar/amo/SC.H.md",
"id": "PTO-SCALAR-SC-H",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "SC.H",
"ndf_clause": "PTO-INST-SCALAR-SC-H"
},
"mnemonic": "SC.H",
"readiness_subjects": [
"ADR-0020",
"ADR-0030",
"ADR-0059"
],
"semantic_tests": [
"PTO-AVS-SCALAR-SC-H-MISS-001",
"PTO-AVS-SCALAR-SC-H-PRECISE-001",
"PTO-AVS-SCALAR-SC-H-SUCCESS-001"
],
"source": "asl/scalar/amo/SC.H.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-SCALAR-SC-H-DECODE-001",
"PTO-AVS-SCALAR-SC-H-MISS-001",
"PTO-AVS-SCALAR-SC-H-PRECISE-001",
"PTO-AVS-SCALAR-SC-H-SUCCESS-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd8681240a30760a8ab4b2356a58d1cd9d41ed0caf62964b6a0f19f6c1242a66b4a61fea5f22e3fa2f45bc6a346d5114ffbf96297a2218509c61ed30af456f692cc5a88asl/scalar/amo/SC.H.aslasl/scalar/amo/SC.H.asl