Wiznet makers

irina

Published July 27, 2026 ©

182 UCC

5 WCC

104 VAR

0 Contests

0 Followers

0 Following

Original Link

pComputer-A minimal Computer on FPGA

A from-scratch RISC-V "computer" on FPGA (CPU + OS + software). The W5500 is driven by a custom FPGA SPI master, mapped into MMIO for Ethernet.

COMPONENTS
PROJECT DESCRIPTION

저자 소개

pComputer는 regymm(Peter Gu, 핸들 ustcpetergu) 의 프로젝트입니다. 커스텀 RISC-V CPU·자작 OS·SoC 등 "밑바닥부터 만드는" 하드웨어를 즐기는 오픈소스 개발자로, 개인 블로그 "regymm's blog"(ustcpetergu.com)에서 제작 과정을 영어·중문으로 공유합니다. 오픈소스 FPGA 툴체인(예: ARM에서 Xilinx 7-시리즈용 OpenXC7 실행)에도 관심이 많아 상용 툴 의존을 줄이려는 지향을 보이며, 이는 pComputer의 "오픈소스 툴체인 지원" 로드맵과도 맞닿아 있습니다. 대표작으로 Linux 구동을 목표로 한 RISC-V SoC "quasiSoC"(pComputer의 후속·확장 성격, W5500 이더넷 모듈 공유)가 있습니다. (핸들의 "USTC"는 중국과학기술대학을 가리키는 것으로 보이나, 본인이 명시한 소속·경력은 확인된 범위가 제한적이라 단정하지 않습니다.)

프로젝트가 하는 일

pComputer는 이름 그대로 "밑바닥부터 만든 컴퓨터" 입니다. 시판 CPU를 쓰는 대신, RISC-V CPU를 직접 HDL로 설계하고 그 위에서 도는 OS와 소프트웨어까지 자작했습니다. 교육·연구 성격의 야심찬 개인 프로젝트예요.

  • pCPU: 직접 설계한 RISC-V RV32IM CPU (다중 사이클, 62.5MHz, M-mode CSR, 타이머·외부·소프트웨어 인터럽트, 예외 처리)
  • pseudOS: MMU 없는 마이크로커널 OS (멀티태스킹, IPC 송수신, SD카드에서 ELF 프로세스 로드, musl libc 동적 링킹)
  • 특징: MMU 없는 시스템에서 표준 PIE ELF를 동적 링킹하는 로더(로드 시 재배치·라이브러리 호출 패치) — No-MMU에서 표준 ELF를 쓰려는 시도
  • 이미 동작: MicroPython 포팅, CoreMark 실행, HDMI 문자 터미널·프레임버퍼(320×240 8-bit), PS/2 키보드, SD 부팅, UART(921600 baud) 로드

버스 구조: pCPU는 메모리 맵 IO(MMIO, 1 host·다중 guest) 로 주변장치를 연결합니다. GPIO·UART·SD(SPI)·PS/2·HDMI·CH375 USB·W5500이 모두 이 버스에 매핑된 주변장치입니다.

 

WIZnet이 들어가는 위치

이 자작 컴퓨터의 이더넷(네트워크) 주변장치W5500이며, README의 peripherals 목록에 구현 완료([x]) 로 표시돼 있습니다. 핵심은 외부 MCU 없이 FPGA(pCPU)가 직접 W5500과 통신한다는 점입니다.

  • RTL(w5500.v, 모듈 w5500_fdm): FPGA 내부에 커스텀 SPI 마스터를 두어 W5500을 구동합니다. FDM(Fixed Data Length Mode, 고정 데이터 길이 모드) 로 동작합니다.
  • 하드웨어 핀(모듈 포트): sclk(SPI 클럭) · scsn(칩셀렉트, active-low, FDM이라 0 고정) · mosi · miso · rstn(W5500 리셋, active-low) · intn(W5500 인터럽트 입력) · 내부 irq(CPU로 올리는 인터럽트). 실제 FPGA 물리핀 배정은 각 보드의 제약 파일(XDC/UCF)에 있습니다.
  • 버스(MMIO) 인터페이스: a(주소)·d(쓰기 데이터)·we(쓰기 enable)·spo(읽기 데이터). 소프트웨어가 레지스터 오프셋에 순서대로 써서 전송을 지시합니다 — 주소(16-bit) → 제어(8-bit: 블록선택5+R/W1+OP모드2) → 데이터 → 길이(1/2/4바이트) → 전송 시작. 읽기는 상태(IDLE 여부)·수신 데이터·intn 상태.
  • 리셋 타이밍 보장: 상태머신이 RST(>500us) → INIT(리셋 후 >1ms 대기) → IDLE → XFER 순으로 진행해, W5500 규격의 리셋·기동 시간을 하드웨어에서 맞춥니다.
  • 소프트웨어 드라이버(w5500.c/w5500.h): 위 MMIO 레지스터를 통해 W5500 레지스터·소켓을 제어합니다. RTL의 레지스터 맵과 1:1로 대응합니다.

즉 W5500은 이 자작 RISC-V 컴퓨터에 네트워크/인터넷 연결을 부여하는 이더넷 주변장치이며, 하드웨어 TCP/IP·8소켓·32KB 버퍼를 갖춘 칩을 FPGA가 직접 SPI로 제어합니다. 로드맵의 "Can browse the Internet(인터넷 브라우징)" 목표의 네트워크 토대가 바로 이 W5500입니다. (RGMII 이더넷·ESP8266 WiFi는 아직 계획 단계라, 현재 동작하는 네트워크 경로는 W5500입니다.)

구현 메모

  • 지원 보드: Zynq xc7z010(SqueakyBoard)·xc7z020(PYNQ-Z1, PMOD)·Kintex-7 xc7k325t·Spartan-6 xc6slx16 등. 오픈소스 툴체인(ECP5/ice40)·기타 RISC-V로 확장 계획.
  • 메모리: ESP-PSRAM64H를 메인 메모리로(QPI, 62.5MHz, 버스트 R/W), 직접 매핑 캐시 32KB(설정 가능).
  • 부팅: SD카드(raw)에서 부팅, 또는 UART(921600 baud)로 커널 로드.
  • W5500 RTL 라이선스: 파일 헤더에 GPL-3.0-or-later 명시(저자 Peter Gu). 저장소 전체 라이선스는 별도 확인 필요.

알려진 이슈 / 개발 단계

  • 개발 진행 중: 마이크로커널·동적 링킹·MicroPython·CoreMark는 동작하지만, 파일시스템·셸·(v)fork/exec·메모리 관리자·C 컴파일러 포팅 등은 로드맵상 미완성입니다.
  • 문서는 아직 준비 중("Documents: Not yet...").
  • 커밋 74·스타 5의 개인 교육 프로젝트. 최상위 LICENSE 파일이 안 보이므로 재사용 전 확인 필요(단, W5500 RTL은 GPL-3.0-or-later).

유사 프로젝트 (maker.wiznet.io)

FPGA에서 직접 설계한 CPU/로직으로 W5500을 구동하는, 성격이 가까운 글들입니다.

  1. ATARIX (irina)https://maker.wiznet.io/irina/projects/atarix/ W65C816S CPU + ECP5 FPGA + RP2350에 W5500으로 netboot/NTP 브링업. "자작 컴퓨터 + FPGA + W5500"이라는 성격이 가장 가깝습니다.
  2. FPGA + W5500 Control Unit (mark)https://maker.wiznet.io/mark/projects/fpga-w5500-control-unit/ Spartan-6 + W5500 중앙 제어. FPGA가 W5500을 직접 구동하는 구조가 유사.
  3. TCP/IP stack design based on FPGA and W5500 (WIZnet Makers)https://maker.wiznet.io/2019/04/26/tcp-ip-stack-design-based-on-fpga-and-embedded-ethernet-w5500/ FPGA가 W5500을 TCP/IP 서버로 구동하는 기본 예제. pComputer의 W5500 SPI 마스터 구현과 개념이 같음.
  4. FPGA Slow Control Interlock System / SCIS (irina)https://maker.wiznet.io/irina/projects/fpga-slow-control-interlock-system-scis/ FPGA가 W5500(SPI)을 구동해 UDP 데이터를 하드웨어로 처리. FPGA 중심 W5500 활용이라는 점에서 유사.
항목pComputerATARIXFPGA+W5500 Control UnitTCP/IP stack on FPGA
성격자작 RISC-V 컴퓨터(CPU+OS)자작 컴퓨터(816 CPU+FPGA)8채널 계측·제어W5500 TCP/IP 서버 예제
CPU/로직직접 설계 RV32IMW65C816S + ECP5Spartan-6 로직FPGA 로직
W5500FPGA 직접 SPI 마스터(MMIO)netboot/NTP중앙 제어 이더넷TCP/IP 서버
용도네트워크/인터넷 연결부팅·시각 동기계측·제어통신 기본

FAQ

Q: 이 프로젝트는 무엇인가요? A: FPGA 위에 RISC-V CPU와 OS, 소프트웨어까지 밑바닥부터 자작한 "컴퓨터"입니다. W5500으로 네트워크 기능을 갖췄습니다.

Q: W5500은 어떻게 쓰이나요? A: 외부 MCU 없이, FPGA 내부의 커스텀 SPI 마스터(w5500_fdm)가 W5500을 직접 구동합니다. CPU의 MMIO 버스에 매핑돼 소프트웨어 드라이버가 제어합니다.

Q: 어떤 핀을 쓰나요? A: SPI의 sclk·scsn·mosi·miso와, 리셋(rstn)·인터럽트(intn) 신호입니다. 실제 물리핀 배정은 보드별 제약 파일에서 정합니다.

Q: 완성된 컴퓨터인가요? A: 아직 개발 중입니다. CPU·마이크로커널·동적 링킹은 동작하지만 파일시스템·셸 등은 로드맵에 남아 있습니다.


About the Author

pComputer is a project by regymm (Peter Gu, handle ustcpetergu) — an open-source developer who enjoys building hardware "from scratch": custom RISC-V CPUs, hand-written operating systems, and full SoCs. He shares his build process (in English and Chinese) on his personal "regymm's blog" (ustcpetergu.com). He's also keen on open-source FPGA toolchains (e.g., running OpenXC7 for Xilinx 7-series on ARM), reflecting a preference to reduce reliance on proprietary tools — which aligns with pComputer's "open-source toolchain support" roadmap. His flagship work is quasiSoC, a RISC-V SoC aiming to run Linux (a successor/expansion of pComputer that shares the same W5500 Ethernet module). (The "USTC" in his handle appears to refer to the University of Science and Technology of China, but his stated affiliation/background is only limited-confirmable, so this isn't asserted as fact.)

What the Project Does

pComputer is a "computer" built from scratch on an FPGA — PCB, RTL, assembly, C, and OS. Instead of an off-the-shelf CPU, the author designed a RISC-V CPU in HDL (pCPU) and wrote the OS and software (pseudOS) that run on it. It's an ambitious educational/research personal project.

  • pCPU: a hand-designed RISC-V RV32IM CPU (multi-cycle, 62.5 MHz, M-mode CSR, timer/external/software interrupts, exceptions)
  • pseudOS: an MMU-less microkernel OS (multitasking, IPC, loads ELF processes from SD, dynamic linking with musl libc)
  • Highlight: a loader that dynamically links standard PIE ELF on a No-MMU system (relocations and library calls patched at load)
  • Already working: MicroPython port, CoreMark, HDMI text terminal + framebuffer (320×240, 8-bit), PS/2 keyboard, SD boot, UART load (921600 baud)

Bus: pCPU connects peripherals over memory-mapped IO (MMIO, one host, multiple guests). GPIO, UART, SD (SPI), PS/2, HDMI, CH375 USB, and the W5500 are all MMIO-mapped peripherals.

Where WIZnet Fits

The Ethernet (network) peripheral of this from-scratch computer is the W5500, marked implemented ([x]) in the README's peripheral list. The key point: the FPGA (pCPU) talks to the W5500 directly, with no external MCU.

  • RTL (w5500.v, module w5500_fdm): a custom SPI master inside the FPGA drives the W5500 in FDM (Fixed Data Length Mode).
  • Hardware pins (module ports): sclk (SPI clock) · scsn (chip-select, active-low, tied to 0 in FDM) · mosi · miso · rstn (W5500 reset, active-low) · intn (W5500 interrupt in) · internal irq (interrupt to the CPU). Physical FPGA pin assignment lives in each board's constraints file (XDC/UCF).
  • Bus (MMIO) interface: a (address) · d (write data) · we (write enable) · spo (read data). Software writes register offsets in order to trigger a transfer — address (16-bit) → control (8-bit: block-select 5 + R/W 1 + OP mode 2) → data → length (1/2/4 bytes) → start. Reads expose status (IDLE?), received data, and intn.
  • Reset timing: a state machine runs RST (>500 µs) → INIT (>1 ms after reset) → IDLE → XFER, honoring the W5500's reset/boot timing in hardware.
  • Software driver (w5500.c/w5500.h): controls W5500 registers/sockets through those MMIO registers, mapping 1:1 to the RTL register map.

So the W5500 gives this from-scratch RISC-V computer its network/Internet connectivity, with the FPGA driving the chip's hardware TCP/IP (8 sockets, 32 KB buffer) directly over SPI. It's the network foundation for the roadmap goal "Can browse the Internet." (RGMII Ethernet and ESP8266 Wi-Fi are still planned, so the currently working network path is the W5500.)

Implementation Notes

  • Boards: Zynq xc7z010 (SqueakyBoard) / xc7z020 (PYNQ-Z1, PMOD) / Kintex-7 xc7k325t / Spartan-6 xc6slx16; open-source toolchain (ECP5/ice40) and other RISC-V planned.
  • Memory: ESP-PSRAM64H main memory (QPI, 62.5 MHz, burst), direct-mapped cache 32 KB (configurable).
  • Boot: from SD (raw) or over UART (921600 baud).
  • W5500 RTL license: the file header declares GPL-3.0-or-later (author Peter Gu). The repo's overall license needs separate confirmation.

Known Issues / Project State

  • In progress: microkernel, dynamic linking, MicroPython, CoreMark work; filesystem, shell, (v)fork/exec, memory manager, C-compiler port are still on the roadmap.
  • Docs not ready yet ("Documents: Not yet...").
  • Personal educational project (74 commits, 5 stars). No top-level LICENSE file visible — check before reuse (the W5500 RTL is GPL-3.0-or-later).

Similar Projects (maker.wiznet.io)

Projects that, like pComputer, drive the W5500 from custom FPGA logic / a hand-built CPU.

  1. ATARIX (irina)https://maker.wiznet.io/irina/projects/atarix/ — W65C816S CPU + ECP5 FPGA + RP2350, W5500 for netboot/NTP. Closest "from-scratch computer + FPGA + W5500."
  2. FPGA + W5500 Control Unit (mark)https://maker.wiznet.io/mark/projects/fpga-w5500-control-unit/ — Spartan-6 + W5500 central control; similar direct-drive structure.
  3. TCP/IP stack design based on FPGA and W5500 (WIZnet Makers)https://maker.wiznet.io/2019/04/26/tcp-ip-stack-design-based-on-fpga-and-embedded-ethernet-w5500/ — an FPGA driving the W5500 as a TCP/IP server; same concept as pComputer's SPI-master implementation.
  4. FPGA Slow Control Interlock System / SCIS (irina)https://maker.wiznet.io/irina/projects/fpga-slow-control-interlock-system-scis/ — an FPGA drives the W5500 (SPI) to process UDP in hardware; similar FPGA-centric W5500 use.
ItempComputerATARIXFPGA+W5500 Control UnitTCP/IP stack on FPGA
NatureFrom-scratch RISC-V computer (CPU+OS)From-scratch computer (816 CPU+FPGA)8-channel measure/controlW5500 TCP/IP server example
CPU/logicHand-designed RV32IMW65C816S + ECP5Spartan-6 logicFPGA logic
W5500FPGA direct SPI master (MMIO)netboot/NTPCentral-control EthernetTCP/IP server
PurposeNetwork/Internet connectivityBoot/time syncMeasure/controlBasic comms

FAQ

Q: What is this project? A: A "computer" built from scratch on an FPGA — a hand-designed RISC-V CPU plus an OS and software. The W5500 adds networking.

Q: How is the W5500 used? A: With no external MCU — a custom SPI master inside the FPGA (w5500_fdm) drives the W5500 directly, mapped into the CPU's MMIO bus and controlled by a software driver.

Q: Which pins does it use? A: SPI sclk/scsn/mosi/miso plus reset (rstn) and interrupt (intn). Physical pin assignment is set per board in the constraints file.

Q: Is it a finished computer? A: Not yet — the CPU, microkernel, and dynamic linking work, but filesystem, shell, and more remain on the roadmap.

 

Bottom metadata fields

  • Programming Language: Verilog (RTL) · C · Assembly (RISC-V)
  • Application: FPGA · 자작 컴퓨터/SoC · RISC-V CPU · OS · 네트워크
  • Tags: W5500, FPGA, RISC-V, RV32IM, SoC, homebrew-computer, pseudOS, MMIO, SPI, ethernet, microkernel, from-scratch
Documents
Comments Write