# BrdParser **Repository Path**: mbsr/brd-parser ## Basic Information - **Project Name**: BrdParser - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-20 - **Last Updated**: 2025-06-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # .brd Parser Tool This repository provides a library to parse `.brd` files generated by Cadence's [Allegro suite][cadence-allegro][^1] of PCB design tools. It also contains a few tools to demonstrate using the core library, such as a GUI viewer. ## Usage 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. ### Prerequisites The only dependency is [Qt6][qt6], which is used in the GUI viewer only. * 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 GCC >= 12 or Clang is required. ```shell $ git clone git@github.com:jeffwheeler/brd_parser.git $ cd brd_parser $ mkdir build $ cd build $ cmake ../src/ $ make ``` ### Run tools The GUI will open a graphical view of a PCB: ```shell $ ./brd_gui/brd_gui [.brd filename] ``` For example, opening the [BeagleBone AI design][bb-ai] (distributed under the terms of the [CC-BY-4.0 license][bb-ai-license]) and showing layer *LAY8* 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: ```shell $ ./brd_cli/brd_cli (.brd filename) > out.html ``` ### Run tests ```shell 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/`][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. [^1]: Cadence and Allegro are trademarks of Cadence Design Systems, Inc. [cadence-allegro]: https://www.cadence.com/en_US/home/tools/pcb-design-and-analysis/pcb-layout/allegro-pcb-designer.html [qt6]: https://www.qt.io/product/qt6 [bb-ai]: https://github.com/beagleboard/beaglebone-ai [bb-ai-license]: https://github.com/beagleboard/beaglebone-ai/blob/master/LICENSE [test-data]: https://github.com/jeffwheeler/brd_parser/blob/main/src/test/data/CMakeLists.txt