操作数与参数
RegDst- Reg5 destination or discard
SrcL- left or sole Reg5 source
SrcR- right Reg5 source
SrcType- source carrier selector
FADD adds two selected FP64 or FP32 carriers through the active numeric profile and publishes its sticky flags.
PTO-SCALAR-FADDfadd.{T} SrcL, SrcR, ->{t, u, Rd}| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
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. |
SrcR | 5 | encoding-defined | right 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 |
|---|---|---|
| Constant | 31:27 | 5'b00000 |
| SrcType | 26:25 | variable |
| SrcR | 24:20 | variable |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b000 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1001011 |
{
"reg": [
{
"bits": 7,
"name": "7'b1001011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b000"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 2,
"name": "SrcType"
},
{
"bits": 5,
"name": "5'b00000"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}fadd.{T} SrcL, SrcR, ->{t, u, Rd}
RegDstSrcLSrcRSrcType下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_FADD() => ScalarOperationbegin return ScalarOperation_FADD;end;readonly func InstructionContractHandler_FADD() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingBinary;end;
pure func InstructionContractSourceTypeLegal_FADD(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FADD(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FADD(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FADD() => integer {1..3}begin return 2;end;
pure func InstructionContractUsesProfileFlags_FADD() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FADD() => booleanbegin return TRUE;end;
pure func InstructionContractBinaryOperation_FADD() => FloatingBinaryOperationbegin return FloatingBinary_ADD;end;// PTO-INSTRUCTION: {"assembly":["fadd.{T} SrcL, SrcR, ->{t, u, Rd}"],"block":[],"catalog_indices":[88],"catalog_records":[{"asm":"fadd.{T} SrcL, SrcR, ->{t, u, Rd}","constraints":[{"field":"SrcType","operator":"one-of","values":[0,1]}],"encoding":[{"index":0,"mask":"0xf800707f","match":"0x0000004b","width_bits":32}],"encoding_kind":"L32","fields":[{"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":"SrcR","pieces":[{"instruction_lsb":20,"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":"fadd_32_b78b658e6740","length_bits":32,"mnemonic":"FADD","semantic_family":"FSU","semantic_group":"FSU","semantic_handler":"FloatingBinary","semantic_summary":"FADD adds two selected FP64 or FP32 carriers through the active numeric profile and publishes its sticky flags.","status":"accepted"}],"classification":["fsu"],"contract":{"block_composition":["none"],"canonical_assembly":["fadd.{T} SrcL, SrcR, ->{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."],"encoding_class":"standalone-encoded","examples":["fadd.fd a0, a1, ->a2","fadd.fs t#1, u#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":{"RegDst":"Encoded zero discards the result.","SrcL":"Encoded zero reads the architectural zero GPR.","SrcR":"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."],"memory_effects":["none"],"operands":[{"field":"RegDst","role":"Reg5 destination or discard"},{"field":"SrcL","role":"left or sole Reg5 source"},{"field":"SrcR","role":"right 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":["FADD adds two selected FP64 or FP32 carriers through the active numeric profile and publishes its sticky flags.","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, add the normalized carriers modulo the selected 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-FADD","mnemonic":"FADD","summary":"FADD adds two selected FP64 or FP32 carriers through the active numeric profile and publishes its sticky flags.","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_FADD() => ScalarOperationbegin return ScalarOperation_FADD;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_FADD() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingBinary;end;
pure func InstructionContractSourceTypeLegal_FADD(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FADD(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FADD(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FADD() => integer {1..3}begin return 2;end;
pure func InstructionContractUsesProfileFlags_FADD() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FADD() => booleanbegin return TRUE;end;
pure func InstructionContractBinaryOperation_FADD() => FloatingBinaryOperationbegin return FloatingBinary_ADD;end;// DOC-END: operation
FADD 通过当前数值配置档对两个选定的 FP64 或 FP32 载体求和,发布配置档返回的结果,并把返回的 5 位状态向量累积到粘滞数值状态。
SrcType=00 选择完整 FP64 载体,SrcType=01 从零扩展后的低 32 位选择 FP32 载体。指令使用当前舍入模式调用配置档的二元加法操作。
选定的配置档返回结果以及 NV、DZ、OF、UF、NX;FADD 把这些位按位或到已有的粘滞 CORE_STATE[36:32] 字段中。
在 pto-v0 参考配置档中,加法是确定性的原始载体模运算,并返回全零标志。该参考行为并不是 IEEE-754 或目标硬件一致性声明。
SrcL 和 SrcR 接受全部 Reg5 源选择器,包括不消费的 T/U 源。RegDst 的 1..23 写入 GPR,30 压入 U,31 压入 T,0 和 24..29 只丢弃结果。页面显示的所有操作数字段都有编码。编码零是一个值:源选择器 0 读取零 GPR,目的 0 丢弃结果,SrcType=00 选择 FP64。
第一次读取源或调用配置档之前,会先检查类型合法性。随后两个源都在标志累积或目的发布前完成快照。
产生的标志会按位或到粘滞数值状态,结果随后被发布或丢弃,TPC 再前进 4 字节。数值标志本身不会引发同步 PTO 陷阱。
FADD 不产生内存或保留状态效果。
SrcType=10 和 SrcType=11 为保留值,会在读取源、调用配置档、写入目的、更新标志、压入队列或改变 TPC 之前引发 Fault_IllegalInstruction。选中的 T/U 源尚不可用时,适用相同的效果前故障边界。
可移植契约拥有载体选择、源快照、标志累积、目的发布和拒绝顺序。当前具名数值配置档拥有算术结果和产生的状态向量。
下面的示例只说明选择和发布,并不脱离当前配置档另行定义浮点算术。
fadd.fd a0, a1, ->a2 选择 FP64 载体路径,对两个源取快照,使用当前舍入模式调用配置档加法,累积返回的标志,把返回载体写入 a2,最后让 TPC 前进 4 字节。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
18 matching entries
PTO-AVS-FSU-FADD-BOUND-001tests/asl/scalar/fsu/FADD/scalar-bound-fadd-values-001.aslb59b0aaf08d5d4179ad895190fe7aab9e098d324d5ad3f632debf10c3bc28d3fPTO-AVS-FSU-FADD-DST-001tests/asl/scalar/fsu/FADD/scalar-exec-fadd-dst-001.asl5b663985f44e95fe3182a3b0ac323601ee915903b5e5131cb8c4c3f5d41e13f4PTO-AVS-FSU-FADD-EXEC-001tests/asl/scalar/fsu/FADD/scalar-exec-fadd-direct-001.asle233c46858b22048815c4eac26878a579808d11fd0f0b86dd95ce4db6830e224PTO-AVS-FSU-FADD-FLAGS-001tests/asl/scalar/fsu/FADD/scalar-state-fadd-flags-001.asl7d82b680d43b9378e7485f076a4b4938145987bcd9c34e642de121fa5a7d60b5PTO-AVS-FSU-FADD-ROUND-001tests/asl/scalar/fsu/FADD/scalar-bound-fadd-round-001.asl987f48d6c84d570f5dd00143d317428d4cc3b41311d7f324cef97ce0f6aeaed8PTO-AVS-FSU-FADD-RSVD-001tests/asl/scalar/fsu/FADD/scalar-fault-fadd-types-001.asl7d95ba455d99cef76b4e69b555a912a904a68321dbd95c0b953e20ee12c1ffb4PTO-AVS-FSU-FADD-SNAP-001tests/asl/scalar/fsu/FADD/scalar-exec-fadd-snap-001.asl75fdd9227cc0f0c2c606bc70d436ead204dc4ed8f8e7ba4349c290354f40d016PTO-AVS-FSU-FADD-SRC-001tests/asl/scalar/fsu/FADD/scalar-exec-fadd-src-001.aslfe7af2f86b4cc88fbca8716da2ea1bd556d2f5b8c449b31d6997a15cca85c134PTO-AVS-FSU-FADD-TYPE-001tests/asl/scalar/fsu/FADD/scalar-bound-fadd-types-001.asl1e7bb3113ccb9ca5a143919aaa1db8fa43c17dc3676703eaed29415943829359PTO-AVS-SCALAR-FADD-DECODE-001tests/asl/scalar/fsu/FADD/scalar-decode-fadd-canonical-001.asl0cc6571019e627d9473ebe414283db6f2a08c913b17e76c08c45ebe263d9ca96PTO-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-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196{
"classification": [
"fsu"
],
"documentation": "docs/scalar/fsu/FADD.md",
"id": "PTO-SCALAR-FADD",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "FADD",
"ndf_clause": "PTO-INST-SCALAR-FADD"
},
"mnemonic": "FADD",
"readiness_subjects": [
"ADR-0028",
"ADR-0038",
"ADR-0059"
],
"semantic_tests": [
"PTO-AVS-FSU-FADD-BOUND-001",
"PTO-AVS-FSU-FADD-DST-001",
"PTO-AVS-FSU-FADD-EXEC-001",
"PTO-AVS-FSU-FADD-FLAGS-001",
"PTO-AVS-FSU-FADD-ROUND-001",
"PTO-AVS-FSU-FADD-RSVD-001",
"PTO-AVS-FSU-FADD-SNAP-001",
"PTO-AVS-FSU-FADD-SRC-001",
"PTO-AVS-FSU-FADD-TYPE-001"
],
"source": "asl/scalar/fsu/FADD.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-FSU-FADD-BOUND-001",
"PTO-AVS-FSU-FADD-DST-001",
"PTO-AVS-FSU-FADD-EXEC-001",
"PTO-AVS-FSU-FADD-FLAGS-001",
"PTO-AVS-FSU-FADD-ROUND-001",
"PTO-AVS-FSU-FADD-RSVD-001",
"PTO-AVS-FSU-FADD-SNAP-001",
"PTO-AVS-FSU-FADD-SRC-001",
"PTO-AVS-FSU-FADD-TYPE-001",
"PTO-AVS-SCALAR-FADD-DECODE-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd86812103570e2b2782e5340029461e2590b4b1fd2a58288d7d4a2f574ded0d07ce2f4e967d3da4813c0a66e45f9663e308a306858c076757b4b6d7f8a22408032baf1asl/scalar/fsu/FADD.aslasl/scalar/fsu/FADD.asl