Area
docs
Commit (superproject)
e670816
What happened?
问题描述
在 B.DATR.md 文档中,ByteId 被描述为 B.DATR 指令的一个参数:
B.DATR {Layout.{canon, normal}, DataType, PadValue, ByteId, CMode, RMode, Sat}
文档底部也给出了 ByteId (2bit, 编码 Byte0~Byte3) 的编码表。
但对应的位域 SVG 图和 JSON 定义中 没有包含 ByteId 字段:
当前编码 (legacy, 32bit)
| 位域 |
位数 |
说明 |
| bit 0 |
1 |
W |
| bits 1-3 |
3 |
Opcode |
| bits 4-6 |
3 |
Opc1 |
| bits 7-11 |
5 |
Layout |
| bits 12-14 |
3 |
Func |
| bits 15-17 |
3 |
RMode |
| bits 18-19 |
2 |
reserved 0 (空白/未使用) |
| bits 20-24 |
5 |
DataType |
| bit 25 |
1 |
C (canon 标志) |
| bit 26 |
1 |
S (饱和标志) |
| bits 27-28 |
2 |
PadValue |
| bits 29-31 |
3 |
CMode |
编码已满 32bit,没有为 ByteId (2bit) 预留空间。
补充:版本分歧
另外值得注意的是,SAIL 实现 (opcodes/lx_32.opc + decode.sail) 实际使用了一套不同的 v0.56 规范编码:
| 位域 |
legacy (SVG/JSON) |
v0.56 规范 (SAIL) |
| PadValue |
2bit (bits 27-28) |
5bit (bits 15-19) |
| C/S |
独立位 (bits 25-26) |
无独立位 (canon 并入 Layout) |
| RMode |
bits 15-17 |
bits 28-30 |
| CMode |
bits 29-31 |
bits 25-27 |
| Sat |
S (bit 26) |
bit 31 |
SVG/JSON 和 SAIL 实现的编码不一致,需要统一确定 ByteId 究竟应该加入哪个编码版本。
建议的修复方向
ByteId 需要 2bit(4 种取值:Byte0~Byte3)。在 legacy 编码中,bits 18-19 标注为 "reserved 0",可以用来放置 ByteId。
Reproduction steps
Logs / output
Area
docs
Commit (superproject)
e670816
What happened?
问题描述
在 B.DATR.md 文档中,ByteId 被描述为 B.DATR 指令的一个参数:
文档底部也给出了 ByteId (2bit, 编码 Byte0~Byte3) 的编码表。
但对应的位域 SVG 图和 JSON 定义中 没有包含 ByteId 字段:
当前编码 (legacy, 32bit)
编码已满 32bit,没有为 ByteId (2bit) 预留空间。
补充:版本分歧
另外值得注意的是,SAIL 实现 (opcodes/lx_32.opc + decode.sail) 实际使用了一套不同的 v0.56 规范编码:
SVG/JSON 和 SAIL 实现的编码不一致,需要统一确定 ByteId 究竟应该加入哪个编码版本。
建议的修复方向
ByteId 需要 2bit(4 种取值:Byte0~Byte3)。在 legacy 编码中,bits 18-19 标注为 "reserved 0",可以用来放置 ByteId。
Reproduction steps
Logs / output