

Emu brd
A RP2040 based DECstation emulator
- Size
- 52 × 90 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 86
- Nets
- 114
- Pads
- 417
- Tracks, vias
- 888, 117
- Pours
- 6
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 1 Jul 2024
- Updated
- 20 Jul 2024
Overview
Emu brd is an open-source printed circuit board by rscott2049, from the rscott2049/DECstation2040 repository on GitHub, published under the BSD-3-Clause licence. It is a 2-layer board of 52 × 90 mm with 86 parts on 114 nets, routed with 888 tracks and 117 vias.
It is built around the RP2040, LAN8742A-CZ and TLV751180330PDSQR, with the TXS0108ERGYR, TXV0106BQBR and ECS-120-20-23B-TR among its other parts. Its parts include 30 resistors, 28 capacitors, 11 connectors, 7 ICs and 1 crystal. It belongs with the RP2040 boards of this library.
Main components
7RP2040
LQFN-56(7x7)12bit 133MHz 30 LQFN-56(7x7) Microcontrollers (MCU/MPU/SOC) ROHSRaspberry PiMicrocontrollers (MCU/MPU/SOC)LAN8742A-CZ
QFN-24-EP(4x4)0℃~+70℃ 1.8V~3.3V 10BASE-T、100BASE-TX 10Mbit/s、100Mbit/s Ethernet Transceiver RMII QFN-24-EP(4x4) Ethernet Transceivers ROHSMicrochip TechnologyEthernet TransceiversTLV751180330PDSQR
WSON-10(2x2)-40℃~+125℃@(Tj) 1.8V、3.3V 130mV@(500mA)、190mV@(500mA) 2 30uVrms 35uA 500mA 50dB@(1kHz) 6V Fixed Positive Under Voltage Lockout、Over Current Protection、Soft Start、Enable、Short Circuit Protection、Thermal Shutdown WSON-10(2x2) Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTexas InstrumentsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsTXS0108ERGYR
VQFN-20-EP(3.7x4.7)-40℃~+85℃ 1 1.4V~3.6V 1.65V~5.5V 8 Auto Direction Detection Bidirectional Push-Pull、Open-drain VQFN-20-EP(3.7x4.7) Translators, Level Shifters ROHSTexas InstrumentsTranslators, Level ShiftersTXV0106BQBR
WQFN-16-EP(3.5x2.5)Translators, Level ShiftersTexas InstrumentsECS-120-20-23B-TR
SMD6035-4P-10℃~+70℃ 12MHz 20pF 50Ω ±30ppm ±50ppm SMD6035-4P Crystals ROHSECSCrystalsRB1-125BAG1A
弯插0℃~+70℃ 1 Gold Phosphor bronze RJ45 Jack Right Angle Shielded With LED 弯插 Ethernet Connectors / Modular Connectors (RJ45 RJ11) ROHSWIZNETEthernet Connectors / Modular Connectors (RJ45 RJ11)
README
README.mdDECstation 2040
1.0 Introduction
This document outlines the DECstation 2040, a RP2040 based DECstation 3000 emulator that can run DECWindows. A summary of features:
Hardware:
- RP2040, running at 1.8v/300 MHz
- 32 MB of PSRAM
- 8 MB SPI flash
- uSD card socket
- Monochrome VGA at 1024 x 864
- Ethernet RMII PHY support (socket on rev 1.5, integrated in rev 2.1)
Software:
- 4 port PSRAM PIO engine
- PIO driven VGA, with seperate 16x16 cursor plane overlay
- USB HID to DECWindows keyboard and mouse
1.1 Software
PIO:
The PSRAM/HyperRAM PIO engine provides 42/32 MB/s (write/read) of memory bandwidth. Further, four PIO engines are used to provide four seperate read/write memory ports. This allows independent memory access for the emulated CPU, video DMA, and receive/send Ethernet traffic. Note that all 32 instruction slots are used.
The video PIO engine can support up to a sysclk/2 pixel rate. Thus, for the 300 MHz sysclk typically used, it is possible to run 1080p60 at a pixel rate of 148.5 MHz. The default video rate is 1024 x 768 @ 70Hz, as this matches the screen used for development and the pixel rate is an integral divisor from sysclk. Only five PIO instruction slots are used.
DMA:
To drive the video PIO engine, five DMA channels are used. They are allocated as follows:
- ctrl_dma_chan - points to DMA channel command packets
- data_dma_chan - executes DMA command packets
- ps_read_chan - points to PSRAM read data buffer
- inc_dma_chan - used to generate loop counter indices
- cur_inc_dma_chan - used as cursor loop counter
This project uses the RP2040 DMA sniffer to dynamically generate PSRAM addresses, which eliminates the need to have a per-line PSRAM command packet. Further, it uses the inc_dma_chan to enable DMA command loops, eliminating per-line DMA commands needed to send commands to the PIO pixel and PSRAM PIO engines. This makes the amount of memory needed to drive video independent of the display format. Currently, 86 DMA command packets are used vs. approximately 2250 required for 1080p if a per-line DMA structure was used.
In order to eliminate the latency from when the PSRAM PIO engine FIFO has read data, and its delivery to SRAM, we use the ps_read_chan. This channel is chained to after a PSRAM DMA command is executed. Without this channel, the PSRAM PIO engine FIFO would be not be emptied until the next DMA command is executed. This impacts the non-video PSRAM channels, as they must wait unitl the video PSRAM command is complete.
USB:
The USB HID code supports (at least) two keyboard/mouse combo types: Rii mini X1 (model: RT-MWK01), purchased at MicroCenter, and Logitech K830.
Emulator:
Dmitry's code at http://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard was modified to support the RP2040, as well as adding support for video and USB mouse/keyboard input. With overclocking and running the assembly language version of the CPU emulator, Dmitry's Linux image reports a BOGOMIPS rating of 13.44.
2.0) Getting started
2.1) Hardware
Build either rev 1.5 or 2.1, using the appropriate emu_brd directory. Please note that rev 2.1 is still undergoing Ethernet debug, and has exhibited significant packet drops. I use JLCPCB for board fabrication, and there are Digikey BOM spreadsheets in doc/bom. Recommend building two boards: one to use as a 1.8v CMSIS debugger, and the other as the target. Feel free to only populate the RP2040 related components on the CMSIS debugger.
The surface mount parts aren't too troublesome - I find the PSRAM BGA to be much easier to solder than the RP2040 QFN. My technique is to use a hot-air SMT rework tool. Recommended assembly steps:
- Solder the voltage regulator, check for 1.8v and 3.3v when done.
- Solder all of the passives, the RP2040, flash, and the USB connectors if building rev 2.1. (Note that two bodge wires are needed to connect J5 and J11 D+/D- as my assumption that USB-A could serve as non-host connector was incorrect). When done, use blink_bringup (below) to check connections. (Edit blink.c to enable the pins to check).
- Solder the HyperRAM chip, run mem_test to check connections.
- Solder the voltage translator chips, edit blink.c and run to check connections.
- Solder the connectors.
For rev 1.5: Needs modified waveshare LAN8722 board. In addition to the modifications outlined at: https://github.com/maximeborges/pico-rmii-ethernet, pin 13 of the 7 x 2 connector (originally NC) is used as VDDIO for the LAN8722 chip. To make this modification, cut the existing connection between LAN8722 pin 9 to 3.3v, and route pin 9 to pin 13 of the connector. This allows the use of 1.8v I/O from the DECstation 2040 board. Also needed is a 6 pin header to VGA connector. See rev 2.1 schematic for VGA pins needed.
2.2) Software
Start with: http://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard Download the images, particularly the ultrix.gui image. This should be placed on a FAT32 for uMIPS. Edit uc_main.c to select which image to run.
Next, go to where this README.md is stored. Then set current directory to sw. Edit the "source_this" file to reflect the location of the Pico SDK, and source this file to set the PICO_SDK environment variable for the current session.
A good place to start is with the blink_bringup directory. CD to this, and do:
cmake -B build -S .
Build software via
./build.sh
This will generate an .elf file in build/src. Use picotool to load this onto the target board. After rebooting, should get "hello, world" on USB serial, as well as on the hardware serial port. A 500 Hz square wave should be present on GPIO21 (ret_clk). This can be changed via editing the src/blink.c file. I use this tool incrementally while soldering the board, to verify connectivity.
Next, build the CMSIS debugger. CD to the picoprobe directory and build with:
cmake -B build -DCUSTOMPROBE=1 make -C build
Program with
sudo picotool load build/customprobe.elf
Now go to the psram directory and do:
cmake -B build -S .
Build software via
./build.sh
This will generate most of the available packages. Of interest are:
- mem_test - a simple memory tester
- fb_test - test program for the frame buffer library
- fb_mem_test - memory test with frame buffer enabled
- pico-rv32ima - RISC-V linux emulation
- uMIPS - DECstation emulation
- pico_rmii_ethernet_httpd - test program for RMII.
There are shell scripts to load the above:
- cl_sram.sh - sd command line
- eth_sram.sh - ethernet test
- fb_flash.sh - framebuffer library test, run from flash
- fb_sram.sh - framebuffer library test, run from SRAM
- fbm_flash.sh - memory test with framebuffer enabled, run from flash
- fbm_sram.sh - memory test with framebuffer enabled, run from SRAM
- mt_sram.sh - memory test, run from SRAM
- mt_flash.sh - memory test, run from flash
- um_flash.sh - uMIPS emulator, run from flash
- um_sram.sh - uMIPS emulator, run from SRAM
Running the code: Connect the debugger board to the SWD port on the target. Start the CMSIS debugger via sw/start_cmsis.sh. Execute one of the scripts above. This will load the program into RP2040 SRAM and start it.
If you wish to run from flash, comment out the no_flash line in the source CMakeLists.txt. Note that the uMIPS emulator requires "copy_to_ram" to be enabled when running from flash.
3.0) Commentary
This project has been a voyage of discovery. The first doc/build_log.txt entry was on 23-mar-2023, but I'd been thinking of building a business card ever since I'd read Dmitry's LinuxCard web page. I've learned how to use the RP2040 PIO engines and the DMA subsystem to push pixels. I'm amazed at how flexible and capable the RP2040 has turned out to be. Hats off to the RP2040 designers!
Most enjoyable moments:
- When the PSRAM PIO engine finally ran the memory test overnight.
- When the second solution to the problem of how to get the DMA subsytem to do a counted loop actually worked without killing SD card access.
- When the DMA cursor read data during blanking worked, giving smooth cursor movement.
Less than enjoyable moments:
- Realizing the "optimization" of reordering data on the PSRAM to improve layout was wrong, after submitting the design to JLCPCB.
- Realizing that the first flash part chosen didn't support "Continuous Read Mode". On the other hand, this did force me to learn how to do SRAM builds, speeding up development.
- Having the wrong footprint for the level translator on rev 1.3.
- Finding out that Digikey no longer stocked the Ethernet connector on rev 2.0, after submitting PCB. Related - the PSRAM was out of stock, so clicked on the recommended alternative. Was disappointed when the box showed up, and it was the waferscale part. Tiny, but unsolderable.
4.0) Next steps
- Use the ps_get_buf DMA subroutine to setup the cursor PSRAM command. This will reduce the memory footprint.
- Write the lance Ethernet emulation code for uMIPS.
- Port MicroMac https://axio.ms/projects/2024/06/16/MicroMac.html
5.0) Acknowledgements
This project would not exist without Dmitry's excellent LinuxCard project, at: http://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard
Inspiration and software framework: https://github.com/Wren6991/PicoDVI.git
DEC mouse and keyboard support used code from: https://hackaday.io/project/19576-dec-mouse-adapter and https://github.com/pkoning2/lk201emu.git
Ethernet: https://github.com/maximeborges/pico-rmii-ethernet
Also, Hackaday.com for articles on SMT soldering, USB-C, etc., giving me confidence that I could actually do this project!
Pictures/video
A selection of pictures from doc/photos follows. See doc/photos for pictures of previous versions and how the emulated video output progressed from first pixel to current.
Video showing Xmaze/worms running
Rev 1.5
Rev 1.5 running
Rev 2.1
Rev 2.1 running with Logitech keyboard
Helper cat in the parts box
Parts
86| Qty | Value | Footprint | References |
|---|---|---|---|
| 16 | 100n | Capacitor_SMD:C_0603_1608Metric | C6, C7, C8, C9, C11, C12, C13, C14, C15, C16, C20, C21, C23, C24, C25, C27 |
| 7 | 10k | Resistor_SMD:R_0603_1608Metric | R21, R22, R24, R25, R26, R27, R28 |
| 5 | 10u | Capacitor_SMD:C_0805_2012Metric | C1, C2, C3, C17, C19 |
| 4 | 49.9 | Resistor_SMD:R_0603_1608Metric | R29, R31, R34, R35 |
| 4 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J3, J6, J7, J10 |
| 4 | MountingHole | MountingHole:MountingHole_2.7mm_M2.5 | H1, H2, H3, H4 |
| 3 | 10 | Resistor_SMD:R_0603_1608Metric | R18, R19, R20 |
| 3 | 10K | Resistor_SMD:R_0603_1608Metric | R6, R8, R12 |
| 3 | 280 | Resistor_SMD:R_0603_1608Metric | R9, R10, R11 |
| 2 | 1k | Capacitor_SMD:C_0603_1608Metric | R2, R5 |
| 2 | 1u | Capacitor_SMD:C_0603_1608Metric | C10, C18 |
| 2 | 27 | Capacitor_SMD:C_0603_1608Metric | R3, R4 |
| 2 | 27p | Capacitor_SMD:C_0603_1608Metric | C4, C5 |
| 2 | 330 | Resistor_SMD:R_0603_1608Metric | R32, R33 |
| 2 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2, J8 |
| 2 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mm | JP3, JP4 |
| 1 | 0.022u/1KV | Capacitor_SMD:C_0603_1608Metric | C28 |
| 1 | 10uf | Capacitor_SMD:C_0805_2012Metric | C22 |
| 1 | 12.1k | Resistor_SMD:R_0603_1608Metric | R30 |
| 1 | 33 | Resistor_SMD:R_0603_1608Metric | R23 |
| 1 | 470pf | Capacitor_SMD:C_0603_1608Metric | C26 |
| 1 | D+_TP | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP1 |
| 1 | D-_TP | TestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mm | TP2 |
| 1 | DE15_Receptacle_HighDensity_MountingHoles | emu_brd:CONN_L77HDE15SD1CH4FVGA_AMP | J1 |
| 1 | DNF | Capacitor_SMD:C_0603_1608Metric | R1 |
| 1 | DNP | Resistor_SMD:R_0603_1608Metric | R7 |
| 1 | ECS-120-20-23B-TR | emu_brd:XTAL_ECS-120-20-23B-TR | Y1 |
| 1 | FerriteBead | Inductor_SMD:L_0603_1608Metric | FB1 |
| 1 | LAN8742A | Package_DFN_QFN:VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias | U6 |
| 1 | Micro_SD_Card_Det_Hirose_DM3AT | Connector_Card:microSD_HC_Hirose_DM3D-SF | J4 |
| 1 | PSRAM_32M | emu_brd:BGA25C100P5X5_800X600X120N | U4 |
| 1 | RB1-125BAG1A | emu_brd:WIZNET_RB1-125BAG1A | J9 |
| 1 | RP2040 | RP2040_minimal:RP2040-QFN-56 | U3 |
| 1 | TLV751180330PDSQR | emu_brd:SON40P200X200X80-11N | U1 |
| 1 | TXS0108ERGYR | emu_brd:RGY20_3P05X2P05 | U5 |
| 1 | TXV0106BQBR | Package_DFN_QFN:DHVQFN-16-1EP_2.5x3.5mm_P0.5mm_EP1x2mm | U7 |
| 1 | USB_A | Connector_USB:USB_A_Molex_67643_Horizontal | J5 |
| 1 | USB_B_Micro | RP2040_minimal:USB_Micro-B_Amphenol_10103594-0001LF_Horizontal_modified | J11 |
| 1 | W25LQ64E | emu_brd:WIN_ZP-8_WIN | U2 |
More from rscott2049/DECstation2040
1- 2 layers52 × 90 mm

Similar boards
- 4 layers57.7 × 27 mm

SYZYGY PHY
rustbox/router
Use ARJM11C7-502-KB-EW2 on mouser Tab up, so would have to be placed on the reverse side of the PCB $3.09 @ 10
49 parts - 6 layers86.4 × 54.6 mm

BeagleBone Black.unrouted
The-OpenROAD-Project-Attic/SA-PCB
Annealing-based PCB placement tool
275 parts44BSD-3-Clause - 2 layers63.5 × 45.7 mm

Fathom x
bluerobotics/fathom-x
Ethernet capable tether interface board for the Fathom tether.
25 parts5MIT - 6 layers89.4 × 69 mm

- 2 layers

- 2 layers102.8 × 40.5 mm

Stm32-led controller
Joseph-Ladino/stm32-led-controller
Custom STM32 based led strip controller targeting WS2815. Features include Ethernet, WiFi, USB-C (USB 2.0) and a load switch for disconnecting the strip's power
67 parts2 - 6 layers42.2 × 61.4 mm

Dap proto board full
tsar-boomba/dap-proto-board-full
The culmination of all of my learning during the Spring '26 semester. All the way from making a simple dev board for the TAD5212 DAC, to making a RP2350 board, and now this. Everything combined on one 6-layer board.
102 parts1 - 4 layers49 × 40 mm

Blackmagic
aeremin/firefly_zephyr
Firmware (Zephyr RTOS / nRF Connect SDK, with Pigweed libraries), custom boards and KiCad hardware projects for a few small nRF52-based devices.
63 parts
Questions
How big is the Emu brd PCB?
It measures 52 × 90 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Emu brd use?
86 parts, built around the RP2040, LAN8742A-CZ, TLV751180330PDSQR and TXS0108ERGYR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Emu brd KiCad files?
From the rscott2049/DECstation2040 repository on GitHub, at the commit this page was made from: the board is emu_brd_rev_2.1/emu_brd.kicad_pcb and its schematic emu_brd_rev_1.5/emu_brd.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Emu brd design in my own project?
Its repository publishes it under the BSD-3-Clause licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).




