Skip to content

Parse .brd files generated by Allegro

License

Notifications You must be signed in to change notification settings

jeffwheeler/brd_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 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 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 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

Build

$ git clone [email protected]:jeffwheeler/brd_parser.git
$ cd brd_parser
$ mkdir build
$ cd build
$ cmake ../src/ -DBUILD_GUI=ON
$ make

Run tools

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:

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:

$ ./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