r/RISCV • • 8h ago

Librem 5 v2 (RISC-V phone) switches to SpacemiT K3

23 Upvotes

Previously mentioned here: https://www.reddit.com/r/RISCV/comments/1xwssay/crowdfunding_purism_librem_5_v2_riscv_spacemit_k1/

A new post says they will switch to K3: https://puri.sm/posts/purism-to-bring-risc-v-k3-to-the-librem-5-v2-at-no-additional-cost/

"On battery, mobile mode will use four CPU cores, prioritizing efficient everyday operation. When docked, desktop mode will make all eight CPU cores available, providing additional processing capacity for a larger-screen, desktop-style experience."


r/RISCV • • 16h ago

Standards The Branch with Immediate (Zibi) Extension Ratified and Merged into the Manual

Thumbnail
github.com
13 Upvotes

The extension adds two instructions, BEQI and BNEI. They compare a register with a small immediate value and branch if condition is met. They can replace a sequence of LI and BEQ / BNE with one less live register, which means less register spill and reload. Immediate value 0 represents -1, as you can always compare with zero using the x0 register without the LI instruction.


r/RISCV • • 13h ago

Hardware Running RV32IMA Linux 6.6 (Sv32 MMU) on a 20K-LUT Gowin FPGA over a single USB-C cable with a pure-Verilog USB Ethernet NIC

10 Upvotes

GitHub: https://github.com/potats0/gw2a-riscv-linux-soc

I got a full RISC-V Linux 6.6 SoC running on a low-cost Gowin GW2A-LV18 (20K LUT) FPGA board (Lichuang LogicPi FPGA-G1), booting to a persistent ext4 rootfs and SSH shell over a single USB Type-C cable (power + networking, debugger unplugged).

To be completely upfront: Gemini did a lot of the work for me on this project. I have no prior hardware or Verilog background, and

Gemini wrote most of the SoC RTL, the pure-Verilog USB 1.1 PHY and CDC-ECM virtual NIC, the Linux kernel drivers, timing constraints, and build scripts. My job was setting the goals, wiring and flashing the board, running real-hardware tests, and iterating through bugs together until it ran stably on physical silicon.

RISC-V & SoC Architecture:

  • -CPU Core: VexRiscv RV32IMA + Sv32 MMU + zicntr hardware rdtime @ 60 MHz (actual Fmax 71.22 MHz, 0 ns TNS)
  • L1 Caches: 8 KiB 2-way VIPT I-Cache + 8 KiB 2-way VIPT D-Cache (64B lines, 16-word Wishbone bursts)
  • Boot & Interrupts: Custom RV32 BootROM -> OpenSBI v1.5.1 -> Linux 6.6.63, standard CLINT (1 MHz mtime) and PLIC (7 IRQ sources)
  • Memory & Storage: 256 MiB DDR3 (using Gowin's DDR3 IP), 8 MiB W25Q64 SPI Flash, persistent ext4 rootfs on MicroSD via an onboard GD32F303 4 KiB batched SPI bridge
  • Single-Cable USB NIC: Pure-Verilog USB 1.1 Full-Speed soft PHY (48 MHz 4x oversampling DPLL, NRZI, bit-stuffing) + hardware

auto-enumerating CDC-ECM Ethernet controller over just 3 regular GPIO pins (D+, D-, 1.5k pull-up), recognized driverlessly on Linux/macOS via mainline cdc_ether

Real-Hardware Results:

  • Cold boot to persistent ext4 shell: 7.49 s (Run /init at 5.24 s)
  • USB Virtual NIC: ~4.18 ms ping RTT, 0% packet loss, Dropbear 2024.86 SSH/SCP (Ed25519)
  • DDR3 + Cache stress test: >100 MiB continuous random MD5 verification, 0 bit flips, 0 kernel warnings
  • GW2A-LV18 Utilization: 51% LUT (10,548 / 20,736), 45% FF (7,195 / 16,173), 37 / 46 BSRAM (81%), 4 / 24 DSP, 3 / 4 rPLL

Everything except the Gowin DDR3 memory controller IP is open source (MIT for RTL/firmware/scripts, GPL-2.0 for the Linux drivers), including Verilator testbenches for both the SoC and the USB CDC-ECM unit.

With ~49% of the LUTs, 9 BSRAMs, and 1 rPLL still free, I'm considering trying dual-core SMP Linux (VexRiscvLitexSmpCluster_Cc2 with 4K+4K caches) next. Feedback, critiques, or RTL tips are very welcome!


r/RISCV • • 7h ago

Standards RISC-V ELF psABI 2.0 rc1 Released

Thumbnail
github.com
6 Upvotes

It adds the big endian and RV64ILP32 ABI variants, vector register calling convention, some clarification in calling convention, additional rules in C++ name mangling, new and updated relocation, etc.

Existing (psABI 1.0) binary is basically psABI 2.0-compatible, though the removal of RVC_LUI and the change of GOT_HI20 offset calculation may affect.