Operands and parameters
DstType- destination carrier selector
RegDst- Reg5 destination or discard
SrcL- left or sole Reg5 source
SrcType- source carrier selector
FCVTN converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-nearest mode.
PTO-SCALAR-FCVTNfcvtn.{srcT2dstT} SrcL, ->{t, u, Rd}| Field | Bits | Signedness | Architectural role | Encoded zero |
|---|---|---|---|---|
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'b011 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1101011 |
{
"reg": [
{
"bits": 7,
"name": "7'b1101011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b011"
},
{
"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
}
}fcvtn.{srcT2dstT} SrcL, ->{t, u, Rd}
DstTypeRegDstSrcLSrcTypeThis Operation comes directly from the instruction owner; the page does not rewrite its behavior.
readonly func InstructionContractOperation_FCVTN() => ScalarOperationbegin return ScalarOperation_FCVTN;end;readonly func InstructionContractHandler_FCVTN() => ScalarSemanticHandlerbegin return ScalarHandler_ConvertFloatingEncoding;end;
pure func InstructionContractSourceTypeLegal_FCVTN(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FCVTN(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FCVTN(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractDestinationTypeLegal_FCVTN(encoded: bits(5)) => booleanbegin return UInt(encoded) <= 14;end;
pure func InstructionContractSourceArity_FCVTN() => integer {1..3}begin return 1;end;
pure func InstructionContractUsesProfileFlags_FCVTN() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FCVTN() => booleanbegin return FALSE;end;
pure func InstructionContractFixedRounding_FCVTN() => NumericRoundingModebegin return NumericRound_RNE;end;// PTO-INSTRUCTION: {"assembly":["fcvtn.{srcT2dstT} SrcL, ->{t, u, Rd}"],"block":[],"catalog_indices":[92],"catalog_records":[{"asm":"fcvtn.{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":"0x0000306b","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":"fcvtn_32_8714ba358d80","length_bits":32,"mnemonic":"FCVTN","semantic_family":"FSU","semantic_group":"FSU","semantic_handler":"ConvertFloatingEncoding","semantic_summary":"FCVTN converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-nearest mode.","status":"accepted"}],"classification":["fsu"],"contract":{"block_composition":["none"],"canonical_assembly":["fcvtn.{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":["fcvtn.fd2sd a0, ->a1","fcvtn.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":["FCVTN converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-nearest 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-FCVTN","mnemonic":"FCVTN","summary":"FCVTN converts a selected FP64 or FP32 carrier to integer carrier code 0 through 14 with fixed round-nearest 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-FCVTN-DECISION-BINDING-001// ndf: kind=contract level=L1 layer=scalar status=accepted// FCVTN 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-FCVTN-DECISION-BINDING-001// DOC-BEGIN: decodereadonly func InstructionContractOperation_FCVTN() => ScalarOperationbegin return ScalarOperation_FCVTN;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_FCVTN() => ScalarSemanticHandlerbegin return ScalarHandler_ConvertFloatingEncoding;end;
pure func InstructionContractSourceTypeLegal_FCVTN(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FCVTN(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FCVTN(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractDestinationTypeLegal_FCVTN(encoded: bits(5)) => booleanbegin return UInt(encoded) <= 14;end;
pure func InstructionContractSourceArity_FCVTN() => integer {1..3}begin return 1;end;
pure func InstructionContractUsesProfileFlags_FCVTN() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FCVTN() => booleanbegin return FALSE;end;
pure func InstructionContractFixedRounding_FCVTN() => NumericRoundingModebegin return NumericRound_RNE;end;// DOC-END: operation
FCVTN converts FP64 or FP32 input to integer carrier code 0..14 with fixed round-nearest through the active numeric profile.
SrcType=00 selects a complete FP64 carrier; SrcType=01 selects the zero-extended low 32-bit FP32 carrier.
The active profile receives snapshotted operands and the mnemonic-selected operation, then returns a result and exact NV, DZ, OF, UF, NX vector.
In the pto-v0 reference profile, normalized source bits are retained in the selected destination-carrier width. This deterministic reference rule is not an IEEE-754 or target-hardware claim.
DstType selects the destination-carrier code.RegDst selects the encoded destination or discard behavior.SrcL supplies the left scalar source.SrcType selects the source-carrier width.All explicit sources are snapshotted before numeric-status or destination effects.
All five profile-returned flags are ORed into sticky numeric state; the operation cannot clear an existing flag.
The result is published or discarded, then TPC advances by 4 bytes. The instruction has no memory or reservation effect.
SrcType=10 and SrcType=11 are reserved. Reserved types and unavailable T/U sources raise Fault_IllegalInstruction before source, profile, flag, queue, destination, or TPC effects.
Destination carrier codes 0..14 are assigned; 15..31 are reserved and reject before effects.
The portable instruction contract owns carrier selection, snapshots, flag accumulation, publication, and fault order; the active named profile owns the numeric result and produced flags.
This example illustrates the current owner and does not define arithmetic independently of the normative rule or active profile.
fcvtn.fd2sd a0, ->a1 selects its carriers, snapshots its sources, invokes the active profile, accumulates returned flags, publishes the result, and then advances TPC.
Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
FCVTN 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-FCVTN-DECISION-BINDING-001asl/scalar/fsu/FCVTN.asl4cdc24dcae33fa0215525ac7746136baa6475e514321d27fadf0888b61758ba7c13b399324083412b0d60e4b2c237811cba7ea6b151b769c18a8d1a567fd404f21 matching entries
PTO-AVS-FSU-FCVTN-BOUND-001tests/asl/scalar/fsu/FCVTN/scalar-bound-fcvtn-values-001.asl62de7bab8c43b4436ad7e9a696ef333a1546168ff4e0bef1cbd1290c506f8dd3PTO-AVS-FSU-FCVTN-DST-001tests/asl/scalar/fsu/FCVTN/scalar-exec-fcvtn-dst-001.asl3d5c0e56d52d042673b158b7d38eab008948f67cdafe13152d4c326f7b3002b1PTO-AVS-FSU-FCVTN-EXEC-001tests/asl/scalar/fsu/FCVTN/scalar-exec-fcvtn-direct-001.asl5a5bdd6a47b766c86cd9e832331f773bdf6a141d4cadcd79be47fdc3cbc8d0cbPTO-AVS-FSU-FCVTN-FLAGS-001tests/asl/scalar/fsu/FCVTN/scalar-state-fcvtn-flags-001.asl54a7b27203d63de6485709fa6e7bfba7fc04b83cc0d125f359eed574e2b3fc6cPTO-AVS-FSU-FCVTN-ROUND-001tests/asl/scalar/fsu/FCVTN/scalar-bound-fcvtn-round-001.asleef698324f17a185924a684d1a9881c3329c47d25a173b2bbcdb6dfebddb4290PTO-AVS-FSU-FCVTN-RSVD-001tests/asl/scalar/fsu/FCVTN/scalar-fault-fcvtn-types-001.aslfbfbe023a234be06910e7d371b33548dc764265f0232399c327992710cd81789PTO-AVS-FSU-FCVTN-SNAP-001tests/asl/scalar/fsu/FCVTN/scalar-exec-fcvtn-snap-001.asl75f9f1aeefb05509de04fa8b5fda4d784f002fd2d051aa729a6e7bb9c6cf0decPTO-AVS-FSU-FCVTN-SRC-001tests/asl/scalar/fsu/FCVTN/scalar-exec-fcvtn-src-001.asla3d37447b4163c3e61044be1a5e2de7166de4f0b987484c712d5b19c6224df64PTO-AVS-FSU-FCVTN-TYPE-001tests/asl/scalar/fsu/FCVTN/scalar-bound-fcvtn-types-001.asl255c80c5c18043918a4dc19c70cdbe910fd1ad5875cec5012abe433fd332c093PTO-AVS-SCALAR-FCVTN-DECODE-001tests/asl/scalar/fsu/FCVTN/scalar-decode-fcvtn-canonical-001.asl5c537f82555d94a1b0c609770a0072922a1f3ad5852f1e9f3872ce0510d1e85dPTO-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/FCVTN.md",
"id": "PTO-SCALAR-FCVTN",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "FCVTN",
"ndf_clause": "PTO-INST-SCALAR-FCVTN"
},
"mnemonic": "FCVTN",
"readiness_subjects": [
"ADR-0028",
"ADR-0038",
"ADR-0039",
"ADR-0047",
"ADR-0059",
"ADR-0084"
],
"semantic_tests": [
"PTO-AVS-FSU-FCVTN-BOUND-001",
"PTO-AVS-FSU-FCVTN-DST-001",
"PTO-AVS-FSU-FCVTN-EXEC-001",
"PTO-AVS-FSU-FCVTN-FLAGS-001",
"PTO-AVS-FSU-FCVTN-ROUND-001",
"PTO-AVS-FSU-FCVTN-RSVD-001",
"PTO-AVS-FSU-FCVTN-SNAP-001",
"PTO-AVS-FSU-FCVTN-SRC-001",
"PTO-AVS-FSU-FCVTN-TYPE-001"
],
"source": "asl/scalar/fsu/FCVTN.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-FSU-FCVTN-BOUND-001",
"PTO-AVS-FSU-FCVTN-DST-001",
"PTO-AVS-FSU-FCVTN-EXEC-001",
"PTO-AVS-FSU-FCVTN-FLAGS-001",
"PTO-AVS-FSU-FCVTN-ROUND-001",
"PTO-AVS-FSU-FCVTN-RSVD-001",
"PTO-AVS-FSU-FCVTN-SNAP-001",
"PTO-AVS-FSU-FCVTN-SRC-001",
"PTO-AVS-FSU-FCVTN-TYPE-001",
"PTO-AVS-SCALAR-FCVTN-DECODE-001"
]
}0.58.5 · Release candidate7dc8b7e5b121d2b2499a2273bebff29e2cd868124cdc24dcae33fa0215525ac7746136baa6475e514321d27fadf0888b61758ba78bd803109c355d270cfea85757370d9830065f6fa2a822a67020e7a244037942asl/scalar/fsu/FCVTN.aslasl/scalar/fsu/FCVTN.aslasl/scalar/fsu/FCVTN.asl