Skip to content

How Does rioctrl Drive a W5500 UDP Socket From an FPGA With No Processor?

An open CNC controller whose Lattice ECP5 opens the W5500's UDP socket in hand-written Verilog, pinning the PHY to 100 Mbps so the servo loop never jitters.

jaden

Published December 03, 2026 · © CERN Open Hardware License version 2 (CERN-OHL2)

Original author: Reinis VeipsOriginal source (new tab)

How Does rioctrl Drive a W5500 UDP Socket From an FPGA With No Processor?

Components

Hardware components

WIZnet parts

Project description

01 — What is this project?

LinuxCNC has a hardware problem that has never fully gone away. The machine controller needs to read encoders and write step/direction pulses on a hard real-time schedule, and the PC it runs on has no deterministic I/O. For years the answer was a parallel port. Then it was buying a commercial FPGA card.

riocore is an open generator for that card's gateware, and rioctrl is open hardware for the card itself. Together they produce a modular CNC controller built around a Lattice ECP5, with six slots that accept interchangeable I/O modules:

BoardFunction
rioctrl-controllerECP5 FPGA main board — the host link lives here
rioctrl-stepdir44-axis step/dir output
rioctrl-quadenc44-axis quadrature (ABZ) encoder input
rioctrl-shiftio16 digital inputs, 16 PNP digital outputs
breakouts/lichuan-lc10RJ45 breakout to Lichuan LC10 servos
breakouts/ditron-dc11-encoderRJ45 breakout to Ditron DC11 glass scale (DB9)
breakouts/rj45-screw-terminalsRJ45 to screw terminals

The slot specification is published and strict: 12 FPGA signals per slot, 3.3 V logic, 3.3 V / 5 V / input DC rails, and an enable line that is the logical AND of an FPGA watchdog output and an external E-Stop — with the requirement, in the README's own capitals, that each slot "MUST inhibit it's outputs in hardware when the enable signal is low."

And the link from the PC to all of this is a single RJ45 jack, behind a WIZnet W5500 that is driven entirely in Verilog. There is no microcontroller, no soft-core, no embedded OS in the data path. That is what makes this project worth reading closely.


02 — Why hardware TCP/IP, and why no processor at all?

🔷 Reason 1 — LinuxCNC's servo thread sets a hard deadline

A LinuxCNC servo thread runs at a fixed period, typically 1 kHz. Every cycle it must ship new commands out and get fresh feedback back. A late packet is not a dropped frame — it is a position error on a moving axis.

That requirement points to UDP rather than TCP, and to a network path whose latency does not depend on software scheduling anywhere.

🔷 Reason 2 — A soft-core would reintroduce the jitter you came to the FPGA to escape

This is the design decision that distinguishes rioctrl from most FPGA-plus-Ethernet projects, including the ones already on this platform. The usual pattern is to instantiate a soft CPU (NIOS, PicoRV32, RISC-V) inside the fabric and have it talk to the Ethernet chip. That works, and it is easier to write.

riocore does not do that. The w5500.v module is a hand-written state machine: an SPI master plus a register sequencer that initializes the chip, opens a socket, and moves payload — in gateware, clocked, with no instruction fetch anywhere. The gateware's own header says what it is:

/* UDP-Interface based on W5500 chip */

The consequence is that the path from an encoder edge to a UDP packet on the wire is entirely synchronous logic. There is no interrupt latency to characterize because there are no interrupts.

🔷 Reason 3 — A hardwired stack is the only way that works

If you remove the processor, you also remove any possibility of running a software TCP/IP stack. You cannot run LwIP in combinational logic. So the choice is binary: either implement UDP/IP/ARP/ICMP yourself in HDL — which is a serious project in its own right, and consumes fabric the slots need — or buy a chip that already has it.

The W5500 is that chip, and this is the purest expression of why hardwired TCP/IP exists. The FPGA writes a few registers over SPI and a correctly-formed UDP datagram leaves the jack.

🔷 Where the W5500 sits in the WIZnet line

The W5500 documentation lists what the design uses: "Supports 8 independent sockets simultaneously", "Internal 32Kbytes Memory for Tx/Rx Buffers", "Supports High Speed Serial Peripheral Interface(SPI MODE 0, 3)" at up to 80 MHz, "Supports following Hardwired TCP/IP Protocols : TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE", and "48 Pin LQFP Lead-Free Package (7x7mm, 0.5mm pitch)".

For a gateware driver, SPI is the right interface precisely because it is narrow: a six-wire link is six ECP5 pins and one small state machine, where a parallel bus would cost 16+ pins that the six expansion slots need. And the single-socket, maximum-buffer use that follows is only possible because the W5500 lets you allocate its 32 KB freely.


03 — System architecture

   ┌──────────────────────── PC running LinuxCNC ────────────────────────┐
   │   servo thread (typ. 1 kHz)  ──  riocomp.c HAL component           │
   └────────────────────────────────┬───────────────────────────────────┘
                                    │ UDP, default port 2390
                                    │ default IP 192.168.10.194
                      ┌─────────────▼──────────────┐
                      │  Pulse J0011D21BNL MagJack │  (J6, integrated magnetics)
                      │  LINKLED ─ J6.10 (green)   │
                      │  ACTLED  ─ J6.11 (yellow)  │
                      └─────────────┬──────────────┘
                                    │ TXP/TXN/RXP/RXN via R35–R38
                 ┌──────────────────▼───────────────────┐
                 │     WIZnet W5500  (U8, LQFP-48)      │
                 │  PHY forced 100 Mbps full duplex     │
                 │  Socket 0: Sn_MR = 0x02 (UDP)        │
                 │  Socket 0 buffers: 16 KB TX + 16 KB RX│
                 │  AVDD ×6 on filtered 3V3_ADD rail    │
                 │  Y2 crystal + R24, C33/C34           │
                 └──────────────────┬───────────────────┘
                     SPI @ 10 MHz   │  6 nets, pin-exact:
                      (default)     │    SCLK  U8.33 ── U9.F1  (PL23A)
                                    │    MOSI  U8.35 ── U9.D1  (PL17A)
                                    │    MISO  U8.34 ── U9.E1  (PL20D)
                                    │    nSCS  U8.32 ── U9.G1  (PL29A)
                                    │    nINT  U8.36 ── U9.C1  (PL14A)
                                    │    nRST  U8.37 ── U9.B1  (PL11A) + R32 pull-up
                 ┌──────────────────▼───────────────────┐
                 │   Lattice ECP5  (U9, caBGA-256)      │
                 │                                      │
                 │   ┌──────────────────────────────┐   │
                 │   │  w5500.v  — pure Verilog      │   │
                 │   │  SPI master + register        │   │
                 │   │  sequencer, NO soft-core      │   │
                 │   │  tx_data / rx_data / sync     │   │
                 │   └──────────────┬───────────────┘   │
                 │                  │                    │
                 │   riocore-generated signal plumbing   │
                 │   + watchdog enable output            │
                 └───┬───┬───┬───┬───┬───┬───────────────┘
                     │   │   │   │   │   │  6 slots × 12 signals
                     ▼   ▼   ▼   ▼   ▼   ▼  + 3V3 / 5V / DC_IN
                  ┌────────────────────────────┐
                  │ stepdir4 · quadenc4 ·      │
                  │ shiftio · breakouts        │
                  └────────────────────────────┘
                     ▲
         E-Stop ──────┘  enable = FPGA watchdog AND external E-Stop
                         (slots MUST inhibit outputs in hardware)

   Also on board: RP2040 running pico-dirtyJtag (USB-C → JTAG, FPGA reflash),
                 12–24 V DC input, PMOD header, JTAG + SWD headers

04 — Why the W5500? ⭐

🔷 Socket mode used — UDP (Sn_MR = 0x02), and the gateware shows it

No inference is needed here. The Verilog sets it directly:

// Set the socket mode to UDP with no blocking
localparam SET_SOCKET_0_MODE = {16'h0000, WRITE_S0, 8'b00000010};

8'b00000010 is 0x02 written to Sn_MR — UDP mode. And the driver polls for the socket to reach the matching state:

localparam STAT_SOCK_UDP = 8'h22;
...
if (data_read[7:0] == STAT_SOCK_UDP) begin

0x22 is SOCK_UDP in the W5500's Sn_SR status register. The state machine opens socket 0 with command 0x01, waits until Sn_SR reads 0x22, and only then starts moving data. That is the datasheet-correct sequence, implemented in logic.

IPRAW / MACRAW are not used. A motion controller wants the chip to do the IP and UDP work; bypassing the stack would mean building it in fabric, which is the thing the chip was bought to avoid.

🔷 The detail that proves the design intent: the PHY is pinned, not negotiated

This is the single most revealing line in the driver:

// Set PHY to 100 megabits / second, full duplex
localparam SET_PHY_MODE = 32'b00000000_00101110_00000100_11011000;

Decoded, that is a write to register 0x002E — PHYCFGR — with the value 0xD8. It forces 100 Mbps, full duplex, with auto-negotiation off.

A general-purpose device leaves auto-negotiation on. A motion controller does not, because auto-negotiation introduces a variable, multi-second settling period at link-up and can renegotiate to half duplex on a marginal cable — and half duplex means collisions, which means jitter. Pinning the PHY makes the link's behaviour a constant.

This is what a hardwired stack buys that is easy to miss: the PHY is configurable through one register write, so a gateware state machine with no CPU can still make a deliberate layer-1 engineering decision.

🔷 One socket, all the memory

// Set socket 0's TX buffer size to 16kilobytes
localparam S0_RXBUF_SIZE  = 16'h1E;
localparam SET_SOCKET_0_RX_BFR_SZ = {S0_RXBUF_SIZE, WRITE_S0, 8'd16};
localparam S0_TXBUF_SIZE  = 16'h1F;
localparam SET_SOCKET_0_TX_BFR_SZ = {S0_TXBUF_SIZE, WRITE_S0, 8'd16};

Registers 0x1E and 0x1F are Sn_RXBUF_SIZE and Sn_TXBUF_SIZE; the value 16 means 16 KB each. The W5500 has 32 KB total, so this design gives the entire buffer to socket 0 and leaves the other seven at zero.

That is the opposite allocation from a multi-service node — and it is the right one here. One UDP conversation with the host, as much buffer as the chip has, no sharing. The W5500's flexible allocation is what makes both extremes expressible.

🔷 The SPI control bytes are hand-encoded, correctly

localparam WRITE_S0  = 8'b00001100;
localparam READ_S0   = 8'b00001000;
localparam WRITE_REG = 8'b00000100;

These are W5500 SPI frame control bytes: block-select bits plus the read/write bit plus the operation mode. 0b00000100 selects the common register block for writing; 0b00001100 selects socket 0's register block for writing; 0b00001000 the same block for reading. The author is driving the chip's native frame format from Verilog rather than through any library.

The initialization sequence is laid out register by register in the source — MAC bytes at 0x0009–0x000E, source IP at 0x000F–0x0012, gateway at 0x0001–0x0004, subnet mask at 0x0005–0x0008, socket destination IP and port, source port, then OPEN (0x01) and later SEND (0x20) commands, with Sn_RX_RSR read back at 0x0026/0x0027 and the read pointer updated at 0x0028/0x0029.

🔷 Verified hardware evidence ✅

Read from the committed design files, not from the README:

ItemEvidenceSource
W5500 on the board"U8","W5500","Package_QFP:LQFP-48_7x7mm_P0.5mm", LCSC C32843BOM v1.1
Host FPGA"U9","ECP5U_45_CABGA256", Lattice LFE5U-12F-6BG256C, BGA-256 14×14 mmBOM v1.1
MagJack"J6","RJ45_Pulse_J0011D21BNL", LCSC C455444BOM v1.1
SPI wiringNets /FPGA/W5500.SCLK, .MOSI, .MISO, .nSCS → U8.33/35/34/32 ↔ U9.F1/D1/E1/G1netlist
Interrupt wired/FPGA/W5500.nINT → U8.36 ↔ U9.C1 — the FPGA can be event-driven, not polling-onlynetlist
Hard reset wired/FPGA/W5500.nRST → U8.37 ↔ U9.B1, with R32 pull-up to 3V3netlist
Analog supply filteredAll six AVDD pins (U8.4/8/11/15/17/21) on a separate 3V3_ADD rail behind ferrite bead FB7 with C39/C40/C41netlist
Link/activity LEDsLINKLED U8.25 → J6.10, ACTLED U8.27 → J6.11netlist
Dedicated crystalY2 on XI/CLKIN (U8.30) and XO (U8.31) with R24, C33/C34netlist
Default SPI clock"speed": {"default": 10000000}, with TIMING_CONSTRAINTS = {"PINOUT:SCLK": speed}riocore plugin.py
Default network configIP 192.168.10.194, port 2390, mask 255.255.255.0w5500.v parameters
Built and testedrioctrl-controller v1.0 worked with minor rework (remove D9, rotate Y1), "Fixed in v1.1"; FPGA detected via openFPGALoader --detect showing idcode 0x41111043, family ECP5README
LicensingHardware CERN-OHL-2-S, gateware GPL-2.0LICENSE.md, LICENSE

🔷 The same driver runs on four FPGA vendors

w5500.v is not ECP5-specific. The riocore repository carries generated gateware and test configurations using the W5500 across Lattice ECP5, Lattice iCE40 (ICEBreaker), Intel Cyclone 10 (CYC1000), and Gowin (Tang Primer 25K, Tangbob). The plugin computes its SPI clock divider from the target's system clock (divider = system_speed // spi_speed // 5) and applies a timing constraint to the SCLK pin, so retargeting is a configuration change rather than a port.

For a WIZnet audience that is a notable datapoint: one vendor-neutral Verilog driver, four FPGA families, one chip.


05 — Key components

🌐 WIZnet W5500 (U8) — UDP socket 0, SPI from gateware

LQFP-48 7×7 mm, LCSC C32843. 8 hardware sockets of which one is used with the full 32 KB (16 KB TX + 16 KB RX). PHY pinned to 100 Mbps full duplex via PHYCFGR = 0xD8. Driven over SPI at a 10 MHz default by a pure-Verilog state machine — SCLK, MOSI, MISO, nSCS, plus nINT and nRST both wired back to the FPGA.

🧮 Lattice ECP5 (U9)

LFE5U-12F-6BG256C in the v1.1 BOM, caBGA-256. The README describes the board as ECP5-series "with 25k logic cells" and the bringup log shows an LFE5U-25 being detected, so the footprint accepts both densities — worth confirming against the BOM for a given build. Hosts w5500.v plus riocore-generated signal plumbing and the watchdog enable output.

🔌 Pulse J0011D21BNL MagJack (J6)

RJ45 with integrated magnetics, LCSC C455444. TX/RX pairs reach it through R35–R38; its two LEDs are driven from the W5500's own LINKLED and ACTLED outputs rather than from FPGA logic.

🛠️ RP2040 + pico-dirtyJtag

The programmer is on the board. USB-C goes to an RP2040 running pico-dirtyJtag, which presents a JTAG probe for reflashing the ECP5 — so openFPGALoader -c dirtyJtag works with no external programmer. Notably, this MCU is a development convenience; it is not in the Ethernet path.

⚡ Power and safety

12–24 V DC input generates the 3.3 V and 5 V rails. A hardware E-Stop input inhibits slot outputs independently of FPGA gateware; each slot's enable is the AND of that signal and a watchdog-protected FPGA output.

🔧 Slot ecosystem

Six 2×13 2.54 mm sockets, 12 FPGA signals each, preferred module size 100×100 mm. Published specification means third-party modules are possible by design, not by reverse engineering.

📁 Complete manufacturing outputs, committed

Each board ships, per version, in outputs/<board>-vN.N/: KiCad schematic and PCB sources, a schematic PDF, Gerbers plus a JLCPCB-ready zip, drill files and drill map, a BOM CSV with LCSC part numbers, pos.csv / pos-front.csv / pos-back.csv pick-and-place files, an interactive BOM (ibom.html), a STEP model, a rendered board.png, and DRC/ERC reports. A build.py script regenerates all of it from a per-module version file.


06 — Application scenarios

01. Retrofitting a manual machine to CNC

A mill or lathe conversion needs step/dir outputs, encoder inputs, limit switches and a hard E-Stop. One controller plus the slots that match the machine, and LinuxCNC talks to all of it over one cable.

02. Servo machines with industrial drives

The Lichuan LC10 breakout exists because that is what a real retrofit uses — off-the-shelf RJ45 cables from the controller slot to the servo drive, with step/dir/enable proven working.

03. Glass-scale closed-loop positioning

The Ditron DC11 breakout brings RS422 differential optical encoder feedback into a quadenc4 slot. Tested working, with the repo's honest caveat that quadenc4 "only compatible with differential/RS422 encoders."

04. A reference design for FPGA + W5500 boards generally

This is the reason to curate it even for people who will never cut metal. It is a complete, licensed, manufactured, bring-up-documented example of putting a W5500 next to an FPGA correctly — filtered analog rail, dedicated crystal, interrupt and reset wired back, MagJack LEDs taken from the chip, SPI with a timing constraint. Those details are usually scattered across forum posts.


Conclusion

This is the W5500 with nothing between it and the fabric: a hand-written Verilog state machine opens a UDP socket, pins the PHY to 100 Mbps full duplex, hands the chip all 32 KB of its buffer, and never executes an instruction.

  • ✅ No processor in the data path — w5500.v is an SPI master plus register sequencer in pure Verilog, not a soft-core driver
  • ✅ UDP confirmed at register level — Sn_MR written 0x02, state machine waits for Sn_SR == 0x22 (SOCK_UDP) before moving data
  • ✅ PHY deliberately pinned — PHYCFGR = 0xD8: 100 Mbps, full duplex, auto-negotiation off, because a motion controller cannot accept renegotiation jitter
  • ✅ All 32 KB to one socket — 16 KB TX + 16 KB RX on socket 0, the opposite of a multi-service allocation and the right call for a single host link
  • ✅ One driver, four FPGA vendors — Lattice ECP5 and iCE40, Intel Cyclone 10, Gowin; SPI divider derived from system clock, SCLK timing-constrained
  • ✅ Built and tested, with reworks documented and fixed in v1.1; FPGA bring-up log included
  • ✅ Fully open and manufacturable — hardware CERN-OHL-2-S, gateware GPL-2.0, Gerbers + JLCPCB zip + BOM with LCSC part numbers + pick-and-place + interactive BOM + STEP, all committed
  • ✅ Safety designed in hardware — slot enable is FPGA watchdog AND external E-Stop, and slots must inhibit outputs in hardware
  • ✅ Published slot specification — 6 slots × 12 signals, 100×100 mm, open for third-party modules

07 — Related projects on WIZnet Makers

ProjectHostW5500 roleHow this one differs
ad9226_cyclone5_w5500Cyclone V FPGAADC samples out over EthernetAlso FPGA + W5500, but a data-acquisition stream rather than a bidirectional real-time control loop
FPGA Slow Control Interlock System (SCIS)GateMate / AMD 7-seriesUDP metric packets to GrafanaClosest sibling — also FPGA-driven UDP. Reports ~18 Mbit/s and +7% LUT per extra module; monitoring-oriented rather than closed-loop motion

Insight. The platform already has FPGA + W5500 projects, and they are telemetry: samples or metrics flowing outward. rioctrl is the first closed-loop case — a host writes commands and reads feedback every servo period, which is why the gateware pins the PHY and hands one socket the entire buffer. It is also the only one of the three that ships a complete manufacturable hardware release under CERN-OHL alongside the gateware.


Q&A

Q. Which W5500 socket mode does this use, and how do we know? A. UDP. w5500.v writes 0x02 to Sn_MR with the comment "Set the socket mode to UDP with no blocking", and the state machine waits for Sn_SR to read 0x22 (SOCK_UDP) before transferring. This is read from the gateware source, not inferred from the application.

Q. Why UDP rather than TCP for a control link? A. A LinuxCNC servo thread has a fixed period, typically 1 kHz. TCP's retransmission and congestion control would deliver a stale command late, which is worse than no command at all — the controller would rather see the next fresh packet. UDP gives bounded, predictable behaviour, and the watchdog on the FPGA enable output handles loss by inhibiting the slots.

Q. Is there really no CPU involved? A. Not in the Ethernet path. There is an RP2040 on the board, but it runs pico-dirtyJtag purely so you can reflash the ECP5 over USB-C without an external programmer. The W5500 is driven by w5500.v running as logic in the FPGA fabric.

Q. Why force the PHY to 100 Mbps full duplex instead of auto-negotiating? A. Auto-negotiation takes a variable period at link-up and can settle on half duplex over a marginal cable, which reintroduces collisions and therefore jitter. One register write to PHYCFGR (0xD8) removes that variable. It is a small line of code carrying a real engineering decision.

Q. Why SPI and not the parallel-bus W5300, given the host is an FPGA? A. Pin budget. The board's purpose is six expansion slots at 12 signals each; a parallel bus would spend 16+ ECP5 pins on networking. At a 1 kHz servo rate the payload is small, so SPI at 10 MHz is comfortably sufficient, and six wires plus one small state machine is the cheaper trade.

Q. Can I build this? A. Yes, and that is unusual. Hardware is CERN-OHL-2-S, gateware GPL-2.0, and each board's outputs/ directory holds Gerbers with a JLCPCB-ready zip, a BOM with LCSC part numbers, pick-and-place files, an interactive BOM, a STEP model and a schematic PDF. Note the two submodules (hadv-kicad-lib, sexp_parser) if you intend to open the KiCad sources, and read the per-board status table — rioctrl-quadenc4 needs differential/RS422 encoders, and there is a known issue with slot-enable turn-off being slow.

Q. Does the FPGA poll the W5500 or wait for an interrupt? A. Both are wired. nINT (U8.36) goes to ECP5 pin C1, so interrupt-driven operation is available in hardware; the driver also reads Sn_RX_RSR directly. nRST (U8.37) is wired to pin B1 with a pull-up, so the gateware can hard-reset the chip rather than relying on power cycling — a detail many FPGA designs leave out and later regret.


한국어 버전

rioctrl + riocore — 프로세서 없이 순수 Verilog로 W5500을 구동하다

#W5500 #UDP #FPGA #Verilog #LinuxCNC #CNC #ECP5 #오픈하드웨어 #CERN-OHL #소프트코어없음

📚 맥락: 오픈소스 CNC 컨트롤러 하드웨어(festlv/rioctrl-hw, CERN-OHL-2-S)와 오픈 게이트웨어(multigcs/riocore, GPL-2.0) 검증 상태: 저장소 자체의 상태표에 제작·시험 완료로 기재. 아래 모든 근거는 커밋된 넷리스트·BOM·Verilog 원본에서 직접 읽은 것


01 — 어떤 프로젝트인가

LinuxCNC에는 끝까지 사라지지 않은 하드웨어 문제가 있습니다. 머신 컨트롤러는 엔코더를 읽고 스텝/방향 펄스를 하드 리얼타임 일정으로 내보내야 하는데, LinuxCNC가 돌아가는 PC에는 결정적인 I/O가 없습니다. 오랫동안 답은 패러렐 포트였고, 그다음은 상용 FPGA 카드를 사는 것이었습니다.

riocore는 그 카드의 게이트웨어를 생성하는 오픈 도구이고, rioctrl은 카드 자체의 오픈 하드웨어입니다. 둘이 합쳐 Lattice ECP5를 중심으로 한 모듈형 CNC 컨트롤러가 되고, 교체 가능한 I/O 모듈을 받는 슬롯 6개를 가집니다.

보드기능
rioctrl-controllerECP5 FPGA 메인보드 — 호스트 링크가 여기 있음
rioctrl-stepdir44축 스텝/방향 출력
rioctrl-quadenc44축 쿼드러처(ABZ) 엔코더 입력
rioctrl-shiftio디지털 입력 16개, PNP 디지털 출력 16개
breakouts/lichuan-lc10Lichuan LC10 서보용 RJ45 브레이크아웃
breakouts/ditron-dc11-encoderDitron DC11 글래스 스케일(DB9) 브레이크아웃
breakouts/rj45-screw-terminalsRJ45 → 스크류 터미널

슬롯 규격이 공개돼 있고 엄격합니다. 슬롯당 FPGA 신호 12개, 3.3 V 로직, 3.3 V / 5 V / 입력 DC 레일, 그리고 FPGA 워치독 출력과 외부 E-Stop의 논리곱인 enable 신호. README는 대문자로 요구합니다 — 각 슬롯은 "enable 신호가 로우일 때 출력을 반드시 하드웨어에서 차단해야 한다."

그리고 PC에서 이 모든 것으로 가는 링크는 RJ45 잭 하나이고, 그 뒤에 WIZnet W5500이 전부 Verilog로 구동됩니다. 데이터 경로에 마이크로컨트롤러도, 소프트코어도, 임베디드 OS도 없습니다. 이 프로젝트를 자세히 볼 이유가 바로 그것입니다.


02 — 왜 하드웨어 TCP/IP이고, 왜 프로세서가 아예 없는가

🔷 이유 1 — LinuxCNC 서보 스레드가 하드 데드라인을 정한다

LinuxCNC 서보 스레드는 고정 주기, 보통 1 kHz로 돕니다. 매 주기마다 새 명령을 내보내고 새 피드백을 받아와야 합니다. 늦은 패킷은 떨어진 프레임이 아니라 움직이는 축의 위치 오차입니다.

이 요구는 TCP가 아니라 UDP를 가리키고, 지연이 어디에서도 소프트웨어 스케줄링에 의존하지 않는 네트워크 경로를 가리킵니다.

🔷 이유 2 — 소프트코어는 FPGA로 피하려 했던 지터를 다시 들여온다

이것이 rioctrl을 대부분의 FPGA+이더넷 프로젝트와, 이 플랫폼에 이미 있는 것들과도 구분하는 설계 결정입니다. 통상의 패턴은 패브릭 안에 소프트 CPU(NIOS, PicoRV32, RISC-V)를 올리고 그것이 이더넷 칩과 대화하게 하는 것입니다. 동작하고, 쓰기도 더 쉽습니다.

riocore는 그렇게 하지 않습니다. w5500.v 모듈은 손으로 쓴 상태기계입니다 — SPI 마스터와, 칩을 초기화하고 소켓을 열고 페이로드를 옮기는 레지스터 시퀀서. 게이트웨어로, 클럭에 맞춰, 명령어 페치 없이. 게이트웨어 자신의 헤더가 무엇인지 말합니다.

/* UDP-Interface based on W5500 chip */

결과적으로 엔코더 에지에서 와이어 위 UDP 패킷까지의 경로가 전부 동기 논리입니다. 특성화할 인터럽트 지연이 없습니다 — 인터럽트가 없으니까요.

🔷 이유 3 — 하드와이어드 스택만이 성립한다

프로세서를 없애면 소프트웨어 TCP/IP 스택을 돌릴 가능성도 함께 없어집니다. 조합 논리로 LwIP를 돌릴 수는 없습니다. 그래서 선택은 둘 중 하나입니다 — UDP/IP/ARP/ICMP를 HDL로 직접 구현하거나(그 자체로 큰 프로젝트이고 슬롯이 필요한 패브릭을 잡아먹습니다), 이미 그걸 가진 칩을 사거나.

W5500이 그 칩이고, 이것이 하드와이어드 TCP/IP가 존재하는 이유의 가장 순수한 표현입니다. FPGA가 SPI로 레지스터 몇 개를 쓰면 올바르게 구성된 UDP 데이터그램이 잭에서 나갑니다.

🔷 제품군 안에서 W5500의 자리

W5500 문서가 이 설계가 쓰는 것을 열거합니다 — "Supports 8 independent sockets simultaneously", "Internal 32Kbytes Memory for Tx/Rx Buffers", 최대 80 MHz의 "Supports High Speed Serial Peripheral Interface(SPI MODE 0, 3)", "Supports following Hardwired TCP/IP Protocols : TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE", "48 Pin LQFP Lead-Free Package (7x7mm, 0.5mm pitch)".

게이트웨어 드라이버에게 SPI가 맞는 인터페이스인 이유는 바로 좁아서입니다. 6선 링크는 ECP5 핀 6개와 작은 상태기계 하나인데, 병렬 버스라면 확장 슬롯 6개가 필요한 핀 16개 이상을 씁니다. 그리고 그 뒤에 따라오는 단일 소켓·최대 버퍼 사용법은 W5500이 32 KB를 자유롭게 할당하게 해주기 때문에만 가능합니다.


03 — 시스템 구조

   ┌──────────────────── LinuxCNC 구동 PC ──────────────────────────────┐
   │   서보 스레드 (통상 1 kHz)  ──  riocomp.c HAL 컴포넌트             │
   └────────────────────────────────┬───────────────────────────────────┘
                                    │ UDP, 기본 포트 2390
                                    │ 기본 IP 192.168.10.194
                      ┌─────────────▼──────────────┐
                      │  Pulse J0011D21BNL MagJack │  (J6, 마그네틱 내장)
                      │  LINKLED ─ J6.10 (녹색)    │
                      │  ACTLED  ─ J6.11 (황색)    │
                      └─────────────┬──────────────┘
                                    │ TXP/TXN/RXP/RXN, R35~R38 경유
                 ┌──────────────────▼───────────────────┐
                 │     WIZnet W5500  (U8, LQFP-48)      │
                 │  PHY를 100 Mbps 전이중으로 고정       │
                 │  소켓 0: Sn_MR = 0x02 (UDP)          │
                 │  소켓 0 버퍼: TX 16 KB + RX 16 KB    │
                 │  AVDD 6개를 필터링된 3V3_ADD 레일에   │
                 │  Y2 크리스탈 + R24, C33/C34          │
                 └──────────────────┬───────────────────┘
                   SPI @ 10 MHz     │  넷 6개, 핀 단위:
                      (기본값)       │    SCLK  U8.33 ── U9.F1  (PL23A)
                                    │    MOSI  U8.35 ── U9.D1  (PL17A)
                                    │    MISO  U8.34 ── U9.E1  (PL20D)
                                    │    nSCS  U8.32 ── U9.G1  (PL29A)
                                    │    nINT  U8.36 ── U9.C1  (PL14A)
                                    │    nRST  U8.37 ── U9.B1  (PL11A) + R32 풀업
                 ┌──────────────────▼───────────────────┐
                 │   Lattice ECP5  (U9, caBGA-256)      │
                 │                                      │
                 │   ┌──────────────────────────────┐   │
                 │   │  w5500.v — 순수 Verilog       │   │
                 │   │  SPI 마스터 + 레지스터         │   │
                 │   │  시퀀서, 소프트코어 없음       │   │
                 │   │  tx_data / rx_data / sync     │   │
                 │   └──────────────┬───────────────┘   │
                 │                  │                    │
                 │   riocore 생성 신호 배선              │
                 │   + 워치독 enable 출력                │
                 └───┬───┬───┬───┬───┬───┬───────────────┘
                     │   │   │   │   │   │  슬롯 6개 × 신호 12개
                     ▼   ▼   ▼   ▼   ▼   ▼  + 3V3 / 5V / DC_IN
                  ┌────────────────────────────┐
                  │ stepdir4 · quadenc4 ·      │
                  │ shiftio · 브레이크아웃      │
                  └────────────────────────────┘
                     ▲
         E-Stop ──────┘  enable = FPGA 워치독 AND 외부 E-Stop
                         (슬롯은 출력을 하드웨어에서 차단해야 함)

   보드에 함께: pico-dirtyJtag 구동 RP2040 (USB-C → JTAG, FPGA 재기록),
                12~24 V DC 입력, PMOD 헤더, JTAG·SWD 헤더

04 — 왜 W5500이어야 했는가 ⭐

🔷 사용 소켓 모드 — UDP (Sn_MR = 0x02), 게이트웨어가 직접 보여준다

추정이 필요 없습니다. Verilog가 직접 설정합니다.

// Set the socket mode to UDP with no blocking
localparam SET_SOCKET_0_MODE = {16'h0000, WRITE_S0, 8'b00000010};

8'b00000010은 Sn_MR에 쓰는 0x02 — UDP 모드입니다. 그리고 드라이버는 소켓이 해당 상태에 도달할 때까지 폴링합니다.

localparam STAT_SOCK_UDP = 8'h22;
...
if (data_read[7:0] == STAT_SOCK_UDP) begin

0x22는 W5500의 Sn_SR 상태 레지스터에서 SOCK_UDP입니다. 상태기계가 명령 0x01로 소켓 0을 열고, Sn_SR이 0x22로 읽힐 때까지 기다린 뒤에야 데이터를 옮깁니다. 데이터시트대로의 순서를 논리로 구현한 것입니다.

IPRAW / MACRAW는 쓰지 않습니다. 모션 컨트롤러는 칩이 IP와 UDP 일을 해주기를 원합니다. 스택을 우회한다는 건 그걸 패브릭에 만든다는 뜻이고, 그게 바로 칩을 사서 피하려던 일입니다.

🔷 설계 의도를 증명하는 한 줄: PHY를 협상시키지 않고 고정한다

드라이버에서 가장 많은 것을 드러내는 한 줄입니다.

// Set PHY to 100 megabits / second, full duplex
localparam SET_PHY_MODE = 32'b00000000_00101110_00000100_11011000;

해독하면 레지스터 0x002E — PHYCFGR — 에 값 0xD8을 쓰는 것입니다. 100 Mbps, 전이중, 오토네고시에이션 끔을 강제합니다.

범용 장치는 오토네고시에이션을 켜둡니다. 모션 컨트롤러는 그러지 않습니다. 오토네고시에이션은 링크업 시 가변적인 수 초의 정착 구간을 만들고, 상태가 나쁜 케이블에서는 반이중으로 재협상할 수 있습니다 — 반이중은 충돌을 뜻하고 충돌은 지터를 뜻합니다. PHY를 고정하면 링크 거동이 상수가 됩니다.

하드와이어드 스택이 사주는 것 중 놓치기 쉬운 부분이 이것입니다. PHY가 레지스터 한 번 쓰기로 설정되므로, CPU가 없는 게이트웨어 상태기계도 의도적인 1계층 엔지니어링 결정을 내릴 수 있습니다.

🔷 소켓 하나에 메모리 전부

// Set socket 0's TX buffer size to 16kilobytes
localparam S0_RXBUF_SIZE  = 16'h1E;
localparam SET_SOCKET_0_RX_BFR_SZ = {S0_RXBUF_SIZE, WRITE_S0, 8'd16};
localparam S0_TXBUF_SIZE  = 16'h1F;
localparam SET_SOCKET_0_TX_BFR_SZ = {S0_TXBUF_SIZE, WRITE_S0, 8'd16};

레지스터 0x1E와 0x1F는 Sn_RXBUF_SIZE와 Sn_TXBUF_SIZE이고, 값 16은 각각 16 KB를 뜻합니다. W5500 전체가 32 KB이므로 이 설계는 버퍼 전부를 소켓 0에 줍니다. 나머지 일곱 개는 0입니다.

다중 서비스 노드와는 정반대 할당이고, 여기서는 그게 옳습니다. 호스트와의 UDP 대화 하나, 칩이 가진 만큼의 버퍼, 공유 없음. W5500의 유연한 할당이 양극단을 모두 표현 가능하게 만듭니다.

🔷 SPI 제어 바이트를 손으로, 정확하게 인코딩했다

localparam WRITE_S0  = 8'b00001100;
localparam READ_S0   = 8'b00001000;
localparam WRITE_REG = 8'b00000100;

W5500 SPI 프레임 제어 바이트입니다 — 블록 선택 비트 + 읽기/쓰기 비트 + 동작 모드. 0b00000100은 공통 레지스터 블록 쓰기, 0b00001100은 소켓 0 레지스터 블록 쓰기, 0b00001000은 같은 블록 읽기를 선택합니다. 저자가 라이브러리를 거치지 않고 칩의 고유 프레임 형식을 Verilog에서 직접 구동하고 있습니다.

초기화 순서가 원본에 레지스터 단위로 펼쳐져 있습니다 — MAC 바이트 0x0009~0x000E, 소스 IP 0x000F~0x0012, 게이트웨이 0x0001~0x0004, 서브넷 마스크 0x0005~0x0008, 소켓 목적지 IP와 포트, 소스 포트, 그다음 OPEN(0x01), 이후 SEND(0x20) 명령, Sn_RX_RSR를 0x0026/0x0027에서 읽고 읽기 포인터를 0x0028/0x0029에서 갱신.

🔷 검증된 하드웨어 근거 ✅

README가 아니라 커밋된 설계 파일에서 읽은 것입니다.

항목근거출처
보드의 W5500"U8","W5500","Package_QFP:LQFP-48_7x7mm_P0.5mm", LCSC C32843BOM v1.1
호스트 FPGA"U9","ECP5U_45_CABGA256", Lattice LFE5U-12F-6BG256C, BGA-256 14×14 mmBOM v1.1
MagJack"J6","RJ45_Pulse_J0011D21BNL", LCSC C455444BOM v1.1
SPI 배선넷 /FPGA/W5500.SCLK, .MOSI, .MISO, .nSCS → U8.33/35/34/32 ↔ U9.F1/D1/E1/G1넷리스트
인터럽트 배선/FPGA/W5500.nINT → U8.36 ↔ U9.C1 — 폴링만이 아니라 이벤트 구동 가능넷리스트
하드 리셋 배선/FPGA/W5500.nRST → U8.37 ↔ U9.B1, R32로 3V3 풀업넷리스트
아날로그 전원 필터링AVDD 6개(U8.4/8/11/15/17/21)를 페라이트 비드 FB7 뒤의 별도 3V3_ADD 레일에 C39/C40/C41과 함께넷리스트
링크·액티비티 LEDLINKLED U8.25 → J6.10, ACTLED U8.27 → J6.11넷리스트
전용 크리스탈Y2를 XI/CLKIN(U8.30)·XO(U8.31)에 R24, C33/C34와 함께넷리스트
기본 SPI 클럭"speed": {"default": 10000000}, TIMING_CONSTRAINTS = {"PINOUT:SCLK": speed}riocore plugin.py
기본 네트워크 설정IP 192.168.10.194, 포트 2390, 마스크 255.255.255.0w5500.v 파라미터
제작·시험 완료rioctrl-controller v1.0이 소규모 리워크(D9 제거, Y1 90도 회전)로 동작, "v1.1에서 수정". openFPGALoader --detect가 idcode 0x41111043, family ECP5 검출README
라이선스하드웨어 CERN-OHL-2-S, 게이트웨어 GPL-2.0LICENSE.md, LICENSE

🔷 같은 드라이버가 FPGA 4개 벤더에서 돈다

w5500.v는 ECP5 전용이 아닙니다. riocore 저장소에는 Lattice ECP5, Lattice iCE40(ICEBreaker), Intel Cyclone 10(CYC1000), Gowin(Tang Primer 25K, Tangbob) 에서 W5500을 쓰는 생성 게이트웨어와 시험 구성이 들어 있습니다. 플러그인이 대상의 시스템 클럭에서 SPI 분주비를 계산하고(divider = system_speed // spi_speed // 5) SCLK 핀에 타이밍 제약을 적용하므로, 재타게팅이 포팅이 아니라 설정 변경입니다.

WIZnet 독자에게 주목할 데이터입니다 — 벤더 중립 Verilog 드라이버 하나, FPGA 계열 4종, 칩 하나.


05 — 핵심 구성요소

🌐 WIZnet W5500 (U8) — UDP 소켓 0, 게이트웨어에서 SPI

LQFP-48 7×7 mm, LCSC C32843. 하드웨어 소켓 8개 중 하나에 32 KB 전부(TX 16 KB + RX 16 KB). PHYCFGR = 0xD8로 PHY를 100 Mbps 전이중 고정. 순수 Verilog 상태기계가 기본 10 MHz SPI로 구동 — SCLK, MOSI, MISO, nSCS에 nINT와 nRST까지 FPGA로 되돌려 배선.

🧮 Lattice ECP5 (U9)

v1.1 BOM에 LFE5U-12F-6BG256C, caBGA-256. README는 보드를 "25k 로직 셀" ECP5 계열로 서술하고 브링업 로그에는 LFE5U-25가 검출됩니다. 풋프린트가 두 밀도를 모두 받으므로 특정 빌드에서는 BOM과 대조해 확인하는 게 좋습니다. w5500.v와 riocore 생성 신호 배선, 워치독 enable 출력을 호스팅합니다.

🔌 Pulse J0011D21BNL MagJack (J6)

마그네틱 내장 RJ45, LCSC C455444. TX/RX 페어가 R35~R38을 거쳐 도달하고, LED 2개는 FPGA 로직이 아니라 W5500 자신의 LINKLED·ACTLED 출력에서 구동됩니다.

🛠️ RP2040 + pico-dirtyJtag

프로그래머가 보드에 있습니다. USB-C가 pico-dirtyJtag을 구동하는 RP2040으로 가고, 이것이 ECP5 재기록용 JTAG 프로브로 보입니다 — 외부 프로그래머 없이 openFPGALoader -c dirtyJtag가 됩니다. 이 MCU는 개발 편의용이고 이더넷 경로에 없다는 점이 중요합니다.

⚡ 전원과 안전

12~24 V DC 입력이 3.3 V·5 V 레일을 만듭니다. 하드웨어 E-Stop 입력이 FPGA 게이트웨어와 무관하게 슬롯 출력을 차단하고, 각 슬롯의 enable은 그 신호와 워치독 보호된 FPGA 출력의 논리곱입니다.

🔧 슬롯 생태계

2.54 mm 2×13 소켓 6개, 슬롯당 FPGA 신호 12개, 권장 모듈 크기 100×100 mm. 규격이 공개돼 있어 서드파티 모듈이 역공학이 아니라 설계상 가능합니다.

📁 완전한 제조 산출물이 커밋돼 있다

각 보드가 버전별로 outputs/<board>-vN.N/에 — KiCad 회로도·PCB 원본, 회로도 PDF, 거버와 JLCPCB용 zip, 드릴 파일과 드릴 맵, LCSC 품번이 들어간 BOM CSV, pos.csv/pos-front.csv/pos-back.csv 픽앤플레이스 파일, 인터랙티브 BOM(ibom.html), STEP 모델, 렌더링된 board.png, DRC/ERC 리포트를 담고 있습니다. build.py가 모듈별 version 파일을 보고 전부 재생성합니다.


06 — 응용 시나리오

01. 수동 공작기계를 CNC로 개조

밀링이나 선반 개조에는 스텝/방향 출력, 엔코더 입력, 리밋 스위치, 하드 E-Stop이 필요합니다. 컨트롤러 하나에 기계에 맞는 슬롯만 꽂으면, LinuxCNC가 케이블 하나로 전부와 대화합니다.

02. 산업용 드라이브를 쓰는 서보 기계

Lichuan LC10 브레이크아웃이 존재하는 이유는 실제 개조가 그걸 쓰기 때문입니다 — 컨트롤러 슬롯에서 서보 드라이브까지 기성품 RJ45 케이블로, 스텝/방향/enable 동작 확인됨.

03. 글래스 스케일 폐루프 위치제어

Ditron DC11 브레이크아웃이 RS422 차동 광학 엔코더 피드백을 quadenc4 슬롯으로 가져옵니다. 동작 확인됨이며, 저장소의 정직한 단서로 quadenc4는 "차동/RS422 엔코더만 호환" 됩니다.

04. FPGA + W5500 보드 전반의 레퍼런스 설계

금속을 깎을 일이 없는 사람에게도 이걸 큐레이션할 이유입니다. W5500을 FPGA 옆에 올바르게 놓은, 완결되고 라이선스되고 실제 제작되고 브링업까지 문서화된 사례입니다 — 필터링된 아날로그 레일, 전용 크리스탈, 인터럽트·리셋 되돌림 배선, 칩에서 가져온 MagJack LED, 타이밍 제약이 걸린 SPI. 보통 포럼 글에 흩어져 있는 디테일입니다.


Conclusion

패브릭과 칩 사이에 아무것도 없는 W5500입니다. 손으로 쓴 Verilog 상태기계가 UDP 소켓을 열고, PHY를 100 Mbps 전이중으로 고정하고, 칩의 버퍼 32 KB 전부를 주고, 명령어를 한 번도 실행하지 않습니다.

  • ✅ 데이터 경로에 프로세서 없음 — w5500.v는 소프트코어 드라이버가 아니라 순수 Verilog의 SPI 마스터 + 레지스터 시퀀서
  • ✅ UDP를 레지스터 단위로 확인 — Sn_MR에 0x02 기록, 상태기계가 Sn_SR == 0x22(SOCK_UDP)를 기다린 뒤 데이터 이동
  • ✅ PHY를 의도적으로 고정 — PHYCFGR = 0xD8: 100 Mbps, 전이중, 오토네고시에이션 끔. 모션 컨트롤러는 재협상 지터를 받아들일 수 없기 때문
  • ✅ 32 KB 전부를 한 소켓에 — 소켓 0에 TX 16 KB + RX 16 KB. 다중 서비스 할당의 정반대이고 단일 호스트 링크에는 옳은 선택
  • ✅ 드라이버 하나, FPGA 벤더 4곳 — Lattice ECP5·iCE40, Intel Cyclone 10, Gowin. SPI 분주비를 시스템 클럭에서 산출하고 SCLK에 타이밍 제약
  • ✅ 제작·시험 완료. 리워크 내역이 문서화되고 v1.1에서 수정됨, FPGA 브링업 로그 포함
  • ✅ 완전 공개·제조 가능 — 하드웨어 CERN-OHL-2-S, 게이트웨어 GPL-2.0, 거버 + JLCPCB zip + LCSC 품번 BOM + 픽앤플레이스 + 인터랙티브 BOM + STEP 전부 커밋
  • ✅ 안전을 하드웨어로 설계 — 슬롯 enable이 FPGA 워치독 AND 외부 E-Stop이고, 슬롯은 출력을 하드웨어에서 차단해야 함
  • ✅ 슬롯 규격 공개 — 슬롯 6개 × 신호 12개, 100×100 mm, 서드파티 모듈에 열려 있음

07 — WIZnet Makers의 관련 프로젝트

프로젝트호스트W5500 역할이 프로젝트와의 차이
ad9226_cyclone5_w5500Cyclone V FPGAADC 샘플을 이더넷으로 송출같은 FPGA + W5500이지만 양방향 실시간 제어 루프가 아니라 데이터 수집 스트림
FPGA Slow Control Interlock System (SCIS)GateMate / AMD 7-seriesGrafana로 UDP 메트릭 패킷가장 가까운 형제 — 역시 FPGA 구동 UDP. 약 18 Mbit/s, 모듈 추가당 LUT +7% 보고. 폐루프 모션이 아니라 모니터링 지향

인사이트. 플랫폼에는 이미 FPGA + W5500 프로젝트가 있고, 둘 다 원격측정입니다 — 샘플이나 메트릭이 바깥으로 흐르는 형태. rioctrl은 첫 폐루프 사례입니다. 호스트가 매 서보 주기마다 명령을 쓰고 피드백을 읽고, 그래서 게이트웨어가 PHY를 고정하고 소켓 하나에 버퍼 전부를 줍니다. 또한 세 건 중 유일하게 게이트웨어와 함께 CERN-OHL로 완전한 제조 가능 하드웨어 릴리스를 배포합니다.


Q&A

Q. W5500의 어떤 소켓 모드를 쓰고, 어떻게 아나요? A. UDP입니다. w5500.v가 "Set the socket mode to UDP with no blocking" 주석과 함께 Sn_MR에 0x02를 쓰고, 상태기계가 Sn_SR이 0x22(SOCK_UDP)로 읽힐 때까지 기다린 뒤 전송합니다. 응용에서 추정한 게 아니라 게이트웨어 원본에서 읽은 것입니다.

Q. 제어 링크에 왜 TCP가 아니라 UDP인가요? A. LinuxCNC 서보 스레드는 고정 주기, 보통 1 kHz입니다. TCP의 재전송과 혼잡 제어는 낡은 명령을 늦게 전달하게 되는데, 그건 명령이 없는 것보다 나쁩니다 — 컨트롤러는 차라리 다음 새 패킷을 보고 싶어합니다. UDP는 유계이고 예측 가능한 거동을 주며, 손실은 FPGA enable 출력의 워치독이 슬롯을 차단하는 방식으로 처리합니다.

Q. 정말 CPU가 하나도 관여하지 않나요? A. 이더넷 경로에는 없습니다. 보드에 RP2040이 있긴 하지만, 외부 프로그래머 없이 USB-C로 ECP5를 재기록하기 위한 pico-dirtyJtag 용도입니다. W5500은 FPGA 패브릭에서 논리로 동작하는 w5500.v가 구동합니다.

Q. 왜 오토네고시에이션 대신 100 Mbps 전이중을 강제하나요? A. 오토네고시에이션은 링크업 시 가변 구간을 만들고, 상태가 나쁜 케이블에서 반이중으로 정착할 수 있는데 그러면 충돌이, 따라서 지터가 다시 생깁니다. PHYCFGR에 한 번 쓰는 것(0xD8)으로 그 변수를 없앱니다. 작은 코드 한 줄이 실제 엔지니어링 결정을 담고 있습니다.

Q. 호스트가 FPGA인데 왜 병렬 버스인 W5300이 아닌가요? A. 핀 예산입니다. 이 보드의 목적은 슬롯당 신호 12개의 확장 슬롯 6개이고, 병렬 버스는 ECP5 핀 16개 이상을 네트워킹에 씁니다. 1 kHz 서보 주기에서 페이로드는 작으므로 10 MHz SPI면 넉넉하고, 6선에 작은 상태기계 하나가 더 싼 거래입니다.

Q. 제가 만들 수 있나요? A. 가능하고, 그게 드문 점입니다. 하드웨어 CERN-OHL-2-S, 게이트웨어 GPL-2.0이고, 각 보드의 outputs/ 디렉터리에 JLCPCB용 zip이 포함된 거버, LCSC 품번이 든 BOM, 픽앤플레이스 파일, 인터랙티브 BOM, STEP 모델, 회로도 PDF가 있습니다. KiCad 원본을 열려면 서브모듈 두 개(hadv-kicad-lib, sexp_parser)를 챙기시고, 보드별 상태표를 읽어보세요 — rioctrl-quadenc4는 차동/RS422 엔코더가 필요하고, 슬롯 enable 차단이 느린 기지 이슈가 있습니다.

Q. FPGA가 W5500을 폴링하나요, 인터럽트를 기다리나요? A. 둘 다 배선돼 있습니다. nINT(U8.36)가 ECP5 C1 핀으로 가므로 인터럽트 구동이 하드웨어적으로 가능하고, 드라이버는 Sn_RX_RSR을 직접 읽기도 합니다. nRST(U8.37)가 풀업과 함께 B1 핀에 배선돼 있어 전원을 끄지 않고 게이트웨어가 칩을 하드 리셋할 수 있습니다 — 많은 FPGA 설계가 빼먹고 나중에 후회하는 디테일입니다.


Original Link: https://github.com/festlv/rioctrl-hw Gateware: https://github.com/multigcs/riocore

Comments

Similar projects you might like

Comments