addi r1, r1, 1 add r2, r1, r1 jalr r0, r0, 0
All it does is increment r1 and set r2 to r1*2 in a loop. Told you it was trivial.
It comes out as the following for anyone wanting to poke it into memory themselves. A RAM image of it is in the project files as well.
93 80 10 00 33 81 10 00 67 00 00 00I usually like the bit where you have to hand assemble your first few programs. Usually. It isn't so bad when you have variable length instructions, but setting the bits in a fixed length architecture is a real pain.
Time to either write an assembler or get the gnu riscv toolchain set up.