操作数与参数
SrcL- left Reg5 source
SrcR- right Reg5 source
C.AND snapshots two complete Reg5 sources, computes the bitwise conjunction of SrcL and SrcR, and pushes the wrapping XLEN result to T.
PTO-SCALAR-C-ANDc.and srcL, srcR, ->t| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
SrcL | 5 | encoding-defined | left Reg5 source | Encoded zero reads the architectural zero GPR. |
SrcR | 5 | encoding-defined | right Reg5 source | Encoded zero reads the architectural zero GPR. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| SrcR | 15:11 | variable |
| SrcL | 10:6 | variable |
| Constant | 5:0 | 6'b101000 |
{
"reg": [
{
"bits": 6,
"name": "6'b101000"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
}
],
"config": {
"bits": 16,
"fontsize": 13,
"hspace": 640,
"lanes": 1,
"offset": 0
}
}c.and srcL, srcR, ->t
SrcLSrcR下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_C_AND() => ScalarOperationbegin return ScalarOperation_C_AND;end;readonly func InstructionContractHandler_C_AND() => ScalarSemanticHandlerbegin return ScalarHandler_ScalarBinary;end;
pure func InstructionContractResult_C_AND( left: Word, right: Word) => Wordbegin return ScalarBinary( ScalarBinary_AND, left, right);end;// PTO-INSTRUCTION: {"assembly":["c.and srcL, srcR, ->t"],"block":[],"catalog_indices":[25],"catalog_records":[{"asm":"c.and srcL, srcR, ->t","constraints":[],"encoding":[{"index":0,"mask":"0x003f","match":"0x0028","width_bits":16}],"encoding_kind":"C16","fields":[{"name":"SrcL","pieces":[{"instruction_lsb":6,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcR","pieces":[{"instruction_lsb":11,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5}],"form_id":"c_and_16_379e5bed3352","length_bits":16,"mnemonic":"C.AND","semantic_family":"ALU","semantic_group":"ALU","semantic_handler":"ScalarBinary","semantic_summary":"C.AND snapshots two complete Reg5 sources, computes the bitwise conjunction of SrcL and SrcR, and pushes the wrapping XLEN result to T.","status":"accepted"}],"classification":["alu"],"contract":{"block_composition":["none"],"canonical_assembly":["c.and srcL, srcR, ->t"],"defaults":["SrcL and SrcR are required encoded fields; neither source can be omitted.","The destination is not encoded: every successful form pushes exactly one result to T."],"encoding_class":"standalone-encoded","examples":["c.and t#1, u#1, ->t"],"exceptions":["Bitwise and is a total fixed-width operation and raises no arithmetic exception.","An unavailable selected T/U source raises Fault_IllegalInstruction before the T push, before TPC advances, and before any other effect."],"field_contracts":{},"field_zero_meanings":{"SrcL":"Encoded zero reads the architectural zero GPR.","SrcR":"Encoded zero reads the architectural zero GPR."},"legality":["Each source code 0..23 selects an absolute GPR, 24..27 selects T#1..T#4, and 28..31 selects U#1..U#4 without consumption.","Duplicate, absolute-relative, and relative-relative source pairs are legal. Every encoded source value is assigned."],"memory_effects":["none"],"operands":[{"field":"SrcL","role":"left Reg5 source"},{"field":"SrcR","role":"right Reg5 source"}],"ordering":["Snapshot both sources before pushing the destination so aliases observe the pre-instruction queue state.","Push the result as the newest T entry, then advance TPC by two bytes."],"standalone_opcode":true,"state_effects":["Compute bitwise AND on the two complete XLEN source values.","Push exactly one XLEN result to T. Existing T entries shift toward older indices, the former T#4 is discarded, and no source is consumed.","No GPR, U queue, memory, reservation, descriptor, numeric-status, block, privilege, predicate, or other control state changes. Successful execution advances TPC by two bytes."]},"depends_on":["PTO-BLOCK-MODEL-SCHEMA-PROFILE-ENCODING"],"id":"PTO-SCALAR-C-AND","mnemonic":"C.AND","summary":"C.AND snapshots two complete Reg5 sources, computes the bitwise conjunction of SrcL and SrcR, and pushes the wrapping XLEN result to T.","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_C_AND() => ScalarOperationbegin return ScalarOperation_C_AND;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_C_AND() => ScalarSemanticHandlerbegin return ScalarHandler_ScalarBinary;end;
pure func InstructionContractResult_C_AND( left: Word, right: Word) => Wordbegin return ScalarBinary( ScalarBinary_AND, left, right);end;// DOC-END: operation
C.AND 是一条 16 位标量 ALU 指令。它按照完整 XLEN 值结果规则执行按位与;当前指令契约定义结果发布路径以及任何额外状态效果。
执行时先对编码输入做快照,然后按照完整 XLEN 值结果规则执行按位与,最后才产生目标效果。
SrcL 是 5 位字段,通过 Reg5 选择左操作数。SrcR 是 5 位字段,通过 Reg5 选择右操作数。这些角色来自当前指令契约;T/U 源只被读取和快照,不会因源选择而出队。编码零的精确含义列在下方生成的默认值章节中。
所有标量源都在发布前完成快照;指令完成时恰好向 T 推入一个结果。
该 ALU 操作不产生内存效果。成功完成架构效果后,TPC 前进 2 字节。
该操作不会产生隐藏的标量发布目标或隐式内存访问。架构变化仅限于当前契约列出的状态效果。
固定宽度算术按当前操作规则回绕,不产生算术异常;固定编码位不匹配或所选 T/U 源不可用时,会在结果发布和 TPC 前进之前触发 Fault_IllegalInstruction。
下方生成的合法性表是已分配字段值、保留编码和目标丢弃编码的权威说明。解码与源可用性检查先于架构效果完成。
本示例只用于演示当前 ASL 所有者,不替代规范操作。
以一个小型 C.AND 示例说明:输入 0xc 与 0xa 产生 0x8。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
10 matching entries
PTO-AVS-SCALAR-C-AND-DECODE-001tests/asl/scalar/alu/C.AND/scalar-decode-c-and-canonical-001.asl4d222a63e1d1d857ddf3d55848860388c662b510d675c70fc8b34df74bc609a0PTO-AVS-SCALAR-C-AND-QUEUE-001tests/asl/scalar/alu/C.AND/scalar-exec-c-and-queue-001.asl4ae32ae4c29908bd265e17d0e4e54924c00e051917e193fc325bde5a5371f72aPTO-AVS-SCALAR-C-AND-READINESS-001tests/asl/scalar/alu/C.AND/scalar-fault-c-and-readiness-001.asl5e678aa7377f7f5e57717d2884468681c2586773e30cff8bcc2df37599c94dbaPTO-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.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196{
"classification": [
"alu"
],
"documentation": "docs/scalar/alu/C.AND.md",
"id": "PTO-SCALAR-C-AND",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "C.AND",
"ndf_clause": "PTO-INST-SCALAR-C-AND"
},
"mnemonic": "C.AND",
"readiness_subjects": [
"ADR-0026",
"ADR-0059"
],
"semantic_tests": [
"PTO-AVS-SCALAR-C-AND-QUEUE-001",
"PTO-AVS-SCALAR-C-AND-READINESS-001"
],
"source": "asl/scalar/alu/C.AND.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-SCALAR-C-AND-DECODE-001",
"PTO-AVS-SCALAR-C-AND-QUEUE-001",
"PTO-AVS-SCALAR-C-AND-READINESS-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd86812268fa3e2593f9215798660fdc124a751760f8438f52702c25a289c622787e67605a7f2df0fdb5254f66457ccfcafafc7c83784d5f9d6eb6aded55ca88dd009b9asl/scalar/alu/C.AND.aslasl/scalar/alu/C.AND.asl