This repository provides a library to parse .brd
files generated by Cadence's Allegro suite1 of PCB design tools.
It also contains:
- A web application for viewing
.brd
files - A mediocre Qt GUI for viewing
.brd
files - A mediocre command line tool that opens
.brd
files and outputs some random info to verify it was able to read it.
The main goal of this library is to write an example decoder that can eventually be integrated into other tools.
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
$ 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
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:
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
$ 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. ↩