Skip to content

jeffwheeler/brd_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.brd Parser Tool

This repository provides a library to parse .brd files generated by Cadence's Allegro suite1 of PCB design tools.

It also contains:

  1. A web application for viewing .brd files
  2. A mediocre Qt GUI for viewing .brd files
  3. A mediocre command line tool that opens .brd files and outputs some random info to verify it was able to read it.

Usage

The main goal of this library is to write an example decoder that can eventually be integrated into other tools.

Prerequisites

Dependencies are managed through vcpkg (see src/vcpkg.json). The only required dependency for the library is Boost, at least version 1.71. It is installed via vcpkg.

Qt6 is an optional dependency, used in the GUI viewer only. Qt6 is only required when running cmake with -DBUILD_GUI=ON.

  • On Mac, Qt6 can be installed using Brew: brew install qt6
  • On Ubuntu, Qt6 can be installed using Apt: sudo apt install qt6-base-dev libgl1-mesa-dev

Build

$ git clone [email protected]:jeffwheeler/brd_parser.git
$ cd brd_parser
$ cmake -B build -S src -DBUILD_GUI=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG}/scripts/buildsystems/vcpkg.cmake
$ cmake --build build

Run tools

The GUI will open a graphical view of a PCB:

$ ./build/brd_gui/brd_gui [.brd filename]

For example, opening the BeagleBone AI design (distributed under the terms of the CC-BY-4.0 license) and showing a few layers looks like this:

BeagleBone AI .brd viewed in brd_gui

The command line tool will output an HTML file with some random information about the PCB, confirming the file was successfully parsed:

$ ./build/brd_cli/brd_cli (.brd filename) > out.html

Run tests

$ ctest -j10 --output-on-failure

Decoding Methodology

This library was written with no access any to Cadence software. It was written 100% by hand-decoding the binary file format found in freely-available design files (see test/data/ for examples). I have never once even opened the free Allegro Viewer to assist in decoding these files.

This is the output of hundreds of hours of staring at the binary data in a hex editor and finding patterns.

Footnotes

  1. Cadence and Allegro are trademarks of Cadence Design Systems, Inc.

About

Parse .brd files generated by Allegro

Resources

License

Stars

Watchers

Forks

Languages