ChrysaLisp icon indicating copy to clipboard operation
ChrysaLisp copied to clipboard

RISC-V backend

Open BananaEarwig opened this issue 4 years ago • 3 comments

Hi again, For another side project I'm going to be working on implementing a RISC-V compliant CPU and I thought as an additional test an for general fun and games, getting ChrysaLisp running on it would be a very interesting experiment.

So, …. where should I start looking in order to add another backend.

Thanks, Martyn

BananaEarwig avatar Dec 05 '19 20:12 BananaEarwig

First place to start would be the looking at the sys/arm.inc file. Copy that to a sys/riscv.inc and use it as a template for the RISC V.

Another question is we need 64bit RISC V unless there will be a lot of issues to address ! Was your fpga going to be 64bit ?

Create a riscv branch too for this to go in while it being worked on.

Would you be planning on having Linux or such on the fpga ? Or bare metal with ChrysaLisp direct on top ?

Chris

vygr avatar Dec 05 '19 22:12 vygr

The original plan was for 32bit but eventually 64 bit was planned so its just a slight reordering. Initially bare metal as I dont want to add the other things that a linux kernel needs from the getgo.

TheMartynBliss avatar Dec 06 '19 07:12 TheMartynBliss

Yeah, 32bit does bring a lot of issue we can skip by having 64bit registers.

So eventually we will have to face the prospect of doing something with the main.c host interface for your FPGA. I'd say we first of all just go for getting the TUI stuff working after your happy with the RISC V backends code output.

vygr avatar Dec 06 '19 17:12 vygr

Happy to say this is now done. :)

vygr avatar Feb 18 '23 13:02 vygr