Support for Reverse Engineering of PCBs

Now reading version 23. For the latest, read: Support for Reverse Engineering of PCBs for version 25

After importing CAM data into a CAM document, you will notice that the Export to PCB option is grayed out, regardless of the current CAM Editor mode (CAM or NC). This command allows you to reverse engineer a PCB layout directly from CAM files. This does not follow a regular export/import process but rather loads data directly into the PCB Editor.

The following sections detail steps to be taken to reverse engineer a PCB design from the CAM data, from initial import into a CAM document, through the required pre-export preparation, and ultimately on to export of the design data to the PCB Editor.

Import Data

The Preferences dialogThe Preferences dialog

The starting point for the whole process is the loading of ODB++, or Gerber and NC Drill files into a new CAM document. If you have an IPC netlist, you should import this as well when importing Gerber and NC Drill data. When importing ODB++, only import an IPC file if the netlist is not in the ODB++ directory. The IPC netlist will allow you to update the extracted nets with their original names and differentiate between through-hole vias and free non-component pads.

The File » Import submenu commands all search for files with certain extensions within a given folder. When importing drill files, for instance, the specified directory will filter out all files except those with .DR*, .ROU, .RTE, *.NC*, and *.TX* extensions. If you receive drill files with different extensions than these, you may extend this list on the CAM Editor - Miscellaneous page of the Preferences dialog. From here, you can alter any of the default extension lists associated with Gerber, Aperture, HPGL, and Netlist files as well.

The Preferences dialogThe Preferences dialog

The CAM Editor - Import/Export page of the Preferences dialog lets you change the default import and export settings for Gerber files. For example, if you regularly receive CAM data generated using P-CAD, you might consider changing the coordinate precision format from 2:3 (Altium Designer defaults) to 4:4 (P-CAD defaults). If you don't, you will still have the opportunity to change these settings from their default state each time you import a job.

Layer Type Assignments

The Layer Table Detection Template dialogThe Layer Table Detection Template dialog

Individual Gerber and Drill files are all assigned to individual layers. In addition, the CAM Editor looks at their names upon import and tries to assign each one a layer type. It does this according to the information in the Layer Types Detection Template dialog, which is accessed by selecting Tables » Layer Type Detection from the main menu. This is a fully customizable dialog that contains fragments of file names (extensions, keywords, or both) that identify individual files as layer types, such as signal, negative plane, border, drill, and temporary layers (mechanical).

Altium Designer's PCB Editor, for example, differentiates between Gerber layers by their extensions, such as .gtl for the top layer and .gbl for the bottom. Other design tools might export a .top file for the top layer, and a .sol file for the bottom (solder) layer. Some of these tools, such as P-CAD, allow users to specify the Gerber output names themselves.

After importing any group of CAM files, you may open the Layers Table dialog and review the type assignments that have taken place automatically. You can open the drop-down list for the type and modify any assignment. For example, you will notice that all drill files are automatically set to type Drill Top. You might want to distinguish between top, bottom, and internal drill sets at this point. This is not required, however.

The Layer Table dialogThe Layer Table dialog

If you customarily receive Gerber or drill files that are not automatically assigned to a layer type correctly, you should look over the file name for any distinguishing characteristics whereby the CAM Editor might identify them, and add them to the Layer Types Detection Template dialog. ODB++ does not need to use the Layer Types Detection Template dialog because all the information needed to identify each layer is stored in the matrix file. However, it is good practice to check the layer type assignments after the loading process ends.

Board Stackup and Drill Sets

The Create/Update Layers Order dialog The Create/Update Layers Order dialog

Layers that have been assigned as signal types (top, bottom or internal) or planes will now appear in the Create/Update Layers Order dialog, which is accessed by selecting Tables » Layers Order from the main menu. In most cases, the CAM Editor will be able to determine the stackup from the provided CAM data, but in some cases, all that will be provided is the logical order (the order in which the layers were imported). It is best to ensure that the information in the Layer Physical Order column is correct, with number one being the top layer. Be careful not to assign the same order number to different layers. Once you have specified a valid stackup, the physical order column will take precedence over the logical list when this dialog is reopened and you will see the layers listed in their proposed stackup.

This same physical order will be reflected in the Create/Update Layers Sets dialog access by selecting Tables » Layers Sets from the main menu, where you match drill files to layer sets. Consider a 6-layer board (four-signal, two-plane) with both blind and buried vias. The design might contain four separate drill files:

  • one for the Top-Bottom pair (thru-holes)
  • one for the Top-InternalPlane1 pair
  • one for the MidLayer1-MidLayer2 pair
  • one for the Bottom-InternalPlane2 pair.
Remember that you are determining a drill set, not just outermost pairs. For blind/buried drill layers, all layers that are drilled need to be in the layers set. For through-hole drill layers, the start and end layers should suffice.

Netlist Extract

This step, accessed from selecting Tools » Netlist » Extract from the main menu, relies on the accuracy of the steps preceding it. You can't do it at all unless you've got a layer type assignment for every layer in your board (you should set mechanical layers to Temporary). After launching the command, the netlist information will be extracted, and a list of nets will appear on the Nets tab of the CAMtastic panel. Each net is listed in terms of its total length. Clicking on any net entry in the panel will cause the net to be selected and zoomed in the design space.

The CAM Editor will trace connectivity from one layer to another, consulting the NC drill files to make layer to layer connections. For this reason, the layer stackup you defined in the Create/Update Layers Order dialog, and the drill pairs you selected in the Create/Update Layers Sets dialog, are critical precursors to extracting an accurate netlist from the CAM data.

If you have included an IPC-D-356 netlist file with your imported Gerber and NC Drill files, you may restore the original (and meaningful) net names by selecting Tools » Netlist » Rename Nets from the main menu. After launching the command, the nets will be compared and those that were extracted from the current document will be renamed using the net names from the IPC netlist file. The updated names will appear on the Nets tab of the CAMtastic panel.

Although the IPC-D-356 netlist information is not essential to the export, it is desirable. Its presence will aid the CAMtastic Editor in separating the pads from the vias, and hence lead to the correct creation of vias instead of pads, for any blind or buried vias in the design. But much more importantly, an IPC netlist gives you a reference with which the extracted netlist can be compared when selecting Tools » Netlist » Compare from the main menu. After launching the command, the comparison will be carried out and a report, Netlist-Compare.rpt, generated and opened as the active document in the main design window. The report lists each of the nets that were found in the imported netlist but missing in the extracted netlist.

Protel formatted netlists are not supported. The imported netlist must be in the standard IPC-D-356 format.

If the IPC netlist has been imported correctly, you will see two layers added to the layers list in the CAMtastic panel: <fabrication_testpoint_report_for_DesignName>.ipc_t and <fabrication_testpoint_report_for_DesignName>.ipc_b, reflecting netlist information for the top and bottom signal layers. (A third layer, <fabrication_testpoint_report_for_DesignName>.ipc_in, will appear if you have internal signal layers in your PCB design. Unless you have blind and/or buried vias involving these layers, this third layer will be empty and can be left, or deleted, from the layers list).

For IPC netlists generated from the PCB Editor, you will notice that the CAM Editor's compare function will usually find a series of "missing nets" without names. This is because the PCB Editor's IPC format includes single-pin nets. The CAM Editor, on the other hand, disregards pads without any copper connections as far as the netlist is concerned. In fact, its DRC has an option to remove non-functional pads.

To clear all nets from the current document, essentially flushing the previously extracted netlist, choose the Tools » Netlist » Clean All Nets command from the main menus. After launching the command, all net information will be removed. You can verify that all nets have been cleared from the CAM document using the CAMtastic panel. You will see that the Nets tab will be empty.

Borders and Planes

When the CAM Editor exports a PCB file to the PCB Editor, a board outline will automatically be generated. To do this intelligently, it requires a closed polyline to be present upon a Border-type layer. If no closed polylines can be found on this layer, or if multiple layers have been designated as borders in the Layers Table dialog, you will probably not get the board shape you desire.

Any splits on your internal planes must also be defined by closed polylines. To determine whether a polyline is closed, query it (Q shortcut). You may check to see if the whole polyline becomes highlighted and if it is reported as a closed polyline on the Info tab of the CAM panel. If not, then you can convert what you have into a closed polyline with the Join command in the Edit » Objects submenu.

Split plane sections may require some additional work because each split needs its own "bubble" enclosure. While island planes may be joined as described above, split planes that share their outlines with other splits or with the border polyline must be redrawn. To draw your own closed polyline, right-click after selecting its final vertex, then choose Close.

Nested planes (islands within split planes) are not currently supported.

Exporting Polygons

The CAM Editor - Import/Export page of the Preferences dialog provides additional options to handle how polygons in the CAM document are exported to the PCB document. If the polygons are rectangular in shape, they can be created as fills on the PCB document. For non-rectangular polygons, you can create either Hatched or Solid polygon pours in the PCB Editor. Access to options dialogs for these two polygon pour types are provided, giving greater control over how the exported polygons will be handled on the PCB side.

When enabling the option to Create Hatched Polygons, the CAM Editor will use a single grid size and a single track width to fill all of the polygons in your file. Should your CAM data include very small polygons, then you should make sure that the export options are calibrated down to that level.

The Polygon Options dialog, which is accessed by clicking the associated Hatched Polygon Options button, allows you to modify the grid size, track width, and minimum primitive length for your polygons. If you want your polygons to be completely filled with high accuracy, then these values should all be kept within a tight range around the smallest requirements on your board. Otherwise, you might risk blank spaces within your polygons, hatching patterns instead of complete fills, or even entire polygons left out upon export.

The Polygon Options dialogThe Polygon Options dialog

These values, on the other hand, will apply to all exported polygons, so very small values will increase the bulk and related management issues (such as redraw speed) pertaining to the exported file. Due to this, it is best to use the largest values possible that will still yield the required accuracy for all of the polygons on your board.

When enabling the option to Create Solid Polygons, each polygon will be filled with one or more solid copper regions. The number of copper regions used depends on the number of individual areas created inside the polygon by existing net objects, such as tracks and pads.

The Solid Polygon Options dialogThe Solid Polygon Options dialog

The Solid Polygon Options dialog, which is accessed by clicking the associated Solid Polygon Options button, allows you to determine how copper islands and narrow copper nets are handled, and also pour behavior when poured over net objects belonging to the same net as the copper pour:

  • Pour Over All Same Net Objects - choose this option if you want a polygon pour to automatically connect to all objects on the same net as the pour

  • Pour Over Same Net Polygons Only - choose this option (default) if you want the polygon pour to automatically connect to only polygon pour objects inside its boundary, which are associated to the same net

  • Don't Pour Over Same Net Objects - choose this option if you specifically do not wish the polygon pour to connect to any other net objects. If either of the first two options is chosen and the polygon pour is assigned to No Net, it will pour around all objects regardless of their net assignments.

  • When you run the Export to PCB command to create the board, the polygons are formed as outlines - they will need to be Repoured

  • Each separate polygonal area defined in the CAM files becomes a discrete polygon, use the Polygon Manager to understand how and where they are defined. Note that you can modify the border of an existing polygon, using this approach it might be easier to close a large existing polygon so that it can replace numerous smaller polygons().

Export to PCB

After a netlist has been extracted from your CAM data, the File » Export » Export to PCB command becomes enabled. Executing this command after all necessary steps have been taken will create a PCB document containing a board design that appears very much like the original.

After launching the command, a new PCB document will be generated (<CAMDocumentName>.PcbDoc) and opened as the active document in the design space. The actual sequence of events in the transfer of information between the CAM document and the PCB document is as follows:

  1. The PCB document is created with a board outline based on the current size of the board in the CAM document.

  2. Net objects are created in the PCB document, using the net information extracted from the CAM document.

  3. The layer stack-up is generated, based on the physical layers order defined in the CAM document (Create/Update Layers Order dialog, accessed through Tables »  Layers Order).

  4. Nets are assigned to any internal planes.

  5. Nets are assigned for any split planes that exist. These can be 

  6. Clearance, Width and Power Plane Connect Style design rules are created. Relief connects are created for each plane net.

  7. Padstacks are built from the CAM data (using pads on the signal/plane layers in the physical order, followed by drill, mask, paste, etc). The padstacks are loaded into the PCB and the required style is defined (simple or full padstack).

  8. The PCB tracks are created.

  9. A DRC check is performed for the whole board.

  • The Export to PCB command transfers data from the CAM document to the PCB document using the PCB API. In this way, no exported data files (in Gerber or other format) are generated, and so the need to use the PCB Editor's Gerber Importer is bypassed.

  • The generated PCB document will be added to the Projects panel as a Free Document, under the PCBs sub-folder. It is generated, but initially unsaved.

  • To truly rebuild a board will still take some additional effort, such as replacing component primitives with footprints (you might do this by copying and pasting groups of primitives into a PCB library, then replace the originals with the new footprints). The PCB Editor will not create drill-pairs automatically from the Layer Sets information in the CAM document; you will need to redefine them manually in the Layer Stack Manager

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Note

The features available depend on your Altium product access level. Compare features included in the various levels of Altium Designer Software Subscription and functionality delivered through applications provided by the Altium 365 platform.

If you don’t see a discussed feature in your software, contact Altium Sales to find out more.

Content