
TinyQV is a small Risc-V SoC, implementing the RV32EC instruction set plus the Zcb and Zicond extensions, with a couple of caveats:
Instructions are read using QSPI from Flash, and a QSPI PSRAM is used for memory. The QSPI clock and data lines are shared between the flash and the RAM, so only one can be accessed simultaneously.
Code can only be executed from flash. Data can be read from flash and RAM, and written to RAM.
This version of the SoC is designed to integrate with many user peripherals.
| Address range | Device |
|---|---|
| 0x0000000 - 0x0FFFFFF | Flash |
| 0x1000000 - 0x17FFFFF | RAM A |
| 0x1800000 - 0x1FFFFFF | RAM B |
| 0x8000000 - 0x8000033 | DEBUG |
| 0x8000034 - 0x800003B | TIME |
| 0x8000040 - 0x800007F | GPIO |
| 0x8000080 - 0x80000FF | UART (user peripherals 0-1) |
| 0x8000100 - 0x80003FF | User peripherals 2-13 |
| 0x8000400 - 0x80004FF | Simple user peripherals 0-15 |
| Register | Address | Description |
|---|---|---|
| SEL | 0x800000C (R/W) | Bits 6-7 enable peripheral output on the corresponding bit on out6-7, otherwise out6-7 is used for debug. |
| DEBUG_UART_DATA | 0x8000018 (W) | Transmits the byte on the debug UART |
| STATUS | 0x800001C (R) | Bit 0 indicates whether the debug UART TX is busy, bytes should not be written to the data register while this bit is set. |
See also debug docs
| Register | Address | Description |
|---|---|---|
| MTIME | 0x8000034 (RW) | Get/set the 1MHz time count |
| MTIMECMP | 0x8000038 (RW) | Get/set the time to trigger the timer interrupt |
| Register | Address | Description |
|---|---|---|
| OUT | 0x8000040 (RW) | Control for out0-7 if the GPIO peripheral is selected |
| IN | 0x8000044 (R) | Reads the current state of in0-7 |
| FUNC_SEL | 0x8000060 - 0x800007F | Function select for out0-7 |
| Function Select | Peripheral |
|---|---|
| 0 | Disabled |
| 1 | GPIO |
| 2 | UART TX |
| 3 | UART RX |
| 4 - 15 | User peripheral 2-13 |
| 16 | Edge counter |
| 17 - 31 | Simple user peripheral 1-15 |
| Register | Address | Description |
|---|---|---|
| TX_DATA | 0x8000080 (W) | Transmits the byte on the UART |
| TX_BUSY | 0x8000084 (R) | Bit 0 indicates whether the UART TX is busy, bytes should not be written to the data register while this bit is set. |
| RX_DATA | 0x80000C0 (R) | Reads any received byte |
| RX_STATUS | 0x80000C4 (R) | Bit 0 indicates whether a received byte is available to be read. |
The edge counter is simple peripheral 0, with base address 0x8000400.
Load an image into flash and then select the design.
Reset the design as follows:
Based on the observed latencies from tt06 testing, at the target 64MHz clock a read latency of 2 is required. The maximum supported latency is currently 3.
The above should all be handled by some MicroPython scripts for the RP2040 on the TT demo PC.
Build programs using the riscv32-unknown-elf toolchain and the tinyQV-sdk, some examples are here.
The design is intended to be used with this QSPI PMOD on the bidirectional PMOD. This has a 16MB flash and 2 8MB RAMs.
The UART is on the correct pins to be used with the hardware UART on the RP2040 on the demo board.
The SPI controller is intended to make it easy to drive an ST7789 LCD display (more details to be added).
It may be useful to have buttons to use on the GPIO inputs.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Interrupt 0 | UART TX | Flash CS |
| 1 | Interrupt 1 | UART RTS | SD0 |
| 2 | SD1 | ||
| 3 | 1 MHz clock for time | SCK | |
| 4 | SD2 | ||
| 5 | SD3 | ||
| 6 | Debug UART TX | RAM A CS | |
| 7 | UART RX | Debug signal / PWM | RAM B CS / PWM |