操作数与参数
DstType- destination carrier selector
RegDst- Reg5 destination or discard
SrcL- left or sole Reg5 source
SrcType- source carrier selector
FCVTZ converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-toward-zero mode.
PTO-SCALAR-FCVTZfcvtz.{srcT2dstT} SrcL, ->{t, u, Rd}| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
DstType | 5 | encoding-defined | destination carrier selector | Encoded zero selects the 64-bit destination carrier; it is not omission. |
RegDst | 5 | encoding-defined | Reg5 destination or discard | Encoded zero discards the result. |
SrcL | 5 | encoding-defined | left or sole Reg5 source | Encoded zero reads the architectural zero GPR. |
SrcType | 2 | encoding-defined | source carrier selector | Encoded zero selects the 64-bit source carrier; it is not omission. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| DstType | 31:27 | variable |
| SrcType | 26:25 | variable |
| Constant | 24:20 | 5'b00000 |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b101 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1101011 |
{
"reg": [
{
"bits": 7,
"name": "7'b1101011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b101"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "5'b00000"
},
{
"bits": 2,
"name": "SrcType"
},
{
"bits": 5,
"name": "DstType"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}fcvtz.{srcT2dstT} SrcL, ->{t, u, Rd}
DstTypeRegDstSrcLSrcType下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_FCVTZ() => ScalarOperationbegin return ScalarOperation_FCVTZ;end;readonly func InstructionContractHandler_FCVTZ() => ScalarSemanticHandlerbegin return ScalarHandler_ConvertFloatingEncoding;end;
pure func InstructionContractSourceTypeLegal_FCVTZ(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FCVTZ(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FCVTZ(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractDestinationTypeLegal_FCVTZ(encoded: bits(5)) => booleanbegin return UInt(encoded) <= 14;end;
pure func InstructionContractSourceArity_FCVTZ() => integer {1..3}begin return 1;end;
pure func InstructionContractUsesProfileFlags_FCVTZ() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FCVTZ() => booleanbegin return FALSE;end;
pure func InstructionContractFixedRounding_FCVTZ() => NumericRoundingModebegin return NumericRound_RTZ;end;// PTO-INSTRUCTION: {"assembly":["fcvtz.{srcT2dstT} SrcL, ->{t, u, Rd}"],"block":[],"catalog_indices":[94],"catalog_records":[{"asm":"fcvtz.{srcT2dstT} SrcL, ->{t, u, Rd}","constraints":[{"field":"SrcType","operator":"one-of","values":[0,1]},{"field":"DstType","operator":"one-of","values":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]}],"encoding":[{"index":0,"mask":"0x01f0707f","match":"0x0000506b","width_bits":32}],"encoding_kind":"L32","fields":[{"name":"DstType","pieces":[{"instruction_lsb":27,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"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":"SrcType","pieces":[{"instruction_lsb":25,"value_lsb":0,"width":2}],"signedness":"encoding-defined","width":2}],"form_id":"fcvtz_32_bee01d31217c","length_bits":32,"mnemonic":"FCVTZ","semantic_family":"FSU","semantic_group":"FSU","semantic_handler":"ConvertFloatingEncoding","semantic_summary":"FCVTZ converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-toward-zero mode.","status":"accepted"}],"classification":["fsu"],"contract":{"block_composition":["none"],"canonical_assembly":["fcvtz.{srcT2dstT} SrcL, ->{t, u, Rd}"],"defaults":["Every displayed operand field is encoded explicitly; encoded zero is a value and never denotes omission.","SrcType=0 selects an FP64 carrier and SrcType=1 selects the zero-extended low-word FP32 carrier. SrcType=2 and SrcType=3 are reserved.","DstType codes 0..14 are assigned carrier widths and codes 15..31 are reserved."],"encoding_class":"standalone-encoded","examples":["fcvtz.fd2sd a0, ->a1","fcvtz.fs2sw t#1, ->u"],"exceptions":["A fixed-bit mismatch, reserved SrcType, reserved DstType where present, or unavailable selected T/U source raises Fault_IllegalInstruction before source, profile, destination, flag, queue, or TPC effects.","Numeric profile flags update sticky status and do not themselves raise a synchronous PTO trap."],"field_contracts":{},"field_zero_meanings":{"DstType":"Encoded zero selects the 64-bit destination carrier; it is not omission.","RegDst":"Encoded zero discards the result.","SrcL":"Encoded zero reads the architectural zero GPR.","SrcType":"Encoded zero selects the 64-bit source carrier; it is not omission."},"legality":["Every Reg5 source uses codes 0..23 for absolute GPRs, 24..27 for T#1..T#4, and 28..31 for U#1..U#4 without consumption.","Every Reg5 destination is assigned: codes 1..23 write GPRs, 30 pushes U, 31 pushes T, and 0 plus 24..29 discard only the result.","SrcType codes 0 and 1 are assigned; codes 2 and 3 are reserved.","DstType codes 0 through 14 are assigned; codes 15 through 31 are reserved."],"memory_effects":["none"],"operands":[{"field":"DstType","role":"destination carrier selector"},{"field":"RegDst","role":"Reg5 destination or discard"},{"field":"SrcL","role":"left or sole Reg5 source"},{"field":"SrcType","role":"source carrier selector"}],"ordering":["Validate every encoded type before the first architectural source read or profile call.","Snapshot every explicit source before flag or destination effects; duplicate sources, destination aliases, and same-queue read-then-push observe pre-instruction values.","Accumulate produced flags, publish or discard the destination, and then advance TPC."],"standalone_opcode":true,"state_effects":["FCVTZ converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-toward-zero mode.","The selected numeric profile returns an exact NV, DZ, OF, UF, NX vector which is ORed into existing sticky CORE_STATE flags.","For pto-v0, preserve the normalized source bits, retain the selected integer carrier width, and return zero flags. This executable reference behavior is not target floating-point conformance.","Destination codes 1..23 write GPRs, 30 pushes U, 31 pushes T, and 0 plus 24..29 discard the result.","Successful execution advances TPC by four bytes."]},"depends_on":["PTO-SCALAR-MODEL-FSU-PROFILE"],"id":"PTO-SCALAR-FCVTZ","mnemonic":"FCVTZ","summary":"FCVTZ converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-toward-zero mode.","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-FCVTZ-DECISION-BINDING-001// ndf: kind=contract level=L1 layer=scalar status=accepted// FCVTZ MUST implement the mnemonic-local canonical assembly, encoded// legality, defaults, state and memory effects, ordering, and fault boundaries// declared in this owner. The operation region below is the executable binding// for every accepted decision that names this mnemonic.// NDF-END: PTO-FCVTZ-DECISION-BINDING-001// DOC-BEGIN: decodereadonly func InstructionContractOperation_FCVTZ() => ScalarOperationbegin return ScalarOperation_FCVTZ;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_FCVTZ() => ScalarSemanticHandlerbegin return ScalarHandler_ConvertFloatingEncoding;end;
pure func InstructionContractSourceTypeLegal_FCVTZ(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FCVTZ(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FCVTZ(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractDestinationTypeLegal_FCVTZ(encoded: bits(5)) => booleanbegin return UInt(encoded) <= 14;end;
pure func InstructionContractSourceArity_FCVTZ() => integer {1..3}begin return 1;end;
pure func InstructionContractUsesProfileFlags_FCVTZ() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FCVTZ() => booleanbegin return FALSE;end;
pure func InstructionContractFixedRounding_FCVTZ() => NumericRoundingModebegin return NumericRound_RTZ;end;// DOC-END: operation
FCVTZ 通过当前数值配置档使用固定向零舍入,把 FP64 或 FP32 输入转换到整数载体编码 0..14。
SrcType=00 选择完整 FP64 载体;SrcType=01 选择零扩展后的低 32 位 FP32 载体。
当前配置档接收已经快照的操作数和助记符选定的操作,再返回结果以及精确的 NV、DZ、OF、UF、NX 向量。
在 pto-v0 参考配置档中,在选定目的载体宽度内保留规范化源位。该确定性参考规则不是 IEEE-754 或目标硬件声明。
DstType 选择目的载体编码。RegDst 选择编码指定的目的位置或丢弃行为。SrcL 提供左侧标量源。SrcType 选择源载体宽度。所有显式源都会在数值状态或目的效果前完成快照。
配置档返回的五个标志全部按位或到粘滞数值状态;该操作不能清除已有标志。
结果完成发布或丢弃后,TPC 前进 4 字节。该指令不产生内存或保留状态效果。
SrcType=10 和 SrcType=11 为保留值。保留类型或不可用 T/U 源会在读取源、调用配置档、更新标志或队列、写入目的以及改变 TPC 前引发 Fault_IllegalInstruction。
目的载体编码 0..14 已分配;15..31 为保留值,并在产生效果前拒绝。
可移植指令契约拥有载体选择、源快照、标志累积、发布和故障顺序;当前具名配置档拥有数值结果和产生的标志。
下面的示例只帮助理解当前所有者,不会脱离规范规则或当前配置档另行定义算术。
fcvtz.fd2sd a0, ->a1 选择载体,对源取快照,调用当前配置档,累积返回标志,发布结果,最后推进 TPC。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
FCVTZ MUST implement the mnemonic-local canonical assembly, encoded legality, defaults, state and memory effects, ordering, and fault boundaries declared in this owner. The operation region below is the executable binding for every accepted decision that names this mnemonic.
PTO-FCVTZ-DECISION-BINDING-001asl/scalar/fsu/FCVTZ.aslcfc3c3b38ddce44404b5eaf9e3ee696e88b5d7760622f95d8106c7a276b277cdce7db757409d9b33b753dcabdd14170bc9cae85355240d270686ab17a2df0eea21 matching entries
PTO-AVS-FSU-FCVTZ-BOUND-001tests/asl/scalar/fsu/FCVTZ/scalar-bound-fcvtz-values-001.asl781ae71d270edab04a7839cc1b3a359d202f50484b6155689c93cededf603c4aPTO-AVS-FSU-FCVTZ-DST-001tests/asl/scalar/fsu/FCVTZ/scalar-exec-fcvtz-dst-001.asl77f80b64a9552c1224834f1c058e83e86fffb2cc7f8aa55fbfb07bc1770512edPTO-AVS-FSU-FCVTZ-EXEC-001tests/asl/scalar/fsu/FCVTZ/scalar-exec-fcvtz-direct-001.aslbbd61d86b8db0c620a3824a9c7ed55a210905815d5a6e121d53ade206c0af734PTO-AVS-FSU-FCVTZ-FLAGS-001tests/asl/scalar/fsu/FCVTZ/scalar-state-fcvtz-flags-001.asl0f8db93de5a1b64bafc0b18c202444ce2e4d1a4f973adadd6e88a184c3e940d3PTO-AVS-FSU-FCVTZ-ROUND-001tests/asl/scalar/fsu/FCVTZ/scalar-bound-fcvtz-round-001.aslc1b663057e9e10868b06b54e742e1f47605a4881047f7de7d690204704a13832PTO-AVS-FSU-FCVTZ-RSVD-001tests/asl/scalar/fsu/FCVTZ/scalar-fault-fcvtz-types-001.asl957e1902a233830d8974976333e5d3ea271a6f973af3419e409a46c775bc3680PTO-AVS-FSU-FCVTZ-SNAP-001tests/asl/scalar/fsu/FCVTZ/scalar-exec-fcvtz-snap-001.asld5bc6ef6c1bb5357181b3eb839b0a14bbfe7c8bb8ebcd12f74ec90f8a8bc7ad3PTO-AVS-FSU-FCVTZ-SRC-001tests/asl/scalar/fsu/FCVTZ/scalar-exec-fcvtz-src-001.asl36e91e14a05ac0644d5751fddc431688e903f03d22bc7917e6a85641d1a05698PTO-AVS-FSU-FCVTZ-TYPE-001tests/asl/scalar/fsu/FCVTZ/scalar-bound-fcvtz-types-001.asl34671bcd6930a097e330dec791e2c340e348257bca6b7b4100e029f3ae90cd2cPTO-AVS-SCALAR-FCVTZ-DECODE-001tests/asl/scalar/fsu/FCVTZ/scalar-decode-fcvtz-canonical-001.asl2113ebd57fe7176a4bdc5c7b0eb7261ad8ab6d63011fcb872d432ca55a1ebf7dPTO-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-0028…
ADR-0028docs/status/decisions/0028-scalar-fsu-totality-and-profile-boundary.md1be39ca1ffda14b703ca03df9654f323d03b9cac620ba37d5cbe6ce8f3f9c486Loading ADR-0038…
ADR-0038docs/status/decisions/0038-scalar-numeric-flag-state-and-ownership.mdeac15c3bee955bb92833482b9af8b9f149fe17c13138e6f2b22f0ed1cf40fc07Loading ADR-0039…
ADR-0039docs/status/decisions/0039-numeric-rounding-selector-ownership.md7e1029fad878621047803e74838cde868d8b172412d62ad21ba5da7be02f8066Loading ADR-0047…
ADR-0047docs/status/decisions/0047-numeric-rounding-semantics.md5a7a0f1ddc09885943d3a337b989e6a2b02feba246a7427d5719cb4ba61cd1c8Loading 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": [
"fsu"
],
"documentation": "docs/scalar/fsu/FCVTZ.md",
"id": "PTO-SCALAR-FCVTZ",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "FCVTZ",
"ndf_clause": "PTO-INST-SCALAR-FCVTZ"
},
"mnemonic": "FCVTZ",
"readiness_subjects": [
"ADR-0028",
"ADR-0038",
"ADR-0039",
"ADR-0047",
"ADR-0059",
"ADR-0084"
],
"semantic_tests": [
"PTO-AVS-FSU-FCVTZ-BOUND-001",
"PTO-AVS-FSU-FCVTZ-DST-001",
"PTO-AVS-FSU-FCVTZ-EXEC-001",
"PTO-AVS-FSU-FCVTZ-FLAGS-001",
"PTO-AVS-FSU-FCVTZ-ROUND-001",
"PTO-AVS-FSU-FCVTZ-RSVD-001",
"PTO-AVS-FSU-FCVTZ-SNAP-001",
"PTO-AVS-FSU-FCVTZ-SRC-001",
"PTO-AVS-FSU-FCVTZ-TYPE-001"
],
"source": "asl/scalar/fsu/FCVTZ.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-FSU-FCVTZ-BOUND-001",
"PTO-AVS-FSU-FCVTZ-DST-001",
"PTO-AVS-FSU-FCVTZ-EXEC-001",
"PTO-AVS-FSU-FCVTZ-FLAGS-001",
"PTO-AVS-FSU-FCVTZ-ROUND-001",
"PTO-AVS-FSU-FCVTZ-RSVD-001",
"PTO-AVS-FSU-FCVTZ-SNAP-001",
"PTO-AVS-FSU-FCVTZ-SRC-001",
"PTO-AVS-FSU-FCVTZ-TYPE-001",
"PTO-AVS-SCALAR-FCVTZ-DECODE-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd86812cfc3c3b38ddce44404b5eaf9e3ee696e88b5d7760622f95d8106c7a276b277cda81d9c71d443d0ab5d50c22379033c5a1720172b639ed71fbc4d0228001e0a49asl/scalar/fsu/FCVTZ.aslasl/scalar/fsu/FCVTZ.aslasl/scalar/fsu/FCVTZ.asl