操作数与参数
RegDst0- ordered low-result Reg5 destination or discard
RegDst1- ordered high-result Reg5 destination or discard
SrcL- upper low-word Reg5 source
SrcR- lower low-word Reg5 source
shamt- unsigned seven-bit logical-right shift amount
HL.CCATW logically right-shifts {SrcL[31:0], SrcR[31:0]}, sign-extends the low then high 32-bit results, and writes them in order.
PTO-SCALAR-HL-CCATWhl.ccatw 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 low-word Reg5 source | Encoded zero reads architectural GPR zero. |
SrcR | 5 | encoding-defined | lower low-word 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'b010 |
| 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'b010"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 7,
"name": "shamt"
}
],
"config": {
"bits": 48,
"fontsize": 13,
"hspace": 900,
"lanes": 2,
"offset": 0
}
}hl.ccatw SrcL, SrcR, shamt, ->Dst0, Dst1
RegDst0RegDst1SrcLSrcRshamt下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_HL_CCATW() => ScalarOperationbegin return ScalarOperation_HL_CCATW;end;readonly func InstructionContractHandler_HL_CCATW() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteConcatenatePairW;end;
pure func InstructionContractLowResult_HL_CCATW( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount < 64 then var packed: Word = Zeros{PTO_XLEN}; packed[31:0] = right[31:0]; packed[63:32] = left[31:0]; return SignExtend{PTO_XLEN}( LSR(packed, shift_amount)[31:0]); else return Zeros{PTO_XLEN}; end;end;
pure func InstructionContractHighResult_HL_CCATW( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount < 64 then var packed: Word = Zeros{PTO_XLEN}; packed[31:0] = right[31:0]; packed[63:32] = left[31:0]; return SignExtend{PTO_XLEN}( LSR(packed, shift_amount)[63:32]); else return Zeros{PTO_XLEN}; end;end;// PTO-INSTRUCTION: {"assembly":["hl.ccatw SrcL, SrcR, shamt, ->Dst0, Dst1"],"block":[],"catalog_indices":[128],"catalog_records":[{"asm":"hl.ccatw SrcL, SrcR, shamt, ->Dst0, Dst1","constraints":[],"encoding":[{"index":0,"mask":"0x0000707f07ff","match":"0x0000205d000e","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_ccatw_48_24a85ea4659c","length_bits":48,"mnemonic":"HL.CCATW","semantic_family":"ALU","semantic_group":"ALU","semantic_handler":"ExecuteConcatenatePairW","semantic_summary":"HL.CCATW logically right-shifts {SrcL[31:0], SrcR[31:0]}, sign-extends the low then high 32-bit results, and writes them in order.","status":"accepted"}],"classification":["alu"],"contract":{"block_composition":["none"],"canonical_assembly":["hl.ccatw 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.ccatw a0, a1, 0, ->a2, a3","hl.ccatw t#1, u#1, 64, ->zero, a0","hl.ccatw 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; values 64..127 produce two zeros."],"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 low-word Reg5 source"},{"field":"SrcR","role":"lower low-word 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":["Pack SrcL[31:0] above SrcR[31:0]. For shamt 0..63, logically shift the 64-bit value right, sign-extend result bits 31:0 to Dst0 and bits 63:32 to Dst1; for shamt 64..127 both results are zero.","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-CCATW","mnemonic":"HL.CCATW","summary":"HL.CCATW logically right-shifts {SrcL[31:0], SrcR[31:0]}, sign-extends the low then high 32-bit results, and writes them in order.","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-CCATW-CONTRACT-001// ndf: kind=contract level=L1 layer=scalar status=accepted// HL.CCATW MUST snapshot SrcL and SrcR, form {SrcL[31:0], SrcR[31:0]}, and// logically shift the concatenation right by the complete seven-bit shamt.// Dst0 MUST receive the low result before Dst1 receives the high result.// Each 32-bit result MUST be sign-extended; shifts 64 through 127 MUST produce two zeros.// 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-CCATW-CONTRACT-001// DOC-BEGIN: decodereadonly func InstructionContractOperation_HL_CCATW() => ScalarOperationbegin return ScalarOperation_HL_CCATW;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_HL_CCATW() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteConcatenatePairW;end;
pure func InstructionContractLowResult_HL_CCATW( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount < 64 then var packed: Word = Zeros{PTO_XLEN}; packed[31:0] = right[31:0]; packed[63:32] = left[31:0]; return SignExtend{PTO_XLEN}( LSR(packed, shift_amount)[31:0]); else return Zeros{PTO_XLEN}; end;end;
pure func InstructionContractHighResult_HL_CCATW( left: Word, right: Word, shift_amount: integer {0..127}) => Wordbegin if shift_amount < 64 then var packed: Word = Zeros{PTO_XLEN}; packed[31:0] = right[31:0]; packed[63:32] = left[31:0]; return SignExtend{PTO_XLEN}( LSR(packed, shift_amount)[63:32]); else return Zeros{PTO_XLEN}; end;end;// DOC-END: operation
HL.CCATW 是一条 48 位标量 ALU 指令。它拼接两个源部分,执行编码指定的逻辑右移,再把结果拆分到低、高字目标;当前指令契约定义结果发布路径以及任何额外状态效果。
执行时先对编码输入做快照,然后拼接两个源部分,执行编码指定的逻辑右移,再把结果拆分到低、高字目标,最后才产生目标效果。
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.CCATW 示例说明:移位量为 0、高部源为 1、低部源为 2 时,按顺序得到低部结果 2 和高部结果 1。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
HL.CCATW MUST snapshot SrcL and SrcR, form {SrcL[31:0], SrcR[31:0]}, and logically shift the concatenation right by the complete seven-bit shamt. Dst0 MUST receive the low result before Dst1 receives the high result. Each 32-bit result MUST be sign-extended; shifts 64 through 127 MUST produce two zeros. 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-CCATW-CONTRACT-001asl/scalar/alu/HL.CCATW.asl1b7768e6a8e4bcdd3c3ed753437689294a614bfae71d7f3669d2e0243f8ddd0835d97c6bf601ece316d8429505cac8bd3884e0ec9f23bb8e6a23d40020a2b87412 matching entries
PTO-AVS-SCALAR-HL-CCATW-DECODE-001tests/asl/scalar/alu/HL.CCATW/scalar-decode-hl-ccatw-canonical-001.asl8eec95cfff700b20a2703e91a6d04c6a28b67050a68e0c54167a6808b794cc02PTO-AVS-SCALAR-HL-CCATW-OVERLAP-001tests/asl/scalar/alu/HL.CCATW/scalar-bound-hl-ccatw-overlap-001.asl1deb8433adc5f32d4e61d48886e035aa1b0497804b3f32179ec0b5f11110ab55PTO-AVS-SCALAR-HL-CCATW-READINESS-001tests/asl/scalar/alu/HL.CCATW/scalar-fault-hl-ccatw-readiness-001.asl9db7259e0008c82a289d07d3edb0f587fe8dce698a3d08795aed9dc60d172a5fPTO-AVS-SCALAR-HL-CCATW-SHIFT-001tests/asl/scalar/alu/HL.CCATW/scalar-exec-hl-ccatw-shift-001.asl4201b7379b09be9e959ba4c639a4e62883c810805f4a5db38feeeeede94a761aPTO-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.CCATW.md",
"id": "PTO-SCALAR-HL-CCATW",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "HL.CCATW",
"ndf_clause": "PTO-INST-SCALAR-HL-CCATW"
},
"mnemonic": "HL.CCATW",
"readiness_subjects": [
"ADR-0026",
"ADR-0059",
"ADR-0084"
],
"semantic_tests": [
"PTO-AVS-SCALAR-HL-CCATW-OVERLAP-001",
"PTO-AVS-SCALAR-HL-CCATW-READINESS-001",
"PTO-AVS-SCALAR-HL-CCATW-SHIFT-001"
],
"source": "asl/scalar/alu/HL.CCATW.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-SCALAR-HL-CCATW-DECODE-001",
"PTO-AVS-SCALAR-HL-CCATW-OVERLAP-001",
"PTO-AVS-SCALAR-HL-CCATW-READINESS-001",
"PTO-AVS-SCALAR-HL-CCATW-SHIFT-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd868121b7768e6a8e4bcdd3c3ed753437689294a614bfae71d7f3669d2e0243f8ddd08a5a71da71e812b2091f22e4f111b1fa63175f6ba1c54f6000c1ae6c253d4f571asl/scalar/alu/HL.CCATW.aslasl/scalar/alu/HL.CCATW.aslasl/scalar/alu/HL.CCATW.asl