Skip to main content

Amaranth HDL framework for FPGA-based USB solutions

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

luna_usb-0.2.1.tar.gz (297.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

luna_usb-0.2.1-py3-none-any.whl (341.1 kB view details)

Uploaded Python 3

File details

Details for the file luna_usb-0.2.1.tar.gz.

File metadata

  • Download URL: luna_usb-0.2.1.tar.gz
  • Upload date:
  • Size: 297.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for luna_usb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fcc3f272dfdf4339e9fc54bf80b90831a093c38b829be2bcc9fd9adb5c44fc02
MD5 7b78611afcb92a834b33649cbcdbd5ce
BLAKE2b-256 baa745627a244c2eedd19d1093aa8c11e0b5df05ae29f1460884dba7a7204501

See more details on using hashes here.

File details

Details for the file luna_usb-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: luna_usb-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 341.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for luna_usb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 208a153ad52d166e1706774f56c529c239257d0826af9916fea2dfdcb95e53fa
MD5 e088e356aa7b378182f8428f5e45749c
BLAKE2b-256 0b7a0747bf0055f6f521042c8a71a826a0b6469c35082acc1e7da05e670f0d3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page