I 类指令指定的立即数的最高位在哪里?

Where is the most significant bit of the immediate value specified by a I-type instruction?

我现在正在借助 logisim 构建一个简单的 RISC-V 处理器。关于I型指令:

我知道指令定义如下:

[0:6] => 操作码(确定ALU需要计算什么)

[7:11] => rd(存储答案的目标寄存器)

[12:14] => 也是操作码的一部分

[15:19] => rs1(存储要与外部立即数相加的值的源寄存器)

[20:31] => imm(立即数)

由于架构将是32位的,12位的立即数需要进行符号扩展,才能与rs1中的内容相加。所以我感到困惑的地方是 "imm" 的哪一端位于最高有效位(第 20 位/第 31 位)?

RISC-V specs 在第 16 页声明如下:

"In particular, the sign bit for all immediates is always in bit 31 of the instruction to speed sign-extension circuitry."

由于符号位是最高位,所以是第31位。