实验代码中,ID模块有无用的指令集 #17
WillanSnow
started this conversation in
General
Replies: 1 comment 1 reply
-
RM型指令那里是opcode,第二张图是funct3,是加法还是乘法用funct7判断,RV32I没有要求实现乘除法 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
为了方便查看波形,我尝试总结实验代码中出现的指令集合。


我发现op段有一个RM型指令,且R、M型指令内部的funct7编码类似。
我很好奇他们的区分方法,就去ALU内部查看细节。发现ALU内部并没有M型指令的实现,乘除之类的。

我继续编写了有乘法运算的c代码,并尝试编译成.asmbin文件,看看cpu如何实现。


结果在运行build.bat时,报错,无法执行。就是说CPU不支持乘法指令(可能也不支持所有的M型指令)
将ab修改成a+b后可正常执行*
又偷偷跑去看了yatcpu内部的代码,里面的ALU好像也没有M型指令的支持
Beta Was this translation helpful? Give feedback.
All reactions