Allegro
Introduction
Cadence Allegro PCB Designer is a high-end PCB layout tool used widely in enterprise and telecommunications design. Allegro stores board data in a proprietary binary format.
KiCad supports PCB layout import only. Schematic import and footprint library browsing are not supported.
Supported file type:
-
.brd— Allegro binary board file
The importer supports Allegro versions 16.0 through 17.5. Version 17.2 introduced the most significant binary layout changes; many struct fields are conditionally present depending on whether the file predates or postdates this version.
File Structure
Allegro .brd files are proprietary binary files. The importer identifies valid files by
checking for the string all at offset 0xf8 in the file header.
File Layout
Offset 0x0000: File Header (~4KB) Magic number (4 bytes) Object count 22 linked list heads (block type indices) Allegro version string (60 bytes) Board units (1 byte: 0x01 = Imperial, 0x02 = Metric) Units divisor (4 bytes) String count Layer map (256 entries) Offset 0x1200: String Table Repeated: [4-byte ID] [null-terminated string] After strings: Object Blocks Repeated: [1-byte type tag] [type-specific data]
All object blocks have a fixed layout with version-conditional fields. Blocks are indexed
by a m_Key field that serves as a global identifier and stored in a flat hash map.
Linked Lists
Most block types form singly-linked lists via a m_Next field containing the key of the
next block. The file header contains 22 linked list descriptors with head and tail keys.
Walking a list starts from the head key, looks up each block, and follows m_Next until
the tail key or zero.
String Table
Located at fixed offset 0x1200. Each entry is a 4-byte ID followed by a null-terminated string. String IDs are used throughout the file to reference net names, padstack names, reference designators, and other text.
Version Detection
The first 4 bytes of the file are a magic number. The importer masks the lower byte to determine the format version.
| Magic | Version | Allegro Release |
|---|---|---|
|
V_160 |
16.0 |
|
V_162 |
16.2 |
|
V_164 |
16.4 |
|
V_165 |
16.5 |
|
V_166 |
16.6 |
|
V_172 |
17.2 |
|
V_174 |
17.4 |
|
V_175 |
17.5 |
Coordinate System and Units
All integer coordinates are stored in mils divided by the units divisor
(m_UnitsDivisor from the file header).
scale = 25400.0 / divisor nanometers = coordinate * scale
The Y axis is negated during conversion to KiCad coordinates.
Arc center coordinates and radii use IEEE 754 doubles stored as two big-endian 32-bit words (word-swapped pair).
Rotation
Rotation values are stored in millidegrees (divide by 1000 to get degrees). The rotation is not negated despite the Y-axis flip.
Pad rotation in 0x0D PAD blocks is board-absolute, meaning it includes the parent footprint’s rotation. For KiCad, which expects footprint-local pad rotation, the importer subtracts the footprint’s rotation.
local_rotation = pad_rotation - footprint_rotation
Block Types
Each object block begins with a 1-byte type tag followed by type-specific data.
| Type | Name | Purpose |
|---|---|---|
0x01 |
ARC |
Arc segment (tracks, shapes, zones) |
0x04 |
NET_ASSIGNMENT |
Net connectivity link |
0x05 |
TRACK |
Track segment collection |
0x07 |
COMPONENT_INSTANCE |
Footprint instance reference data |
0x0D |
PAD |
Pad geometry and placement |
0x14 |
GRAPHIC |
Graphics container (lines, arcs) |
0x15, 0x16, 0x17 |
SEGMENT |
Line segment (tracks, outlines) |
0x1B |
NET |
Net definition |
0x1C |
PADSTACK |
Padstack definition |
0x1D |
CONSTRAINT_SET |
Physical constraint set (trace width, clearance) |
0x28 |
SHAPE |
Polygon shape (zones, fills, board outline, keepouts) |
0x2B |
FOOTPRINT_DEF |
Footprint template definition |
0x2D |
FOOTPRINT_INST |
Placed footprint instance |
0x30 |
STR_WRAPPER |
Text object |
0x32 |
PLACED_PAD |
Placed pad instance |
0x33 |
VIA |
Via instance |
Additional block types exist for DRC markers (0x0A), signal integrity models (0x1E), ratsnest lines (0x23), keepout areas (0x34), and various internal structures. These are parsed but not imported.
Padstack Layout (0x1C)
A padstack contains fixed-slot components (for technical layers) followed by per-layer
components (m_LayerCount * m_NumCompsPerLayer).
Per-Layer Components
Each copper layer has multiple component entries.
| Index | Purpose |
|---|---|
0 |
Antipad (clearance shape) |
1 |
Thermal relief pattern |
2 |
Pad shape |
Fixed Slots (Technical Layers)
The number of fixed slots varies by version: 10 for pre-V172, 21 for V172+.
Pre-V172 (10 fixed):
| Slot | Layer |
|---|---|
0 |
Top solder mask |
5 |
Top paste mask |
7 |
Top film mask |
V172+ (21 fixed):
| Slot | Layer |
|---|---|
14 |
Top solder mask |
15 |
Bottom solder mask |
Drill Diameter
The drill field location is version-dependent.
-
Pre-V172:
m_Drillfield directly in the padstack header, in internal coordinate units. -
V172+:
m_DrillArr[4]holds the drill width,m_DrillArr[7]holds the drill height. For round drills, height is 0 (treated as equal to width).
Drill Slot Orientation
Allegro stores slot drill dimensions as (primary, secondary) rather than (X, Y). The primary dimension is always the larger value regardless of pad orientation. The importer corrects this by comparing the first copper layer’s pad aspect ratio with the drill aspect ratio. If they disagree on orientation, the drill dimensions are swapped.
Pad Shape Types
| Value | Shape | KiCad Mapping |
|---|---|---|
0x02 |
Circle |
|
0x03 |
Octagon |
|
0x05 |
Square |
|
0x06 |
Rectangle |
|
0x0B |
Oblong X |
|
0x0C |
Oblong Y |
|
0x16 |
Shape Symbol |
|
0x1B |
Rounded Rectangle |
|
0x1C |
Chamfered Rectangle |
|
Thermal Relief
The thermal relief component stores the outer extent of the thermal pattern. The thermal gap is derived from the difference between antipad and pad sizes.
thermal_gap = (antipad.W - pad.W) / 2
Polygon Shapes (0x28)
A 0x28 SHAPE has a m_FirstSegmentPtr that begins a linked list of segment blocks
(0x01 arcs and 0x15/0x16/0x17 line segments) forming a polygon outline. These shapes
serve multiple purposes: zone outlines, copper fills, board outline geometry, keepout
areas, and custom pad shapes.
Zone Outlines vs Copper Fills
0x28 shapes appear in two distinct contexts.
BOUNDARY class shapes on the m_LL_Shapes header linked list are zone outlines.
These are imported as ZONE objects.
ETCH class shapes reachable from NET blocks via the net assignment chain include both
zone outlines repeated as copper shapes and actual computed fills. The importer matches
fills to zones by net code, layer, and bounding box overlap, then applies genuine fills
via SetFilledPolysList(). Unmatched fills serve as a fallback for zone net resolution.
Standalone copper polygons (ETCH shapes with no corresponding BOUNDARY zone) are imported
as filled PCB_SHAPE objects with appropriate net assignment.
Teardrop Detection (V172+ Only)
On V172+ boards, the m_Unknown2 field in 0x28 blocks discriminates dynamic copper.
Bit 12 (0x1000) marks shapes that Allegro auto-generated.
| Value | Meaning |
|---|---|
0x3001 |
Classic teardrop shapes |
0x1001 |
Dynamic copper fillets at via/pad junctions |
0x0001 |
Genuine standalone copper pours |
0x0000 |
Pre-V172 boards (field absent) |
Shapes with bit 12 set are imported as KiCad teardrop ZONE objects. After creation, the importer finds the anchoring pad or via for each teardrop by checking which pad or via position on the same net and layer falls within the teardrop outline.
Zone Net Resolution
To find the net for a BOUNDARY shape, the importer follows this pointer chain:
BOUNDARY 0x28 shape
m_Ptr7 (V172+) or m_Ptr7_16x (pre-V172)
0x2C TABLE
m_Ptr1
0x37 pointer array
m_Ptrs[0]
0x1B NET block
Footprints
Footprint Definition (0x2B)
A template shared by multiple placed instances. Contains the library symbol path and bounding box coordinates.
Placed Footprint Instance (0x2D)
An actual footprint on the board.
| Field | Description |
|---|---|
|
0 = top ( |
|
Board position |
|
Angle in millidegrees |
|
Key to 0x07 component instance data (version-dependent field name) |
|
Head of 0x14 graphics linked list |
|
Head of 0x32 placed pad linked list |
|
Head of 0x30 text linked list |
Bottom-layer footprints are flipped after all children (graphics, text, pads) are added so that child layers and positions are mirrored correctly.
Component Text
Text objects associated with footprints are classified by their layer class.
| Layer Class | KiCad Field |
|---|---|
REF_DES |
Updates REFERENCE field |
COMPONENT_VALUE |
Updates VALUE field or creates USER field |
DEVICE_TYPE |
Creates USER field |
TOLERANCE |
Creates USER field |
USER_PART_NUMBER |
Creates USER field |
Layer Encoding
Each block carries a 2-byte LAYER_INFO consisting of a class code and subclass code.
Layer Classes
| Code | Class | Purpose |
|---|---|---|
0x01 |
BOARD_GEOMETRY |
Board-level features (outline) |
0x02 |
COMPONENT_VALUE |
Component value text |
0x03 |
DEVICE_TYPE |
Device type text |
0x04 |
DRAWING_FORMAT |
Drawing annotations |
0x06 |
ETCH |
Copper layers (subclass = layer index) |
0x07 |
MANUFACTURING |
Manufacturing features |
0x09 |
PACKAGE_GEOMETRY |
Footprint geometry (silkscreen, assembly, courtyard) |
0x0D |
REF_DES |
Reference designator text |
0x0F |
ROUTE_KEEPOUT |
Route keepout region |
0x13 |
VIA_KEEPOUT |
Via keepout region |
0x14 |
ANTI_ETCH |
Anti-etch (negative copper, skipped) |
0x15 |
BOUNDARY |
Zone boundary outlines |
Fixed Subclass Codes
High-valued subclass codes (>= 0xEA) have fixed meanings. Low values are indices into per-class custom layer lists from the header’s layer map.
| Code | Class | Meaning |
|---|---|---|
0xEA |
BOARD_GEOMETRY |
Board outline |
0xF3 |
MANUFACTURING |
Autosilk bottom |
0xF4 |
MANUFACTURING |
Autosilk top |
0xF6 |
PACKAGE_GEOMETRY |
Silkscreen bottom |
0xF7 |
PACKAGE_GEOMETRY |
Silkscreen top |
0xFA |
PACKAGE_GEOMETRY |
Place bound bottom |
0xFB |
PACKAGE_GEOMETRY |
Place bound top |
0xFC |
PACKAGE_GEOMETRY / REF_DES |
Assembly bottom |
0xFD |
PACKAGE_GEOMETRY / REF_DES / DRAWING_FORMAT |
Assembly top / Outline |
KiCad Layer Mapping
| Allegro Layer | KiCad Layer |
|---|---|
COMPONENT_VALUE ASSEMBLY_TOP |
F.Fab |
COMPONENT_VALUE ASSEMBLY_BOTTOM |
B.Fab |
PACKAGE_GEOMETRY SILKSCREEN_TOP |
F.SilkS |
PACKAGE_GEOMETRY SILKSCREEN_BOTTOM |
B.SilkS |
PACKAGE_GEOMETRY ASSEMBLY_TOP |
F.Fab |
PACKAGE_GEOMETRY ASSEMBLY_BOTTOM |
B.Fab |
PACKAGE_GEOMETRY PLACE_BOUND_TOP |
F.CrtYd |
PACKAGE_GEOMETRY PLACE_BOUND_BOTTOM |
B.CrtYd |
REF_DES SILKSCREEN_TOP |
F.SilkS |
REF_DES ASSEMBLY_TOP |
F.Fab |
MANUFACTURING AUTOSILK_TOP |
F.SilkS |
MANUFACTURING AUTOSILK_BOTTOM |
B.SilkS |
ETCH (subclass index) |
F.Cu, B.Cu, In1.Cu… |
BOARD_GEOMETRY OUTLINE |
Edge.Cuts |
Non-standard layer combinations are assigned to custom layers created during import.
Copper Layer Ordering
For ETCH class, the subclass value is a zero-based index into the copper layer stackup. Index 0 is the top layer and index N-1 is the bottom layer.
Board Outline
The board outline is stored as BOARD_GEOMETRY or DRAWING_FORMAT class shapes with subclass codes 0xFD (DFMT_OUTLINE) or 0xEA (BGEOM_OUTLINE). The outline geometry is a linked list of segments (lines and arcs) forming a closed contour mapped to the Edge.Cuts layer.
Constraint Sets and Netclasses
Physical Constraint Sets (0x1D blocks) define trace width, clearance, and routing rules. The importer converts these to KiCad netclasses.
Constraint Set Record Layout (V172+)
Each 0x1D block contains per-copper-layer records of 56 bytes (14 consecutive int32 values in internal units).
| Field | Offset | Content |
|---|---|---|
f[1] |
4 |
Line width (minimum trace width) |
f[2] |
8 |
Spacing (minimum spacing) |
f[4] |
16 |
Clearance |
f[7] |
28 |
Differential pair gap |
f[8] |
32 |
Neck width |
f[9] |
36 |
Differential pair neck gap |
Pre-V172 boards have a shifted field layout with line width at f[0] and no dedicated clearance field. The importer uses spacing (f[1]) as the clearance fallback.
Net-to-Constraint-Set Linkage
Each NET may have a field with code 0x1a0 whose value is a string table key matching the constraint set name. Nets without this field implicitly use the DEFAULT constraint set.
Import Algorithm
The constraint import runs in three passes:
-
applyConstraintSets()creates one NETCLASS per 0x1D block with clearance, trace width, and differential pair gap. Nets are assigned via field 0x1a0. -
applyNetConstraints()creates per-net trace width netclasses from MIN_LINE_WIDTH field 0x55. These override the constraint set trace width for nets that have explicit widths. -
applyMatchGroups()creates differential pair and match group netclasses fromm_MatchGroupPtrpointer chains.
Differential Pairs and Match Groups
NET.m_MatchGroupPtr chains to a 0x2C TABLE naming the match group. The pointer path
is version-dependent: V172+ boards use an intermediate 0x26 block, while pre-V172 boards
point directly to the 0x2C TABLE.
Groups with exactly 2 nets are imported as differential pair netclasses. Groups with more nets are imported as match group netclasses.
Imported Elements
-
Footprints with reference designator, value, device type, tolerance, and user part number fields, with position, rotation, and top/bottom layer placement
-
Pads with shapes (circle, square, rectangle, oblong, rounded rectangle, chamfered rectangle, octagon, custom polygon), drill diameter, and thermal relief parameters
-
Tracks and arcs on copper layers with width and net assignment
-
Vias with padstack-defined drill diameter and net assignment
-
Nets with constraint set associations
-
Copper zones from BOUNDARY class shapes with net resolution and computed fill polygons
-
Standalone copper polygons from ETCH class shapes without BOUNDARY zones
-
Teardrops imported as teardrop ZONE objects (V172+ only) with pad/via anchoring
-
Keepout areas (route keepout and via keepout) from the header linked list
-
Board outline from BOARD_GEOMETRY and DRAWING_FORMAT outline shapes mapped to Edge.Cuts
-
Physical constraint sets converted to KiCad netclasses with clearance, trace width, and differential pair gap
-
Per-net trace width overrides from MIN_LINE_WIDTH fields
-
Differential pair and match group netclasses from match group pointer chains
-
Silkscreen, assembly, and courtyard graphics at both board and footprint level
-
Text objects with font metrics from 0x36 font definitions
Limitations
-
Only board import (
.brd) is supported. Schematic import and footprint library browsing are not available. -
Several pad shape types are not handled: cross (0x04), diamond (0x07), hexagon (0x0F, 0x10), triangle (0x12), flash (0x17), donut (0x19), and N-sided polygon (0x1E). These generate warnings during import.
-
Custom solder mask and paste mask expansion per pad are not extracted. KiCad uses default pad-matches-mask behavior.
-
Signal integrity / IBIS models (0x1E blocks) are not imported.
-
DRC error markers (0x0A blocks) and ratsnest lines (0x23 blocks) are skipped.
-
ANTI_ETCH (negative copper) tracks are skipped; thermal relief is handled at the pad level instead.
-
Constraint set name resolution may produce synthetic names on some boards (observed on BeagleBone-AI) when string table keys use an unresolvable 0x0300XXXX format.
-
Teardrop detection is only available on V172+ boards. Pre-V172 boards lack the discriminator field.
-
The file format is not publicly documented. All parsing is based on reverse engineering and may not cover every variation across Allegro product versions.