操作数与参数
RegDst0- ordered low-result Reg5 destination or discard
RegDst1- ordered high-result Reg5 destination or discard
SrcL- upper Reg5 source
SrcR- lower Reg5 source
shamt- unsigned seven-bit logical-right shift amount
HL.CCAT logically right-shifts {SrcL, SrcR}, writes the low 64-bit result to Dst0, then writes the high result to Dst1.
PTO-SCALAR-HL-CCAThl.ccat SrcL, SrcR, shamt, ->Dst0, Dst1| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
RegDst0 | 5 | encoding-defined | ordered low-result Reg5 destination or discard | Encoded zero discards the low result. |
RegDst1 | 5 | encoding-defined | ordered high-result Reg5 destination or discard | Encoded zero discards the high result. |
SrcL | 5 | encoding-defined | upper Reg5 source | Encoded zero reads architectural GPR zero. |
SrcR | 5 | encoding-defined | lower Reg5 source | Encoded zero reads architectural GPR zero. |
shamt | 7 | encoding-defined | unsigned seven-bit logical-right shift amount | Encoded zero performs no shift. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| shamt | 47:41 | variable |
| SrcR | 40:36 | variable |
| SrcL | 35:31 | variable |
| Constant | 30:28 | 3'b001 |
| RegDst0 | 27:23 | variable |
| Constant | 22:16 | 7'b1011101 |
| RegDst1 | 15:11 | variable |
| Constant | 10:0 | 11'b00000001110 |
{
"reg": [
{
"bits": 11,
"name": "11'b00000001110"
},
{
"bits": 5,
"name": "RegDst1"
},
{
"bits": 7,
"name": "7'b1011101"
},
{
"bits": 5,
"name": "RegDst0"
},
{
"bits": 3,
"name": "3'b001"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 7,
"name": "shamt"
}
],
"config": {
"bits": 48,
"fontsize": 13,
"hspace": 900,
"lanes": 2,
"offset": 0
}
}hl.ccat SrcL, SrcR, shamt, ->Dst0, Dst1
RegDst0RegDst1SrcLSrcRshamt下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_HL_CCAT() => ScalarOperationbegin return ScalarOperation_HL_CCAT;end;readonly func InstructionContractHandler_HL_CCAT() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteConcatenatePair;end;
pure func InstructionContractLowResult_HL_CCAT( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount == 0 then return right; elsif shift_amount < 64 then return LSR(right, shift_amount) OR LSL(left, 64 - shift_amount); else return LSR(left, shift_amount - 64); end;end;
pure func InstructionContractHighResult_HL_CCAT( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount == 0 then return left; elsif shift_amount < 64 then return LSR(left, shift_amount); else return Zeros{PTO_XLEN}; end;end;// PTO-INSTRUCTION: {"assembly":["hl.ccat SrcL, SrcR, shamt, ->Dst0, Dst1"],"block":[],"catalog_indices":[127],"catalog_records":[{"asm":"hl.ccat SrcL, SrcR, shamt, ->Dst0, Dst1","constraints":[],"encoding":[{"index":0,"mask":"0x0000707f07ff","match":"0x0000105d000e","width_bits":48}],"encoding_kind":"HL48","fields":[{"name":"RegDst0","pieces":[{"instruction_lsb":23,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"RegDst1","pieces":[{"instruction_lsb":11,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcL","pieces":[{"instruction_lsb":31,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcR","pieces":[{"instruction_lsb":36,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"shamt","pieces":[{"instruction_lsb":41,"value_lsb":0,"width":7}],"signedness":"encoding-defined","width":7}],"form_id":"hl_ccat_48_a1200d8bf5ac","length_bits":48,"mnemonic":"HL.CCAT","semantic_family":"ALU","semantic_group":"ALU","semantic_handler":"ExecuteConcatenatePair","semantic_summary":"HL.CCAT logically right-shifts {SrcL, SrcR}, writes the low 64-bit result to Dst0, then writes the high result to Dst1.","status":"accepted"}],"classification":["alu"],"contract":{"block_composition":["none"],"canonical_assembly":["hl.ccat SrcL, SrcR, shamt, ->Dst0, Dst1"],"defaults":["SrcL, SrcR, shamt, RegDst0, and RegDst1 are required encoded fields; no field can be omitted.","Encoded shamt zero performs no shift."],"encoding_class":"standalone-encoded","examples":["hl.ccat a0, a1, 0, ->a2, a3","hl.ccat t#1, u#1, 64, ->zero, a0","hl.ccat a0, a1, 127, ->t, t"],"exceptions":["The concatenation shift is total for every shamt and raises no arithmetic exception.","A fixed-bit mismatch or unavailable selected T/U source raises Fault_IllegalInstruction before either destination effect and before TPC advances."],"field_contracts":{},"field_zero_meanings":{"RegDst0":"Encoded zero discards the low result.","RegDst1":"Encoded zero discards the high result.","SrcL":"Encoded zero reads architectural GPR zero.","SrcR":"Encoded zero reads architectural GPR zero.","shamt":"Encoded zero performs no shift."},"legality":["SrcL and SrcR independently use the complete Reg5 source map: GPR0..GPR23, T#1..T#4, and U#1..U#4.","RegDst0 and RegDst1 independently use the common destination map: GPR writes, discard codes, U push, or T push.","shamt 0..127 is fully assigned and zero-filling."],"memory_effects":["none"],"operands":[{"field":"RegDst0","role":"ordered low-result Reg5 destination or discard"},{"field":"RegDst1","role":"ordered high-result Reg5 destination or discard"},{"field":"SrcL","role":"upper Reg5 source"},{"field":"SrcR","role":"lower Reg5 source"},{"field":"shamt","role":"unsigned seven-bit logical-right shift amount"}],"ordering":["Snapshot both sources before either destination effect; relative source reads do not consume queue entries.","Publish Dst0 first and Dst1 second. Equal GPR destinations retain Dst1; equal queue destinations enqueue Dst0 before Dst1.","After both destination effects, advance TPC by six bytes."],"standalone_opcode":true,"state_effects":["Form {SrcL, SrcR}, logically shift the 128-bit value right by shamt, publish bits 63:0 to Dst0, then publish bits 127:64 to Dst1.","Apply the complete Reg5 destination map independently in Dst0 then Dst1 order; discard destinations have no effect.","No memory, reservation, descriptor, Tile, block, privilege, numeric-status, branch-target, or other control state changes. Successful execution advances TPC by six bytes."]},"depends_on":["PTO-BLOCK-MODEL-SCHEMA-PROFILE-ENCODING"],"id":"PTO-SCALAR-HL-CCAT","mnemonic":"HL.CCAT","summary":"HL.CCAT logically right-shifts {SrcL, SrcR}, writes the low 64-bit result to Dst0, then writes the high result to Dst1.","surface":"scalar"}// PTO-REVIEW: {"review_method":"formal-definition-read","outcome":"FORMAL-COMPLETE","reviewed_fields":["assembly","encoding","defaults","operation","state","memory","ordering","faults","reserved"]}// NDF-BEGIN: PTO-HL-CCAT-CONTRACT-001// ndf: kind=contract level=L1 layer=scalar status=accepted// HL.CCAT MUST snapshot SrcL and SrcR, form {SrcL, SrcR}, and// logically shift the concatenation right by the complete seven-bit shamt.// Dst0 MUST receive the low result before Dst1 receives the high result.// All shifts 0 through 127 MUST be assigned and zero-filling.// Both sources MUST use the complete non-consuming Reg5 source map and// both destinations MUST use the common ordered Reg5 destination map.// Successful execution MUST advance TPC by six bytes and preserve all// memory, Tile, block, reservation, privilege, numeric-status, and fault state.// NDF-END: PTO-HL-CCAT-CONTRACT-001// DOC-BEGIN: decodereadonly func InstructionContractOperation_HL_CCAT() => ScalarOperationbegin return ScalarOperation_HL_CCAT;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_HL_CCAT() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteConcatenatePair;end;
pure func InstructionContractLowResult_HL_CCAT( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount == 0 then return right; elsif shift_amount < 64 then return LSR(right, shift_amount) OR LSL(left, 64 - shift_amount); else return LSR(left, shift_amount - 64); end;end;
pure func InstructionContractHighResult_HL_CCAT( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount == 0 then return left; elsif shift_amount < 64 then return LSR(left, shift_amount); else return Zeros{PTO_XLEN}; end;end;// DOC-END: operation
HL.CCAT 是一条 48 位标量 ALU 指令。它拼接两个源部分,执行编码指定的逻辑右移,再把结果拆分到低、高XLEN目标;当前指令契约定义结果发布路径以及任何额外状态效果。
执行时先对编码输入做快照,然后拼接两个源部分,执行编码指定的逻辑右移,再把结果拆分到低、高XLEN目标,最后才产生目标效果。
RegDst0 是 5 位字段,选择第一个低部结果的 Reg5 目标,或丢弃该结果。RegDst1 是 5 位字段,选择第二个高部结果的 Reg5 目标,或丢弃该结果。SrcL 是 5 位字段,通过 Reg5 选择拼接值的高部源。SrcR 是 5 位字段,通过 Reg5 选择拼接值的低部源。shamt 是 7 位字段,编码无符号七位逻辑右移量。这些角色来自当前指令契约;T/U 源只被读取和快照,不会因源选择而出队。编码零的精确含义列在下方生成的默认值章节中。
所有结果都在发布前计算完成。随后按编码顺序(RegDst0, RegDst1)更新目标;目标重复指向同一寄存器或队列时也采用这一顺序。
该 ALU 操作不产生内存效果。成功完成架构效果后,TPC 前进 6 字节。
该操作不会产生隐藏的标量发布目标或隐式内存访问。架构变化仅限于当前契约列出的状态效果。
编码移位范围全部有定义并使用零填充;固定编码位不匹配或所选 T/U 源不可用时,会在两个目标效果之前触发 Fault_IllegalInstruction。
下方生成的合法性表是已分配字段值、保留编码和目标丢弃编码的权威说明。解码与源可用性检查先于架构效果完成。
本示例只用于演示当前 ASL 所有者,不替代规范操作。
以一个小型 HL.CCAT 示例说明:移位量为 0、高部源为 1、低部源为 2 时,按顺序得到低部结果 2 和高部结果 1。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
HL.CCAT MUST snapshot SrcL and SrcR, form {SrcL, SrcR}, and logically shift the concatenation right by the complete seven-bit shamt. Dst0 MUST receive the low result before Dst1 receives the high result. All shifts 0 through 127 MUST be assigned and zero-filling. Both sources MUST use the complete non-consuming Reg5 source map and both destinations MUST use the common ordered Reg5 destination map. Successful execution MUST advance TPC by six bytes and preserve all memory, Tile, block, reservation, privilege, numeric-status, and fault state.
PTO-HL-CCAT-CONTRACT-001asl/scalar/alu/HL.CCAT.asl5e6214b0d513a452b83d98926f1b832006b4eadaad3fbb16e58e16d0542db0bc18dbfbdfb72ba2798180de75b6ca1696306ba304b7b5e4ac94f7a30024618c1b12 matching entries
PTO-AVS-SCALAR-HL-CCAT-DECODE-001tests/asl/scalar/alu/HL.CCAT/scalar-decode-hl-ccat-canonical-001.aslf589ea11b73ec7d1e78c53197c51f39f6fa18f24fb56e15fa16b4c463175b65fPTO-AVS-SCALAR-HL-CCAT-OVERLAP-001tests/asl/scalar/alu/HL.CCAT/scalar-bound-hl-ccat-overlap-001.asl33e920b4a961be37cb5639e29284e38f5ee0fc28c8b174b2d626a2571e4b50b4PTO-AVS-SCALAR-HL-CCAT-READINESS-001tests/asl/scalar/alu/HL.CCAT/scalar-fault-hl-ccat-readiness-001.asld6693c8f31160b4db4ee3d12385d390670e328c81de58b768a7eb5dca9774ba4PTO-AVS-SCALAR-HL-CCAT-SHIFT-001tests/asl/scalar/alu/HL.CCAT/scalar-exec-hl-ccat-shift-001.asl016ac2530672ec2dbed6636a58396f49d1a154e2a25598ae76f7de70a4c57961PTO-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-0026…
ADR-0026docs/status/decisions/0026-scalar-alu-totality-and-alias-order.md41d126f224dddc371832120f1b02eab64e426872fdcbea452bad77c90bdec349Loading ADR-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196Loading ADR-0084…
ADR-0084docs/status/decisions/0084-scalar-system-and-queue-operations.mde068992fa81e2c4ac46e492391a2f784141d68e041bf0b9e0586c37217d1e08c{
"classification": [
"alu"
],
"documentation": "docs/scalar/alu/HL.CCAT.md",
"id": "PTO-SCALAR-HL-CCAT",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "HL.CCAT",
"ndf_clause": "PTO-INST-SCALAR-HL-CCAT"
},
"mnemonic": "HL.CCAT",
"readiness_subjects": [
"ADR-0026",
"ADR-0059",
"ADR-0084"
],
"semantic_tests": [
"PTO-AVS-SCALAR-HL-CCAT-OVERLAP-001",
"PTO-AVS-SCALAR-HL-CCAT-READINESS-001",
"PTO-AVS-SCALAR-HL-CCAT-SHIFT-001"
],
"source": "asl/scalar/alu/HL.CCAT.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-SCALAR-HL-CCAT-DECODE-001",
"PTO-AVS-SCALAR-HL-CCAT-OVERLAP-001",
"PTO-AVS-SCALAR-HL-CCAT-READINESS-001",
"PTO-AVS-SCALAR-HL-CCAT-SHIFT-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd868125e6214b0d513a452b83d98926f1b832006b4eadaad3fbb16e58e16d0542db0bc36f2ab114bed7bbb992187e5cb4cb0b6fa7cfee0035ad2ad7afa25ba0fb91778asl/scalar/alu/HL.CCAT.aslasl/scalar/alu/HL.CCAT.aslasl/scalar/alu/HL.CCAT.asl