I noticed that the PicoSOC includes some examples for iCE40-HX8K Breakout and ICEBreaker, but unfortunately not TinyFPGA. While Luke has kindly provided an example in his repository, it can only blink an LED, which is a little trivial to me. I would like to play with a full-blown example like those for HX8K and ICEBreaker, whose firmware is much more sophisticated (you can do things like benchmarking the SPI, which is kinda cool).
I have made some progress toward this goal. See: https://github.com/nalzok/picorv32. You can try it out by
cd picosoc make tinysim # simulation make tinyprog # flashing
It was not hard to port the vanilla PicoSOC to TinyFPGA-BX, with the serial port placed on two GPIOs:
A2, but I want to talk to it via the micro USB port, so I am trying to adapt the famous tinyfpga_bx_usbserial repository to my purpose. There were some timing/place-and-route problems, which are resolved by switching from
nextpnr. Now, I have added the serial echo-back demo to PicoSOC on TinyFPGA-BX. However, I have no idea how to utilize the
usb_uart module to translate the serial signals
ser_rx to the USB signals
pin_usbn. I was expecting an “adapter” module sitting between these two signals and magically translate USB to serial and vice versa, just like an FTDI chip, but we don’t seem to have such modules.