New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multicore configurations #85
Comments
As far i know there would be the change required :
Basicaly, there is a list of things to do on VexRiscv to improve various things:
Currently i'm slamed by third party obligations, but in march i should have much more free time too move things forward. |
Would you mind elaborating on the use-case for SMP @mithro? My gut feeling is that SMP support would be impressive, but not that useful. There are more straightforward ways to boost performance that benefit a wide range of uses, not just SMP-aware operating systems. For example, increasing the width of cache busses, as @Dolu1990 has already mentioned. I see CPUs on FPGAs as providing control and performing high-complexity operations, such as division and square root. If you’re doing something parallel and performance-critical, you can do it in a co-processor or separate logic block, without complicating the core VexRiscv design. If there is going to be a substantial addition of functionality, then I think an FPU is more desirable than additional integer cores. Another approach is to place multiple VexRiscv cores on one FPGA and link them with a bus. Such a design wouldn’t “just work” in Linux, but would allow custom designs to perform more CPU operations in parallel if required. A big part of what makes VexRiscv unique is its clean, elegant design. I’d hate to lose that. |
I'm currently crushed by none SpinalHDL/VexRiscv obligations :( @WillGreen @mithro Maybe SMP would be possible in some kind of FPGA friendly / clean way :
To negotiate line state, there would be 2 channels between each CPU and the directory : Channel 1
Channel 2
Channel 1 should have priority over channel 2 Then all data transaction would still be done by the same bus as actualy. This would allow to bring the system on all sort of memory system without specific requirements. That's just my current unrefined idea of how SMP could be done, but i'm not expert in that field XD |
Another solution would be more AXI ACE like with 3 channel : Channel 1 (write) :
Channel 2 (read / reserve) :
Channel 3 (probe) :
which would result into 3 steam with address, 2 stream with data. |
A variation of the above proposal could be that a CPU cache could react to a probe request by the following ways :
|
There is a draft of a coherent interface spec |
Quite some progress here. dev branch : Basicaly, the aim is to implement write-through invalidate coherency protocole for the CPU L1 d$.
Currently, all the CPU side stuff is implemented LR/SC are now using the memory bus "exclusive" feature, something similar to the AXI4 one, while AMO are emulated in the CPU hardware using those same LR/SC memory bus request. Synthesis look good, as FMax is only 5% lower (without any time used to improve that), and the LUT occupancy is 2 % higher. The only requirements for the interconnect are to implement eclusive accesses and to propagate write request as invalidation request to the other CPU. |
It would be good to support VexRISCV in multicore configurations.
With the low resource usage of VexRISCV, supporting 2 or 4 core complexes on cheap boards would be very possible. We can then use it at litex-hub/linux-on-litex-vexriscv#47
As VexRISCV now being used to run Linux, SMP support would hopefully improve performance.
@SpinalHDL / @Dolu1990 - What would be needed to make this happen? I assume a bunch of stuff around atomics and cache coherence?
The text was updated successfully, but these errors were encountered: