260 TinyQV SoC (Dual Memory Backend)

260 : TinyQV SoC (Dual Memory Backend)

Design render

TinyQV SoC (Dual Memory Backend)

A TinyQV RV32EC microcontroller with two memory backends selected by a reset strap: Quad-SPI Flash/PSRAM via a QSPI PMOD, or single-SPI RAM emulated on an RP2040 (spi-ram-emu, 23LC512 protocol). System clock 64 MHz. Occupies a 3x2 tile.

How it works

CPU

TinyQV is a 4-bit-serial RV32EC core (M-mode only) with Zcb/Zicond, a 32x16-bit multiplier (mul16), multi-word load/store (lw2/lw4, sw2/sw4/sw4n), and basic trap/interrupt support (trap vector 0x4, interrupt vector 0x8). gp is hardwired to 0x01000400, tp to 0x80000000 for fast access to RAM data and peripheral registers. TIME ticks in microseconds at 64 MHz.

Dual memory backend

ui_in[0] sampled during reset selects the backend (uo_out[1] mirrors the sampled value):

ui_in[0] Mode Backend
0 (default) Single-SPI RP2040 spi-ram-emu (23LC512: 0x03 read, 0x02 write)
1 QSPI PMOD W25Q128 Flash (continuous read) + 2x APS6404 PSRAM (QPI)

Single-SPI mode runs the bus at 8 MHz (within the emulator's 12.5–15.6 MHz ceiling) and maps the 25-bit CPU address into the emulator's 64 KB as {addr[24], addr[14:0]}: instruction fetch lands in the lower 32 KB (0x0000-0x7FFF), RAM data (e.g. via gp) in the upper 32 KB (0x8000-0xFFFF, so gp = 0x8400). A 48-cycle CS-high cooldown between transactions gives the RP2040 PIO time to re-arm. QSPI mode uses the untouched upstream controller (32 MHz bus): Flash must already be in continuous-read mode (mode bits 0xA0), PSRAM in QPI mode; code executes from Flash only.

Address map
Range Target
0x0000000-0x0FFFFFF Flash (QSPI) / code window (SPI-emu low 32 KB)
0x1000000-0x17FFFFF RAM A (QSPI) / data window (SPI-emu 0x8000-0xFFFF)
0x1800000-0x1FFFFFF RAM B (QSPI)
0x8000000 GPIO output register
0x8000010 UART TX data (write byte to send; read returns busy flag)
Pinout
Pin Function
ui[0] Backend strap (0 = SPI-emu, 1 = QSPI)
ui[1:2] Spare
ui[3:6] External interrupts irq[0:3]
ui[7] Timer interrupt
uo[0] UART TX (115200 baud)
uo[1] Sampled strap mode
uo[2:7] GPIO output bits
uio[0] CS0 (Flash CS / SPI CS)
uio[1] SD0 / MOSI
uio[2] SD1 / MISO
uio[3] SCK
uio[4] SD2 (QSPI only)
uio[5] SD3 (QSPI only)
uio[6] CS1 (RAM A, QSPI only)
uio[7] CS2 (RAM B, QSPI only)

How to test

RTL simulation (Icarus + cocotb):

cd test && make clean && make        # 2 tests, gate: no <failure> in results.xml
GATES=yes make                        # functional gate-level sim on the hardened netlist

test_spi_ram_emu_mode boots the CPU against a cycle-accurate 23LC512 model (including the CS-recovery check), runs addi/sw/lw/sw/jal, and asserts 0x42 reaches both SPI RAM (0x8400) and the GPIO pins. test_qspi_pmod_mode boots the QSPI backend against Flash/PSRAM models and asserts 0x55 reaches GPIO. Both run at the true 64 MHz tapeout clock. Hardening (LibreLane 3.0.5, IHP SG13G2): ./tt/tt_tool.py --create-user-config --ihp, then --harden --ihp. Timing closes with +3.02 ns setup / +0.11 ns hold slack; LVS/DRC/antenna clean.

External hardware

  • QSPI PMOD (mole99 design): W25Q128JVSIQ 16 MB Flash + 2x APS6404L-3SQR-SN 8 MB PSRAM, wired per the uio table above.
  • RP2040 board running spi-ram-emu for single-SPI mode (4 wires: CS/MOSI/MISO/SCK to uio[0:3]), plus a USB-UART tap on uo[0] for console output.

Post-tapeout bring-up (pending tasks)

  • [ ] RP2040 emulator firmware: fork spi-ram-emu to preload the RISC-V binary into emu_ram[0..0x7FFF] (code window) before calling setup_simulated_sram(); hold the TinyQV board in reset until the preload is done, then release. Demo programs must fit 32 KB code with data addressed via gp in the upper 32 KB.
  • [ ] RP2040 wiring/clock: connect CS/MOSI/MISO/SCK to uio[0:3], tie ui_in[0] low, confirm the SPI clock stays within the emulator's ceiling (RTL divides to 8 MHz at 64 MHz system clock; the 48-cycle CS cooldown is already enforced in RTL).
  • [ ] QSPI PMOD provisioning: pre-program the Flash image AND its continuous-read mode bits (0xA0) before power-on (TinyQV cannot enter the mode itself); issue the PSRAM QPI-mode entry sequence at board power-up; tie ui_in[0] high.
  • [ ] Board console: 115200 baud tap on uo[0]; GPIO observation on uo_out[7:2]; verify the uo_out[1] strap indicator matches the intended backend before debugging anything else.

IO

#InputOutputBidirectional
0strap_mode (0=SPI emu, 1=QSPI PMOD)uart_txCS0 / SPI_CS
1sparestrap_mode_outSD0 / MOSI
2sparegpio[2]SD1 / MISO
3irq[0]gpio[3]SCK
4irq[1]gpio[4]SD2
5irq[2]gpio[5]SD3
6irq[3]gpio[6]CS1 (RAM A)
7timer_irqgpio[7]CS2 (RAM B)

Chip location

Controller Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Analog Mux Mux Mux Mux Mux Mux Mux Mux tt_um_chip_rom (Chip ROM) tt_um_factory_test (Tiny Tapeout Factory Test) tt_um_ieee_LDO (LDO) tt_um_chip_ieee_analog (IEEE Bandgap Reference) tt_um_snn_voice_calculator_mauro_ciccone (snn-voice-calculator) tt_um_hx2003_delay (4 Channel - 32 Tap Programmable Delay with Delay Locked Loop Calibration) tt_um_adxl362_test (tt_um_adxl362_test) tt_um_larsnit_cfar (1D CA/GO/SO CFAR radar detector) tt_um_abeccari_swsynth (Sine Wave Synthesizer) tt_um_dpi_adexp (AdExp DPI Neuron ) tt_um_140oo041_fpu130 (FPU-130) tt_um_blonghi_uart (uart) tt_um_directsgg_mini_proceo_8bit (Mini 8-bit Processor) tt_um_umaece1982_lfsr (Low-Power LFSR-Based Test Pattern Generator) tt_um_deploy_timer (launch deployment timer) tt_um_urish_simon (Simon Says memory game) tt_um_nimelli_kinematic_wave_engine (Kinematic Wave Engine) tt_um_multi_seg_monitor (Multi Segment Monitor) tt_um_UART_TX (project) tt_um_crc8_lfsr (CRC-8 Serial LFSR) tt_um_tinynpu4 (TinyNPU4) tt_um_alu_bns (6-bit multi function ALU ( eldawly_V2) ) tt_um_echoworld424_tpv (Timing-Prediction Test Vehicle) tt_um_gyro_lockin (Laser Gyro Lock-in Readout Core) tt_um_josue_olivos_sar_adc (4-Bit Charge-Redistribution SAR ADC Controller) tt_um_flower (VGA Flower) tt_um_vperumal_l1_fabric (Scalable Banked L1 Memory Fabric for Edge AI) tt_um_preinception_top (Preinception: Simple Compute Accelerator) tt_um_italu (iTALU: Interactive Testable Arithmetic Logic Unit) tt_um_neuron (4-Input Signed Neuron / Perceptron) tt_um_4tap_mac (4-Tap Signed MAC Unit) tt_um_mac_engine (DSP MAC Engine) tt_um_crypto_led_demo (QAMER CryptoUART: Encrypted UART with LED Status) tt_um_layernorm (LayerNorm) tt_um_ez130_8t_mystery (EZ130 8T Mystery Circuit) tt_um_sent2spi (SENT Receiver with SPI Interface) tt_um_llr_hepiarisc (Hepiarisc with SPI flash) tt_um_rebeccargb_vga_pride (VGA Pride) tt_um_hasi_ising (Oscillator Ising Machine) tt_um_c061618g2 (Circuitli C061618G2) tt_um_tiny_dram_pim (Tiny Dual-Channel DRAM-PIM Controller + PU) tt_um_Tbilisi_CORDIC_Engine (Tbilisi CORDIC Engine) tt_um_rahulmascarenhas_folded_nn (Frozen ternary backbone + loadable head) tt_um_miniMAC (miniMAC_IHP26b) tt_um_rumcajs (IEEE DOORSH) tt_um_sg13g2_mystery (SG13G2 Mystery Circuit) tt_um_ULSR88 (ULSR demo) tt_um_ez130_7t_mystery (EZ130 7T Mystery Circuit) tt_um_tinyopt4 (ieee_tt_tinyopt4) tt_um_vga_example (IEEE VGA Animated Beach) tt_um_hyphen133_drone_detection (IEEE Acoustic Drone Detector) tt_um_nuatlabs_fifo_pwm (Async FIFO with CDC + PWM Peripheral) tt_um_nuatlabs_uart (8N1 UART Transceiver) tt_um_eeg_threshold_detector (IEEE Digital EEG Threshold Event Detector) tt_um_smart_traffic (Smart Traffic Light Controller) tt_um_94442024_mini_cpu (Mini 8-bit Accumulator CPU) tt_um_wokwi_475369131246576641 (IEEE_UPB_TT_1) tt_um_aion (AION) tt_um_rebeccargb_hardware_utf8 (Hardware UTF Encoder/Decoder) tt_um_rebeccargb_universal_decoder (Universal Binary to Segment Decoder) tt_um_rebeccargb_intercal_alu (INTERCAL ALU) tt_um_flappy_bird (IEEE Flappy Bird VGA Game) tt_um_oryan01_alu (ALU CASS PUCV) tt_um_S4xU4 (S4xU4) tt_um_vga_ca (Space CA) tt_um_llr_simplenpu (simple SPI flash streaming NPU) tt_um_pucv_pspwm (3LFCC PS-PWM Modulator) tt_um_yuri_fpga (Tiny FPGA) tt_um_mikailgedik_inverted_inverters (Inverted inverters) tt_um_esauqch_hamming74 (Hamming(7,4) encoder/decoder (IEEE)) tt_um_hackin7_analog_experiments (TinyAnalogExperiments) tt_um_snake (snake game) tt_um_mini_kraken (Kraken IO Subprocessor) tt_um_fabien_pio (AstraPIO) tt_um_chiplab (ChipLab) tt_um_wokwi_475490677474407425 (Tiny_Divider) tt_um_c061618g2tr (Circuitli C061618G2TR) tt_um_catalinlazar_nanopio (nanoPIO) tt_um_catalinlazar_uart_spi_i2c_bridge (UART-SPI-I2C Bridge) tt_um_enzonappi_sent_i2c (SENT to I2C bridge) tt_um_kush1434_proof (Proof) tt_um_schwallsunk_signal_discriminator (Highspeed voltage discriminator) tt_um_tiarinix_ttihp_verilog_template (8-bit educational SAP-style CPU) tt_um_vga_glyph_mode (BOOTCAMP) tt_um_GiulioGirelli_packet_processor (Configurable Low-Latency Match-Action Packet Processor) tt_um_vga_tictactoe (Tic Tac Toe) tt_um_vga_dvd_player (DVD player) tt_um_clea_katseye_rain (KATSEYE) tt_um_romd_uart_hello (UART Hello World) tt_um_vga_snake (CDM PYTHON GAME) tt_um_vga_slot_machine (tt_um_vga_slot_machine) tt_um_jet_seq8b (SEQ8 Programmable Sequencer) tt_um_kibo_leak_inspect (KIBO Leak-Inspection Target Controller (VGA)) tt_um_endless_runner (Endless Runner) tt_um_omega_infinity_kaoru (OMEGA INFINITY KAORU 3D Metal Grid Processor) tt_um_nikleberg_mixer (Mixer) tt_um_lahnb_sgdma (TinyDMA: A Descriptor-Based Dual-PSRAM Memory Mover) tt_um_gstj_lockin (Digital IQ Lock-in (IEEE)) tt_um_benpayne_ps2_decoder (PS/2 Keyboard Decoder for 68k) tt_um_cass_s_ui_neuron_lif (Neurona LIF con Aprendizaje STDP Dinamico (IEEE)) tt_um_vga_glyph_mode_CDM_Matrix (CDM Matrix) tt_um_qd39l_xor_stream (Fixed-ROM XOR Stream Engine) tt_um_conv3x3 (3x3 Clock Rate Streaming Input Convolution Engine) tt_um_mc14500b_soc_extended (MC14500B Extended 1-bit Microcontroller SoC) tt_um_vga_hypno_spiral (tt_um_vga_hypno_spiral) tt_um_mattizen_morse_tree (Morse Tree LED Decoder) tt_um_CDM (Colegio de Muntinlupa DVD-like Display) tt_um_romd_uart_loader (UART SPI RAM Loader) tt_um_TscherterJunior_stapel_geraet (stapel gerät) tt_um_das2225_dna_accel (DNA_Accel) tt_um_tinysoc (TinySoC) tt_um_barrel_shifter (Barrel Shifter) tt_um_approx_mac_coprocessor (Approximate DSP: Time-Multiplexed MAC Coprocessor) tt_um_joesagents_market_split_oracle (Market-split oracle) tt_um_mgpauly1458_ringmeter (Ring oscillator frequency meter) tt_um_pettit_prism_lite (PRISM with Risc-V (TinyQV) SoC) tt_um_workshop_cpu (IEEE Workshop Simple CPU) tt_um_algofoogle_analog_junk (Simple comparator + 2 DACs analog layout in a 1x1 tile) tt_um_lkhanh_cordic (TinyQV SoC (Dual Memory Backend)) tt_um_4x4npu (4x4NPU: Dual-Lane INT4 Neural Accelerator) tt_um_abiaselli_izh_bridge_3x2 (Izhikevich event bridge (4 contexts)) tt_um_fabulous_ihp_26b (Tiny FABulous FPGA) tt_um_zanderivo_voronoi (Four-Metric VGA Nearest-Prototype Visualizer)