Skip to main content

LUNA: an Amaranth HDL library for USB Simulation Status Documentation Status

LUNA is a toolkit for working with USB using FPGA technology, providing gateware and software to enable USB applications.

Some things you can use LUNA for, currently:

  • Protocol analysis for Low-, Full-, or High- speed USB. LUNA provides gateware that allow passive USB monitoring when combined with Cynthion and Packetry.
  • Creating your own Low-, Full-, High-, or (experimentally) Super- speed USB device. LUNA provides a collection of Amaranth gateware that allows you to easily create USB devices in gateware, software, or a combination of the two.
  • Building USB functionality into a new or existing System-on-a-Chip (SoC). LUNA is capable of generating custom peripherals targeting the common Wishbone bus; allowing it to easily be integrated into SoC designs; and the luna-soc library provides simple automation for developing simple SoC designs.

Some things you'll be able to use LUNA for in the future:

  • Man-in-the-middle'ing USB communications. The LUNA toolkit will be able to act as a USB proxy, transparently modifying USB data as it flows between a host and a device.
  • USB reverse engineering and security research. The LUNA toolkit will serve as an ideal backend for tools like Facedancer; allowing easy emulation and rapid prototyping of compliant and non-compliant USB devices.

Project Structure

This project is broken down into several directories:

  • luna -- the primary LUNA python toolkit; generates gateware and provides USB functionality
    • luna/gateware -- the core gateware components for LUNA; and utilities for stitching them together
  • examples -- simple LUNA-related examples; mostly gateware-targeted, currently
  • docs -- sources for the LUNA Sphinx documentation
  • contrib -- contributed/non-core components; such as udev rules
  • applets -- pre-made gateware applications that provide useful functionality on their own (e.g., are more than examples)

Project Documentation

LUNA's documentation is captured on Read the Docs. Raw documentation sources are in the docs folder.

Related Projects

  • Cynthion: an open source hardware USB test instrument
  • Apollo: the firmware that runs on Cynthion's debug controller and which is responsible for configuring its FPGA
  • Saturn-V: a DFU bootloader created for Cynthion
  • Packetry: software for USB analysis
  • Facedancer: software to create USB devices in Python

Metadata

Release files for luna-usb 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luna-usb 0.2.3
File Size Uploaded
luna_usb-0.2.3.tar.gz 297.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for luna-usb 0.2.3
File Interpreter ABI Platform
luna_usb-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 639.0 kB

Release files / luna_usb-0.2.3.tar.gz

Download URL luna_usb-0.2.3.tar.gz
Size 297.5 kB
Tags Source
SHA-256 checksum
How to use checksums
32958b5e97481d2eb8ce9c8adc784cb44e59f9f07ca860a103272230822c8285
BLAKE2b-256 checksum
How to use checksums
b0830aeb777fec24301dfd17a0d777cdeee7c1d56b41f5f766f95055e4095755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / luna_usb-0.2.3-py3-none-any.whl

Download URL luna_usb-0.2.3-py3-none-any.whl
Size 341.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9daa98063acdfb5d42edc7f1cd274b8d72f35a5734ccd8ce9cc78a8a011f9100
BLAKE2b-256 checksum
How to use checksums
53aa1368ad076cd09ffa7b773f6feab9897cc361facb6b0df33fcceb64b5f116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page