MMO-CHIP: From Microscope to Verilog in an hour
giulioz
Gulaschprogrammiernacht 24 (GPN24) · Day 4 · ZKM Vortragssaal
Overview
In the GPN24 talk "MMO-CHIP: From Microscope to Verilog in an hour," giulioz introduces a groundbreaking open-source tool designed to dramatically accelerate and simplify the reverse engineering of integrated circuits (ICs). The project, dubbed MMO-CHIP, aims to transform raw microscope images of silicon dies into functional hardware description language (HDL) like Verilog, ideally within an hour. This ambitious goal addresses a critical challenge in digital preservation and emulation: understanding the proprietary, often undocumented logic embedded in vintage hardware.

Key moments
- 0:00 Introduction and motivation for hardware preservation
- 4:30 Decapping chips for physical reverse engineering
- 14:00 Manual workflow pain points with Inkscape
- 23:00 Introducing MMO-CHIP: a collaborative web tool
- 26:30 MMO-CHIP demo: handling large images and wires
- 30:00 MMO-CHIP demo: automatic cell logic inference
- 47:00 Machine learning-powered wire drawing with via snapping
- 55:00 Q&A: Tool's error detection and completeness
MMO-CHIP: From Microscope to Verilog in an hour
Speakers: giulioz
Conference: GPN24
YouTube: https://www.youtube.com/watch?v=5211iYEqnzo
Overview
In the GPN24 talk "MMO-CHIP: From Microscope to Verilog in an hour," giulioz introduces a groundbreaking open-source tool designed to dramatically accelerate and simplify the reverse engineering of integrated circuits (ICs). The project, dubbed MMO-CHIP, aims to transform raw microscope images of silicon dies into functional hardware description language (HDL) like Verilog, ideally within an hour. This ambitious goal addresses a critical challenge in digital preservation and emulation: understanding the proprietary, often undocumented logic embedded in vintage hardware.
The speaker, known for his work in reverse engineering old hardware, particularly in music technology and video games, highlights the necessity of this tool. Many classic devices rely on custom silicon whose internal workings remain a mystery, preventing accurate emulation and long-term preservation. MMO-CHIP tackles this by providing a collaborative, web-based platform that automates much of the arduous manual process, leveraging modern web technologies and machine learning to infer the underlying logic from physical chip layouts.
This talk is significant for the security and preservation communities as it democratizes access to advanced hardware reverse engineering techniques. By streamlining the path from physical silicon to an actionable logical representation, MMO-CHIP not only safeguards our digital heritage but also offers a powerful new avenue for hardware analysis, potentially aiding in the discovery of vulnerabilities or the verification of intellectual property in complex integrated circuits. The shift from a laborious, error-prone manual workflow to an automated, collaborative one represents a substantial leap forward in the field.
Background
▶ Watch: Introduction and motivation for hardware preservation (0:00)
The motivation behind MMO-CHIP stems from the speaker's extensive experience in preserving and emulating old hardware, particularly musical instruments and video game consoles. Many of these devices, such as the Roland GP8000 synthesizer or various digital pianos, rely on custom DSP chips, sample players, or FM synthesizers whose internal logic is proprietary and undocumented. Without understanding how these chips work, accurate, "bit-perfect" emulation for future generations is impossible, leading to the irreversible loss of unique sounds and gaming experiences.
Initially, giulioz and his open-source group, "the usual suspects," employed a black-box approach. This involved external probing with tools like logic analyzers and sending test programs to observe hardware reactions, as successfully done for the GP8000's DSP chip. However, this method proved inadequate for highly custom, fixed-function chips found in devices like digital pianos, where external observations yielded insufficient information to infer complex, non-programmable logic.
This limitation necessitated a more invasive approach: de-capping chips. This process involves chemically or thermally removing the protective epoxy packaging to expose the bare silicon die. Under a decent optical microscope, features like tiny wires, connections, and individual transistors become visible. The speaker explained that these chips are often built using CMOS standard cells or gate arrays. These are pre-designed logic blocks (e.g., NAND gates, NOR gates, multiplexers, AOI – AND-OR-Inverter gates) that designers place and connect with metal wires (typically aluminum) to form a complete circuit. The goal of hardware reverse engineering is to recover this netlist – a list of cells and how they are interconnected – and then convert it into a hardware description language like Verilog for emulation or analysis.
The speaker's previous workflow for this process was largely manual and highly inefficient. It involved importing gigapixel images (often exceeding 300MB, sometimes 1GB) into Inkscape, a vector graphics editor. Annotations for wires were drawn as polylines, and cells were marked with rectangles. Custom JavaScript scripts then processed these SVG annotations to extract cell images and infer connections. This approach, while functional for initial experiments on smaller chips, suffered from severe limitations:
- Inkscape's Performance: It struggled with large images, crashing with anything over 400MB due to memory limitations, forcing a reduction in resolution and loss of detail.
- Inkscape's Suitability: Designed for artistic drawing, it was ill-suited for technical annotation. Wires, which are graphs with bifurcations, had to be drawn as multiple segments and manually grouped, leading to errors. There was no easy way to draw multiple parallel wires or add structured metadata (e.g., layer information). The line tool cursor on Mac was also miscalibrated, adding to frustration.
- Manual Cell Analysis: Even after identifying cells, understanding their internal logic required manually tracing every transistor and connection from screenshots into a schematic, a process that could involve 150+ transistors for a 4-bit adder, making it incredibly painful and error-prone.
Existing open-source tools like Date were found to be unmaintained or difficult to use for large chips, and Droute, while promising, was Windows-only, written in .NET, and designed for a very niche audience, making it less approachable. Proprietary tools exist but are kept secret, highlighting a significant gap in the open-source ecosystem for this critical task. Recognizing these challenges, giulioz embarked on building MMO-CHIP to address the rising complexity of his projects and introduce modern features like computer vision, machine learning, and collaborative workflows.
Key Findings
▶ Watch: Manual workflow pain points with Inkscape (14:00)
The core contribution of this talk is the introduction of MMO-CHIP, an innovative, open-source platform specifically designed to overcome the limitations of traditional hardware reverse engineering. The "MMO" in its name signifies its Massively Multiplayer Online and collaborative nature, allowing multiple users to work on the same chip simultaneously via a web-based interface.
Key findings and contributions of MMO-CHIP include:
- Web-based and Collaborative: MMO-CHIP operates as a web application, enabling users to share a link and collaborate on chip annotations in real-time. This significantly accelerates large-scale projects by distributing the workload among a community.
- Exceptional Performance and UX: The tool is engineered for speed and responsiveness, addressing the UI lag and crashes common with previous methods. It offers a specialized user experience tailored for annotating cells and wires, featuring modern shortcuts and intuitive interaction.
- End-to-End Verilog Generation: Beyond just annotation, MMO-CHIP is an end-to-end solution. It processes the annotations and automatically generates low-level Verilog code, which can then be refined, simulated, or used for emulation. For combinatorial logic, it produces
assignstatements, and for more complex structures, it generates Verilogmoduledefinitions. - Support for Gigapixel Images: A major breakthrough is its ability to handle extremely large die shots (1GB and beyond) without memory issues. This is achieved through a tile-based streaming system, similar to Google Maps, where only the necessary sections of the image are loaded and rendered as the user pans and zooms.
- Advanced Annotation Rendering: To maintain performance with potentially millions of annotations, MMO-CHIP uses a tiled rendering approach for vector graphics on a JavaScript canvas, inspired by tools like Figma. This filters what is rendered in each tile, preventing UI slowdowns.
- Machine Learning-Powered Assistance: MMO-CHIP integrates machine learning, specifically a UNet model, to automate tedious tasks. It can recognize vias (connections between layers) on the chip with high accuracy. This capability is then used to provide snap-to-via functionality, greatly speeding up wire drawing and cell recognition. The model was trained on 6,700 manually annotated vias and can infer hundreds of thousands of vias from a single die photo in minutes.
- Automated Cell Logic Inference: The tool incorporates a sophisticated pipeline to infer the boolean logic of standard cells directly from their physical layout. By analyzing the arrangement of diffusion, polysilicon, metal, and vias, it can identify transistors, reconstruct pull-up and pull-down networks, and derive the corresponding boolean expression for combinatorial gates.
- Interactive Schematic Generation: MMO-CHIP can automatically generate both transistor-level and abstract logic schematics for individual cells, aiding human understanding and verification. It uses algorithms like ELK (Eclipse Layout Kernel) for logical placement.
MMO-CHIP represents a significant leap from manual, error-prone processes to a semi-automated, intelligent, and collaborative approach, making complex hardware reverse engineering more accessible and efficient.
Technical Deep Dive
▶ Watch: MMO-CHIP demo: handling large images and wires (26:30)
MMO-CHIP is architecturally composed of a React frontend, a Node.js backend, and a Python backend (specifically for machine learning tasks), communicating to deliver a seamless experience. Currently, data is stored locally in JSON files, but the design allows for migration to a proper database for larger deployments.
The primary technical challenges addressed involve handling massive image data and automating the inference of logic from physical layouts.
1. Handling Huge Images and Annotations:
- Tile-based Streaming: To manage gigapixel die shots (e.g., 1GB images that would crash Inkscape), MMO-CHIP implements a pyramid of different levels of zooms and small tiles system, analogous to Google Maps. When a new die shot is loaded, it's automatically split into these tiles, which are then streamed from disk or network only as needed when the user pans or zooms. This eliminates "out of memory" errors.
- Tiled Annotation Rendering: Similarly, annotations (wires, cells) are rendered on tiles using a JavaScript canvas. This approach, akin to Figma, filters and renders only the annotations relevant to the currently visible tiles, optimizing performance even with potentially millions of graphical elements.
2. Netlist Recovery and Cell Annotation:
- Specialized Drawing Tools: The frontend provides precise tools for annotating wires and cells. Wire drawing supports midpoint routing, automatically connecting segments and highlighting entire nets on double-click, eliminating the manual grouping issues of Inkscape. Undo functionality is context-aware.
- Cell Layout Assistance: For annotating cells, which often follow regular patterns, MMO-CHIP offers guides that can be set, duplicated, and snapped to, speeding up the process of outlining rows and columns of cells.
- "Merge Cell" Feature: A visual comparison tool, dubbed "Tinder for standard cells," allows users to quickly identify and merge similar cell types, streamlining the cataloging process.
3. Automated Cell Logic Inference Pipeline:
This is the core of MMO-CHIP's intelligence, converting physical layout into boolean logic. The process is rooted in understanding CMOS (Complementary Metal-Oxide-Semiconductor) technology:
- MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors): The fundamental building blocks. These are P-type (P-MOS) and N-type (N-MOS) transistors, acting as voltage-controlled switches. They are arranged in pull-up networks (P-MOS transistors connected to power/VDD) and pull-down networks (N-MOS transistors connected to ground/GND). These networks are always complementary, ensuring that the output is either a logical 1 or 0.
- Physical Layers: The chip layout consists of distinct material layers:
- Diffusion: Doped P or N areas forming the source and drain of transistors.
- Polysilicon: Lines forming the gate of transistors.
- Metal: Wires for interconnections.
- Vias: Connections between different layers (e.g., metal to diffusion, metal to polysilicon, metal to metal).
- Transistor Identification: A transistor is formed wherever a polysilicon line crosses a diffusion area.
- Inference Algorithm:
- Clipper Algorithm: Used to perform boolean operations on polygons, splitting diffusion areas into source, drain, and gate regions based on polysilicon crossings. This identifies individual transistor locations.
- Net Computation (Unfine Algorithm): This algorithm identifies electrically connected regions (nets) by analyzing overlapping shapes of diffusion, metal, and vias. It infers the type of diffusion (P-type or N-type) by observing connections to power/ground and the relative size of P-MOS (often larger than N-MOS for electrical reasons).
- Transistor Emission: A list of transistors is generated, detailing their type (P-MOS/N-MOS) and connections for gate, source, and drain.
- Pull-up/Pull-down Network Reconstruction: A flood fill algorithm starts from power/ground connections, expanding boundaries to identify complete CMOS domains (sections implementing a logic gate). The intersection point is identified as the output.
- Boolean Expression Recovery: Within each CMOS domain, the algorithm applies a fundamental rule: parallel connections in a network correspond to OR logic, while series connections correspond to AND logic. This allows for the immediate generation of an Abstract Syntax Tree (AST) representing the boolean function of the gate. The complementary nature of pull-up and pull-down networks provides a sanity check.
4. Verilog and Schematic Generation:
- Verilog Output: By combining the derived boolean expressions for each cell with the overall netlist (cell-to-cell connections), MMO-CHIP generates basic Verilog code. Simple combinatorial functions are translated into
assignstatements, while more complex logic or structures requiring human interpretation are emitted as Verilogmoduledefinitions, prompting further analysis. - Schematic Visualization:
- Transistor-level Schematic: A simple vertical placement algorithm visualizes the individual P-MOS and N-MOS transistors and their interconnections.
- Logic Schematic: For higher-level understanding, the tool uses the ELK (Eclipse Layout Kernel) algorithm, an open-source graph layout library, to draw abstract logic gates and their connections in a clear, organized flowchart format.
Limitations: While powerful for combinatorial logic (NAND, NOR, adders), the automated inference currently struggles with sequential logic elements like latches, flip-flops, transmission gates, or circuits with feedback loops. These require human reasoning and interpretation, though MMO-CHIP's generated schematics aid significantly in this manual analysis.
5. Machine Learning for Via Recognition:
- Problem: Manual wire tracing is still tedious.
- Solution: Vias have a highly recognizable geometric pattern and are crucial connection points. A UNet convolutional neural network, an architecture from 2015 still effective for segmentation, is trained to identify them.
- Training: A dataset of 6,700 manually annotated vias was used. Training took only 10 minutes on a MacBook.
- Result: The model can infer approximately 350,000 vias from a single die photo, marking each with a red spot. This output is then used to enable snap-to-via functionality in the wire-drawing mode, drastically speeding up the annotation process for complex bus structures. While wire recognition itself remains challenging due to intersections and complexity, via recognition provides a strong foundation for future automation.
Demo / Proof of Concept
▶ Watch: MMO-CHIP demo: automatic cell logic inference (30:00)
The speaker provided a live demonstration of MMO-CHIP, showcasing its core functionalities and the impact of its design choices.
- High-Performance Pan and Zoom: The demo began by smoothly navigating a large die photo, demonstrating the effectiveness of the tile-based streaming and rendering. The UI remained responsive even when rapidly zooming in and out or panning across the gigapixel image.
- Intuitive Wire Drawing: Giulioz drew a wire, highlighting the midpoint routing feature where clicks automatically extend and connect wire segments. He then demonstrated how double-clicking a segment highlights the entire net, making it easy to see all connected parts. The undo feature was shown to be context-aware, undoing only the current drawing operation. The wires also maintain a consistent screen-space width regardless of zoom level, ensuring visibility.
- Efficient Cell Annotation: For annotating standard cells, which often lie in regular grids, the speaker showed how to set guides (vertical and horizontal lines) that snap to cell boundaries. These guides could then be easily copied and duplicated across the chip, allowing rapid outlining of entire rows or columns of cells. The familiar shortcuts for selection and duplication (e.g., Option-drag on Mac) were also demonstrated.
- "Merge Cell" Feature: The "Tinder for standard cells" interface was shown, allowing users to visually compare cropped images of different annotated cells. By checking for differences and similarities, users can quickly merge identical cell types into a single definition, streamlining the cell cataloging process.
- Automated Cell Reverse Engineering: A key part of the demo involved reverse engineering a single cell. The speaker manually drew the distinct layers: diffusion, polysilicon, metal, and vias (contacts) directly on the cell image. As these layers were drawn, the tool automatically inferred the underlying logic. It identified the different nets, the P-type and N-type transistors, and then generated:
- A transistor-level schematic showing the individual P-MOS and N-MOS transistors and their connections.
- A logic schematic (e.g., an OR gate in the demo), representing the abstract boolean function of the cell. This demonstrated the power of the automated inference pipeline, transforming raw physical layout into understandable logic.
- Machine Learning-Powered Via Snapping: This was a particularly impactful part of the demo. The UI displayed red spots marking the 350,000 vias automatically recognized by the UNet model. When entering a multi-wire drawing mode, the cursor automatically snapped to these vias. This allowed the speaker to rapidly draw an entire bus of parallel wires with just a few clicks, significantly reducing the manual effort and precision required compared to drawing each wire individually. The snapping also improved single-wire drawing accuracy.
- Verilog Output Example: The speaker showed an example of the generated Verilog code, specifically for an address encoder chip he had previously worked on. The combinatorial logic was translated into clear
assignstatements, and more complex sections were emitted as modules, demonstrating the practical utility of the tool for generating functional HDL.
The demo effectively illustrated how MMO-CHIP addresses the pain points of traditional reverse engineering, offering a faster, more accurate, and less tedious workflow through specialized tools and intelligent automation.
Defensive Implications
▶ Watch: Q&A: Tool's error detection and completeness (55:00)
While MMO-CHIP is primarily developed for digital preservation and emulation, its capabilities have significant, albeit indirect, defensive implications in the broader security landscape.
- Hardware Security Audits: The ability to quickly and accurately extract a netlist and logical representation from a physical chip empowers security researchers to perform more thorough hardware security audits. This can be crucial for verifying intellectual property, detecting hardware Trojans (malicious modifications embedded during manufacturing), or identifying backdoors in critical systems where trust in the silicon is paramount. By understanding the chip's true function, discrepancies with documented specifications can be uncovered.
- Supply Chain Integrity: In an era of complex global supply chains, the ability to reverse engineer chips provides a mechanism for independent verification. Organizations can use such tools to analyze components from various suppliers, ensuring they match trusted designs and haven't been tampered with, thereby bolstering supply chain security.
- Understanding Legacy Systems and Vulnerabilities: Many critical infrastructure systems still rely on older, custom hardware. MMO-CHIP can help researchers understand the intricate workings of these legacy chips, potentially uncovering previously unknown vulnerabilities or design flaws that could be exploited. This knowledge is essential for developing targeted defenses or secure migration strategies.
- Preventing Obsolescence and Knowledge Loss: The speaker's primary motivation—digital preservation—is a defensive act against the loss of historical and technological knowledge. By enabling bit-perfect emulation of vintage hardware, MMO-CHIP ensures that the design patterns, "cool tricks," and even potential vulnerabilities of past hardware generations are not forgotten. This historical context can inform more robust and secure hardware designs in the future, learning from past mistakes and innovations.
- Democratization of Hardware Analysis: By making hardware reverse engineering more accessible and less reliant on highly specialized, manual labor, MMO-CHIP lowers the barrier to entry for researchers. This wider participation can lead to more eyes on more hardware, increasing the likelihood of discovering security-relevant insights that might otherwise remain hidden.
- Informing Secure Design Practices: The process of decomposing complex chips into their fundamental logic gates and understanding their physical implementation can feed directly back into modern hardware design. Designers can gain insights into how past chips were built, identify common pitfalls, and adopt more secure-by-design principles, especially concerning custom logic blocks and their interaction with standard components.
In essence, by illuminating the "black box" of silicon, MMO-CHIP provides a powerful defensive capability against ignorance, obsolescence, and potential malicious intent hidden within the physical layers of integrated circuits.
Key Takeaways
- Custom Tooling is Essential: When existing, generic tools (like Inkscape) or niche proprietary solutions fall short, building specialized, custom tooling is often the only way to tackle complex, unique technical challenges effectively.
- Leverage Human-Machine Synergy: The most efficient approach combines machine automation for tedious, repetitive tasks (e.g., ML-powered via recognition, automated logic inference for combinatorial gates) with human intelligence for complex reasoning and interpretation (e.g., understanding feedback loops, latches, or D flip-flops).
- Effective Visualization is Critical: For intricate technical problems like reverse engineering silicon, clear and interactive visualization of data (e.g., die images, annotations, schematics, logic diagrams, code with warnings) is paramount for understanding, debugging, and making informed decisions.
- Digital Preservation Drives Innovation: The seemingly niche goal of preserving old hardware can be a powerful catalyst for developing cutting-edge tools and techniques that have broader applications, including hardware security analysis and modern design verification.
- Collaboration Accelerates Complex Projects: Web-based, collaborative platforms like MMO-CHIP enable distributed effort across communities, significantly accelerating the progress of large-scale reverse engineering projects that would be unfeasible for individuals.
About the Speaker(s)
giulioz is a passionate and dedicated hardware reverse engineer with a particular focus on the preservation and emulation of vintage technology. His work primarily revolves around old music technology and video game consoles, driven by a desire to prevent the loss of information buried within proprietary silicon. He aims to enable "bit-perfect" emulation of these devices for future generations.
giulioz is an active member of "the usual suspects," an open-source group dedicated to converting old hardware devices, such as the Roland GP8000, into modern software plugins for music production. He has previously shared his expertise at other conferences, including a talk at a past Congress about reverse engineering the bytecode for DSP chips, and another at 38C3 detailing his earlier chip reverse engineering workflow. His work with MMO-CHIP exemplifies his commitment to advancing the field of hardware analysis through open-source innovation and community collaboration.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Genuine tool development solving a real problem in hardware RE. giulioz built something useful, showed it working, and released it. The ML-assisted via recognition and automated cell logic inference are clever engineering, not research theater. Falls short of 5 because the hard problems (sequential logic, feedback loops) are explicitly punted to humans.
Heather Calloway (CISO) — SOLID
Clever open-source tooling for silicon reverse engineering, primarily serving the digital preservation and emulation community. For most enterprise security programs, this is interesting background on hardware analysis capabilities but not actionable.