Thanks, this is all very interesting.
I'm going down the path of embedding a RISC-V into a PolarFire FPGA. So far it is not at all clear where the binary from the compiler gets stored.
If you have an external SPI flash connected to the correct pins of the Polarfire FPGA and plan to use internal RAM blocks to hold the binary, you can configure the system controller inside the FPGA to automatically load data from the SPI into the RAM blocks during device initialization. Just make sure to use the init monitor component to hold the CPU in reset until the transfer is done. That's the easiest way of doing it, and as the SPI flash is a separate step in Libero you won't need to recompile the project each time you want to change the software.
If you plan to use an external RAM to hold the binary, you will have to use a bootloader in a small internal RAM first that will copy the binary into the external RAM and then jump to it.
The silly boards I bought actually have "all of the above." (Future Avalanche.) It's just the usual thing: a new architecture and a new set of tools and examples that work but are not well documented. But what you said -- "make sure to use the init monitor component" -- is REALLY helpful, because it wasn't clear why I needed that! (It's in the examples.) It's been a few days of wading through documentation.
The simple "Hello, World!" example put the RISC-V firmware into sNVM and the startup logic copies that into LSRAM. I suppose the interesting thing to do would be to store the firmware image in the SPI Flash and then have it copy it into external DDR3 SDRAM. And then work out how to update the firmware in SPI Flash without having to rebuild the FPGA.
My main interest is the multi-gigabit transceivers, and for purposes of sending and receiving data over the serial link, using a processor core makes sense. Right now I'm not interested in blazing speed, just the ability to verify that the links work. A gigabit data rate works out to be 50 MHz parallel rate in the fabric, which is easy.
The other piece of the puzzle is interfacing to a sensor with multiple serial DDR data outputs. That can be handled by a deserializer in each "regular" GPIO -- HSIO is apparently for the DDR memory interfaces -- which is nice. Of course the sensor has a 12-bit data word and the deserializer in the input ring doesn't do 12 bits, or 6 bits, so I worked out doing it four bits at a time and re-assembling the words in the fabric. And while I was working on that, I realized that the "regular" GPIO has a 10:1 serializer and 1:10 deserializer
with clock and data recovery, which is perfect for replacing an external chip we've been using for that. Just add 8b/10b coder and 10b/8b decoder!
And at some point I'll have to spin a board for the actual product.