Hello,
I hope you are doing well.
I was reading about the Pi Pico 2, specifically the Hazard3 RISC-V core developed by Luke Wren, which essentially provided all the FPGA code for running it on at least two different hardware platforms.
My question is, let’s say you are able to magically replicate it on an iCEBreaker and run the RP2350 RISC-V core there, would it be possible to run uLisp on it and interact with a REPL directly on the FPGA? If so, what would be the compilation process? I dont see any mention to arduino there.
Checking the PDF documentation from the official repository, I found this:
Example C macro (using GCC statement expressions):
// nbits must be a constant expression
#define __h3_bextm(nbits, rs1, rs2) ({
uint32_t __h3_bextm_rd;
asm (".insn r 0x0b, 0, %3, %0, %1, %2"
: “=r” (__h3_bextm_rd)
42
: “r” (rs1), “r” (rs2), “i” ((((nbits) - 1) & 0x7) << 1)
);
__h3_bextm_rd;
})
…
Example assembly macro:
// rd = (rs1 >> rs2[4:0]) & ~(-1 << nbits)
.macro h3.bextm rd rs1 rs2 nbits
.if (\nbits < 1) || (\nbits > 8)
.err
.endif
#if NO_HAZARD3_CUSTOM
srl \rd, \rs1, \rs2
andi \rd, \rd, ((1 << \nbits) - 1)
#else
.insn r 0x0b, 0x0, (((\nbits - 1) & 0x7 ) << 1), \rd, \rs1, \rs2
#endif
.endm
Best Regards!