Gerber grows attributes

Article by Karel Tavernier, published in Printed Circuit Design & Fab

The latest extension to the age-old format describes layer structures, features and functions.

Output and read by every PCB design and engineering system in the world, the Gerber format is the de facto standard for one of the industry’s most delicate, critically important processes: CAD-to-CAM data transfer. Simple yet powerful, Gerber is an image description language that permits complex designs to be described completely and accurately in an unequivocal one-file/one-layer format. The format uses a structure that can be read by machines and humans.

This takes care of the largest and most complex part of any CAD-CAM archive, by describing graphically all the layers and all the drilling and routing needed for a particular PCB. But another smaller, but no less important, part of the PCB design archive, not being an image, cannot currently be transmitted using the Gerber format. This includes a number of files that provide the following information:

  • Netlist.
  • Function of the image and drill files.
  • Stackup, materials and colors.
  • Various manufacturing instructions.

On its face, this looks simple enough to resolve. And indeed in the case of the netlist, it already has been: the well-known IPC-356A standard has been around for decades, and is a perfect format for transmitting netlists. In practice, however, the IPC-356-A file is often missing or is poorly used, creating confusion and extra work for the CAM engineer. But an accurate IPC-356A format is a perfect solution for this part of the archive.

All the other information – function of images and image elements, stackup, materials, colors and general instructions – is, frankly, a confusing mess that forces CAM engineers to search for, interpret or even guess designers’ intentions. This is because there is no standard for adding this sort of information – so designers may add it in the file names themselves, or they may embed it within the image. Which means that you may find a comment in the top righthand corner of one of the Gerber images that this is in fact the top solder mask layer, and that incidentally, the solder mask is blue. Or you may not. The information about the layer may be in a completely different place – in a separate pdf file, drawing or text document for example – or it may not even exist. All of which creates unnecessary additional work for the CAM engineer, and adds costs and time to the process, and in some inevitable way, to the final product. At worst, it can result in scrap, or poor product performance.

An article earlier this year1 explored how the Gerber and IPC-2581 formats could together close this gap in the most intelligent way possible – by tweaking formats that are already used and understood by the industry, in such a way that improvements can be introduced seamlessly, without disrupting their use or the marketplace’s understanding of them. In that article, it was explained that as the image part of CAD-CAM transfer is not broken, it does not need fixing. Gerber has performed this task brilliantly for years, is well known, well tested, and doesn’t need changing.

What is broken, however, is the transfer of the additional written instructions, function and descriptive data. IPC-2581 can, with a minimal change, be used to transmit some of these data – stackup, component and other archive data – in a standardized manner that would make sense across the industry, while keeping Gerber as an image format. Thus CAD and CAM professionals – and their system vendors – would reap the benefits of vastly improved archive transfer, while continuing to use an image format that works reliably, without having to implement entirely new, complex and potentially bug-ridden workflows that require lengthy testing and approval processes.

A Second Gerber Extension

This article develops on that theme by presenting our proposal for the other part of the equation: a revision to the Gerber format that brings clarity and order to the transfer of additional information closely linked to the image data. This revision would replace the currently confusing and chaotic practices with a clear procedure and structure. It would dovetail perfectly with the abovementioned changes to IPC-2581 proposed in January, but is also a powerful improvement in its own right and as a standalone development. In fact, for typical cases it will deliver no less than 80% of what would be possible were Gerber and IPC-2581 combined.

The new revision provides designers to a standard method, which at the very least can serve as a kind of pro memoria to ensure that the archives sent to CAM include all the data needed. It also provides a method to describe the layer structure and the part of the PCB that each image describes, as well as the features it contains, using a clear industry-wide standard instantly recognizable to CAM. Thus all parties, regardless of manufacturing processes and products, location, culture or language, would be able to communicate reliably in a transparent, clear-cut way that leaves absolutely no room for doubt.

Just as important, this revision will make the descriptive data just as machine-readable as the current Gerber image data, permitting a greater degree of automation.

Further, the extension requires minimal tweaking to existing CAD and CAM systems, all of which are capable of supporting it and would benefit from it, while designers and engineers would have a standardized procedure that would require very little to change in working practices. Equally important, this extension does not disrupt existing workflows. If the software does not support the new capabilities, the old workflow continues to operate. Nobody is forced to buy anything.

How will it work? The current Gerber format, Extended Gerber, will have a second extension added to it, whose draft specification is currently in preparation. For the purposes of this article I will refer to the current Extended Gerber format as the First Extension (X1), and the proposed new Gerber format as the Second Extension (X2).

Let’s have a look at the general principles by which X2 works.


At the heart of X2 is the use of attributes. These are akin to labels that provide information associated with image files, or features within them. The beauty of using attributes is that this is an image description term that is already familiar to CAD and CAM professionals and software developers, and that sits naturally with the current capabilities of CAD and CAM systems.

X2 will extend the current Gerber specification with a series of standard attributes that are most important for efficient CAD-to-CAM communications.  

File-specific attributes. As outlined above, Gerber data are transferred in an archive containing a number of files. There is an image file for each layer of the PCB and, where the Gerber format is used for drill data, for this as well. There are also several text files and drawings that provide extra information. One of the first things that a CAM engineer must do with an incoming PCB design archive is to assign the layer files into an order that mirrors the PCB build, with all the copper, solder mask, legend, drill and other layers in sequence. There is no standard for this file assignment: every CAD designer documents this according to an individual, personalized system, so the CAM engineer would not intuitively know whether a file contains a copper or a solder mask layer. This information only becomes clear on opening the file and seeing the image, or by searching through the accompanying text documents, or by finding the information within the image itself – or in extremis by picking up the phone to the customer. 

One solution is to adopt a standard file function attribute, readable for machines and humans, by which the function of the image contained in the file is clear. We have adopted this approach for X2 because it is simple and also because it is compatible with all existing CAD and CAM systems. For example, the statement%AF,FileFunction,Solder mask,Top*% added to the header of the Gerber file will indicate that the function of the image is the top solder mask. CAM systems that support attributes will automatically assign the file to the top solder mask slot in the layer structure. CAM systems that do not support attributes will throw an error message such as “Unknown parameter %AF,FileFunction,Solder mask, Top*%” but still read the image correctly, as with X1. Even the error message informs the CAM operator clearly what the file represents, and they no longer need to scour the whole archive to find that information.

All functional layers can be identified in this way, and even additional drawings with manufacturing instuctions will be identified and ordered by the CAM system.  

The file context attribute provides further information, so that when the software finds the attribute %AF,FileContext,Coupon*%, it knows that this file describes a test coupon and not a single PCB, or a production panel and so on. The attributes offered by X2 are highly articulated, providing a wealth of information to CAM software and engineers that is easy to see and understand at a glance.

Object attributes. Just as layers can be labeled with attributes, so can the various objects within them – features such as flashes, draws and areas. So, for example, every time the CAM system reads a round pad that is associated with the attribute statement%AO,PadFunction,Via*%, the system will recognize it as a via pad. CAM needs to know where the vias are because they are treated in a specific way when handling the solder mask, and certainly when they must be plugged. 

Universal Compatibility

Making the industry’s CAD and CAM systems X2-ready requires a small tweak on the part of the CAD and CAM system vendors. This effort would be repaid many times over by an overall improvement in the way that CAD and CAM professionals work together. By tweaking their systems, vendors will allow users to standardize and automate much of the archive creation and entry process. But X2 files will be compatible with untweaked CAD and CAM systems too, because even though they support the image, none of the new parameters can affect it. In this case, X2 files will be processed as if they were X1 files, and the correct image will be generated. CAM engineers with untweaked systems will still benefit from receiving their files in X2, because even if their CAM systems may not recognize an attribute statement like “File function: Top copper layer”, they certainly will, which will greatly ease their management of incoming archives.

As such, the X2 format saves designers and CAM engineers time and contributes to a faster turnaround of requests and orders. Even if the CAM system does not support the attributes, the operator will be able to follow their established workflow. No expense is imposed on the manufacturer.

A major benefit of this approach is the geometric part of image transfer is left as is. This is fundamental, as the most complex part of the description of a PCB is the image. Geometric software is hard to get right and takes a long time to debug, often years. The Algorithm Design Manual2, for example, says that: “Implementing basic geometric primitives is a task fraught with peril” and “Expect to expend a lot of effort if you are determined to do it right.” Yet for the CAD-CAM transition, we absolutely have “to do it right”; errors in images, fiendishly difficult to detect, are highly likely to lead to scrap. Knowing this, CAD and CAM professionals are rightly reluctant to rely on new image formats. With this revision, this is not an issue. The geometric part of current Gerber-based data transfer remains the same both for writers and readers.

As custodians of the Gerber format, Ucamco is dedicated to ensuring that it serves its industry to the best of its and our capabilities, in the most integrated, intelligent way possible. X2 complements current processes, while enhancing designers’ and manufacturers’ ability to communicate with each other. In so doing, we believe that we are doing our part in helping our industry toward a better future. 

For more information, read Extending the Gerber Format with Attributes for a detailed article on the technicalities of the new extension. Similarly, all PCB manufacturing, design and engineering professionals are encouraged to work with us on this evolutionary step for our industry.  

1. Karel Tavernier, Kick-Starting a Revolution: Gerber Meets IPC-2581, January 2013
2. Steven S. Skiena, The Algorithm Design Manual, Springer-Verlag New York, 1998.

Karel Tavernier is managing director of Ucamco;