This repository provides a library to parse .brd
files generated by Cadence's Allegro suite1 of PCB design tools. It also contains a few tools to demonstrate using the core library, such as a GUI viewer.
The main goal of this library is to write an example decoder that can eventually be integrated into other tools. However, to assist with the development, there is a (mediocre) GUI viewer that can show what was parsed in the files.
The only required dependency is Boost, at least version 1.71.
- On Mac, Boost can be installed using Brew:
brew install boost
- On Ubuntu, Boost can be installed using Apt:
sudo apt install libboost-dev
- On Windows, Boost can be installed in a variety of ways, but one option is with Chocolatey:
choco install boost-msvc-14.3
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
$ git clone [email protected]:jeffwheeler/brd_parser.git
$ cd brd_parser
$ mkdir build
$ cd build
$ cmake ../src/ -DBUILD_GUI=ON
$ make
The GUI will open a graphical view of a PCB:
$ ./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:
The command line tool will output an HTML file with some random information about the PCB, confirming the file was successfully parsed:
$ ./brd_cli/brd_cli (.brd filename) > out.html
$ ctest -j10 --output-on-failure
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
-
Cadence and Allegro are trademarks of Cadence Design Systems, Inc. ↩