Add initital H extension support (Without Full AIA support)#120
Add initital H extension support (Without Full AIA support)#120inochisa wants to merge 96 commits into
Conversation
e377e14 to
6fba459
Compare
d980e58 to
831055e
Compare
a51f9e8 to
acf2678
Compare
26722f4 to
263a799
Compare
|
The impact of this PR (1 core with PLIC) Compile options: LUTsThis are compiled on XCKU5P
PerformanceCoremark:
It seems like about 10% performance from this PR with H extension enabled , and this mainly comes from a new pipeline stage in both LSU and Fetch. Edit: The performance impact on S mode is removed by only inserting the stage-2 translation with extension enabled. |
|
Hi, @Dolu1990 Currently, I think this PR is worth to review now. At least It can boot Linux and run a simple bare KVM program (I still try to setup an rootfs so the Qemu can be used to boot a linux in KVM mode). It may still have some small bugs but there should be no big change anymore. |
|
Hi, gg ^^ For the performance, my guess is that in a ASIC it would be totaly fine to chain both mmu translation in a single cycle. So FPGA degradation only. Two things i can see :
That way we can run the regressions tests for configs which have H support ^^ |
|
Note, coremark is quite sensitive to LSU latency, as it does quite a bit of linked list pointer chassing. |
Yes, it is hard coded now. However, for non-H mode build, the new stage could be emitted. As the
Yes, that's true. It is fine for me to add it.
Linux could be a problem, not for a synthesized core, but for the simulation. In fact, I managed to boot an mainline OpenSBI with the simulation. And it gave me a 1.1GB trace log and a 5.1 GB fst wave. XD And at least for now, my team are struggled to boot a linux with rootfs. Since my board has no SD card and I have to boot the kernel with ethernet.
My suggestion is adding a batch of unit tests like defermelowie/riscv-hext-asm-tests (And I just use this to test the implementation). So we can test all the spec requirements with both log and wave. (By this way, I think the spike for Vexiiriscv is too old to support H extension. XD) With lots of unit test are required, I think a small framework and some common code are needed to invoke the unit test automatically. Now I used |
|
And a good news, The kvm unit test has passed. |
|
Hi, @Dolu1990 , now we have linux in kvm virtual machine Command qemu-system-riscv64 \
-nographic --enable-kvm -machine virt \
-m 512M -smp cpus=1 -cpu host \
-kernel /root/Image \
-initrd /root/initramfs.cpio \
-append "console=ttyS0,115200n8 earlycon ignore_loglevel"Boot log |
|
I have add a simple doc for this implementation at SpinalHDL/VexiiRiscv-RTD#14 |
|
Hi @inochisa ,
Right ^^ Else in general, not using --with-wave at all (and without others similar options aswell)
How big is the kernel binary and rootfs ?
Why not :)
Did you tried merging upstream ?
So far, in vexii, RegressionSingle does that. but it isn't a very nice code base XD
Nice ^^
So, to be sure i understand :
Thanks :D |
|
Hi @Dolu1990,
That's a good news. And after the test for a synthesized core. If there is already a way to boot OpenSBI and linux without hypervisor. It can also boot the linux with H extension, just set KVM is y. And I guess you already has a for it?
Oh, We have boot with another board with SD card. And we have a pretty big Image and rootfs. Because all the thing are build from upsteam (Linux is build from the defconfig and the initramfs is build from a full-featured buildroot rootfs (about 45Mib without compress))
Good, I will try to add it. But it will be a long fight XD.
The last time I have tried to upgrade is a bad time. Too many compile error when upgrading the spike to the master. The spike is bad for not giving a new release for a long time, which make me hard to figure out the change that breaks API....
I will take a look. Thanks.
Right. And all the softwares (linux, OpenSBI, rootfs) are using upstream version without any changes
|
Ahhh nice ^^
has a (?) for it ? (i don't understand :D)
In case, let me know, there is maybe some change i did which can be reverted. In particular, the one related to the MMU.
GG :D :D |
I just use the upstream buildroot. And it seems like no change is needed XD.
has a working Linux with the way of simulation you have mentioned (without hypervisor enabled).
Great, I will take a look for it.
|
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Longbin Li <looong.bin@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Longbin Li <looong.bin@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
|
A small update for hypervisor Zicbom support. |
|
@Dolu1990 And I guess it could be better to use a real CLINT or PLIC for the TestBench? |
…lugin Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
|
Hi,
Ahhh the idea was to keep the testbench as light as possible and to emulate everything around. Or else, putting in place a little simulation SoC. |
I agree. This is necessary to make the simulation fast.
Yeah, at least for now I think nothing needed. I have misunderstand the requirement for the "riscv-arch-test", and in fact it does not require a real PLIC/CLINT. Anyway, I am kind of upset as no hypervisor support for it. (I have told someone is doing this at the last RISC-V sig-hypervisor meeting, but I am sure it will be a long story to finish it XD) |
Add basic support for H extension.
This PR includes the following part:
This PR does not include:
G-stage MMU support.Edit:
20260316: Add G-stage MMU support