Reverse Engineering
Reverse Engineering in EDWinXP is divided into two basic stages:
Firstly, the graphic
elements in the artworks are imported and distributed in relevant categories. For
example graphic elements that constitute pads are imported to Pad Stack categories
and those that constitute traces are imported to Trace Master category.
Actual reconstruction is the second stage that may commence only when all
necessary elements have been imported. Reconstruction consists of several steps
that have to be executed in prescribed sequence. For example, it is impossible to
reconstruct connections before reconstructing board outlines and components first.
It depends very much on completeness of imported graphics, but in most cases all
reconstruction steps with exception of component reconstruction may be executed
automatically just by clicking on appropriate tool. Component reconstruction is
basically a manual process, which is aided by several semi-automatic support
features.
Graphic imports and Reconstruct from graphics are two features of Fabrication
Manager allowing for reverse engineering of printed circuit boards from artworks in
Gerber ASCII formats. This kind of reverse engineering in EDWinXP is divided into
two basic stages. Firstly, the graphic elements in the artworks are imported and
distributed in relevant categories. For example graphic elements that constitute pads
are imported to Padstack categories and those that constitute traces are imported to
Trace Master category.
Two methods for reconstruction
There are two methods for reconstructing components in projects that are reverse
engineered from imported graphics in Gerber ASCII format:
The graphic elements in certain imported categories may be used as a
template for placing components already created in Layout Editor. This
method assumes that user knows what parts were used in reverse engineered
board and that those parts are defined in System Libraries. This method
allows not only to re-create PCB layout but also schematics– in other words a
complete EDWinXP project. It is therefore worthwhile to check in advance
whether needed parts are present in the System Library and eventually add
those that are missing.
Components (electronic parts) are graphically represented on the PCB by
packages that are fetched from the System Library. Newly introduced
features in EDWinXP 1.50 allow recreating complete packages from graphics
and subsequently the components referencing them. The parts are also recreated. However, since no information about their schematic view and
structure may be derived from imported graphics, only PCB part of the project
may be recreated in this way. Recreating component from recreated packages
is faster and in case that the schematic diagram of the board is needed, there
are options to recreate this part of project later.
Both methods may be of course combined and there are also ways for
speeding up this process through applying certain other features of EDWinXP.
In this document we shall focus on the first of above mentioned methods.
Co-ordinates of footprints
The basic elements that constitute the template for component placement are so
called “pad positions”. These are nothing else but co-ordinates of Gerber D03*
(flash) commands detected in artwork files. Most of the pads are plotted by selecting a proper aperture and "flashing" its shape(usually rectangular or round)at co-ordinates corresponding with components footprints positions.Those positions may be
imported to following categories: Thrupads Positions, SMD Pads Positions for
Component Side and SMD Pads Positions for Solder Side.It is impossible for
the program to decide which pad position is which and user has to apply filters to
direct import to proper category or transfer pad position from one category to
another using editing tools.
Some footprints may not be flashed but plotted as lines or polygons and in such a
case there is no way for detecting a pad position automatically. There is an option to
add missing position in proper places to fill up the gaps if the import is ambiguous.
Having footprint pattern defined in form of pad positions is mandatory as they are
used for snapping components into their proper positions and rotations. Import of
silkscreen is helpful as it usually contains readable text with component name and
other graphics that inform about component locations on the board and which
footprints may belong to which component.
Import of pad stacks is not required since we would be using library packages.
Nevertheless, this graphics may be useful as help for distinguishing between PMD
and SMD pads as well as in deciding whether imported pad position is for via hole.
Another thing worth remembering with import is alignment of pads to some grid –
metric or imperial – by applying proper offset to artwork file.
Creating components
When pad positions are imported, the next stage would be creating components in
Layout Editor. This is done by just selecting them from library and throwing them
somewhere on the board. Actual placement is done in Fabrication Manager
afterwards. Depending on number of components in reconstructed board, it may be a
tedious task. Sometimes it may be easier to edit list of component in Notepad and
import it with help of wire list import. (See Project Netlist/Wirelist Export &
Import in Project Explorer menu). Such list has following format:
(PATH, board name (MAINHIER)
(COMPONENTS
Component name, library part name
. . .))
The import of this component list will be successful if all required parts are found in
the library. If not found, it will provide information which parts are missing and have
to be added.
Whatever method for creating components would be applied, it is always convenient
to have them pre-placed outside board boundaries. This may be simply accomplished
by using tool Place components in bins from Layout Editor Autoplace toolbar.
With all components neatly arranged outside the board and their desired pad position
imported and in proper places, the actual placement process may begin. For this task
select tool Reconstruct Component in Fabrication Manager Reconstruct from
graphics toolbar and subsequently option tool Place selected existing
components (F3). The display on the screen will present placement template in
form of imported pad position and imported silkscreen elements (if any) and the
components to place.
Fitting to pattern
The principle of operation is simple. Selected pad of the component is matched to its
desired position on board marked by imported pad positions. With this information
the program will attempt to rotate the component around selected pad to find best
match for remaining pads in surrounding pattern of pad positions. There are two
other options connected to this tool (F4 and F5) – one for ordering this rotation to
take place in 90 degrees steps and the other for using steps specified by value in
Angle Snap box.
This function operates in two modes. The simplest is to click on the pad position
that corresponds with desired location of pin number 1 of the component we want to
places. This component is then selected from the list that pops up after clicking on
pad position.
The other mode is reverse. Clicking on pad in existing component starts
its relocation. It should be then moved in such way that this pad hovers over
corresponding pad position. Subsequent click anchors the component and the
program continues matching rotation automatically. This procedure has to be
repeated for all components in the board.
The first section of the article describes first of two methods that may be used for
reconstructing components in projects reverse engineered from graphics imported
from artworks in Gerber ASCII format. This procedure utilizes graphic elements in
certain imported categories only as template for placing components that first have
to be created in Layout Editor. In tutorial kit NWSTUTOR.ZIP, you will find sample
project database NWSTUT_IMP1.epb that already includes all necessary imports –
those categories that are mandatory for complete reverse-engineering of a board
when above component reconstruction method is applied. The actual components
have been created by importing EDWinXP format wire list. NWSTUT.WRL that is also
included in the kit. This project is intended for user who would like to try this
procedure on a simple example
Reconstructing packages
There is other reconstruction method that involves building complete packages solely
from imported graphic elements and subsequently the components. The parts may
be rebuilt too but there is also an option to assign matching parts from System Library. Packages are reconstructed from elements imported to several categories.
Silkscreen elements defines outline. Pads positions define not only footprint locations
of but also locations of holes and their diameters. Elements extracted from pads
categories are used to build pad stacks. Kit project NWSTUT_IMP2.epb has been
especially prepared to illustrate this method of component reconstruction. It is more
complete that the other sample and includes elements used for building pad stacks.
In this particular case, the circuit consists only of pin mounted devices and elements
were imported to category Thrupads Padstacks.
Holes diameters
The pad stacks in the reconstructed symbols are built from elements imported to
categories Thrupads Padstacks, SMD Padstacks Comp. Side and SMD Padstacks
Solder Side. Imported pad position for all above type of pads define among other
things X=0 and Y=0 coordinates in reconstructed pad stack. Only those elements
from pad stack categories that overlap pad position will be included in
reconstruction. Pad stacks for PMD components must have holes diameters assigned.
This should be done after importing all elements to Thrupads Padstacks. It is
assumed that pads of certain size should have corresponding hole diameter. In other
words, common hole diameter may be assigned to all pads of the same size and
shape, which in turn depends on apertures defined in the Gerber artwork. Hole
diameter assignments must be done prior to component reconstruction as the last
stage of graphics import. The procedure is following. Select Graphics Import toolbar
and Thrupads Positions as active category. Afterwards select tool Create graphic item
and click on option tool Assign holes (F2). This action will result in pop-up dialog
where hole diameters for all different apertures used in imported part positions may
be entered. (This operation has already been done in our example)
Selecting silkscreen and pad template
Open this project NWSTUT_IMP2.epb and invoke Fabrication manager. Select toolbar
Reconstruct from graphics and subsequently tool Reconstruct Component. It should
be clearly visible on the screen that silkscreen and footprints form five distinct
patterns in the imported graphic, equivalent to component images on the PCB. Let’s
assume that these components should be reconstructed as:
U1 – part 7474
U2 – part 7474
U3 – part 7404
U4 – part 7486
U5 – part 7420
Activate option tool Reconstruct component/package from graphics (F1). Graphic
pattern containing image of 14 pin DIL package of U1 may be selected by dragging a
bounding rectangle around it. In result of this operation all elements inside rectangle
are highlighted and will be used as template for reconstruction. At this stage four
additional tools are temporarily added to the option tools toolbar.
Removing redundancies
There may be some redundant elements closed within bounding rectangle. For
example there may be lines in the silkscreen that constitute component name. There
is no need to include them in reconstructed package (component names are
generated automatically). Option tool Toggle inclusion of selected silkscreen graphic
item (F4) may be used to exclude redundant silkscreen pattern elements from taking
part in reconstruction. Single item selection or selection by dragging bounding
rectangle may be applied at this point In similar fashion, but using tool Toggle
inclusion
Renumbering pads
It is important that pads – pins in the reconstructed package - are properly
numbered. Pin numbers are initially assigned when the pattern is selected, but these
numbering may not necessarily be correct. Tool Assign pin number to select pad (F6)
is provided for the purpose of arranging proper pad numbering sequence.
Finishing up
Clicking on the tool Finish reconstruction (F7) results in pop-up dialog where user
has to specify additional information needed for reconstruction. Package name is
mandatory and has to be unique within the project. By setting Component name to
“none” user may direct the program to reconstruct only the package that will be
placed in project library. Such package may be farther edited
Assigning part
Entering project unique component name means that the program is set to
reconstruct the package and finally the component. In this case part name has to be
entered in the corresponding box in the dialog. There are two possible modes for
assigning parts to the reconstructed components.
The program may create a new
part with entered name (Assign box set to “Scratch”). Such part will have only
reference to reconstructed package. No reference to schematics view will be
generated at this stage and if needed has to be added later by editing this part in
Library Editor. By setting Assign box to “Library Part” user may order the program to
fetch part from the System Library. The part will be assigned if its description
(number of defined pins) matches reconstructed package. If this is a case, the part
will be loaded to project library and it original package reference altered to
reconstructed package. Assigning part from System Library results also in creation of
schematic representation of the component, since necessary information (schematic
symbol and pin-out) is defined in the part description. There are certain restrictions
in using this mode. Part cannot be already in use in the project and if reconstructed
package differs in number of pins then this mode will be refused. Accepting
reconstruction parameters orders the program to complete the procedure. The
reconstructed component will appear in place of highlighted template. Elements of
template are no longer needed and the program will remove all of them if Do not
remove package template box is left unchecked.
Reconstruction through copying
Usually there are more components on reverse-engineered board that share the
same package or part. This applies to our example too. In such instances it is not
necessary to repeat reconstruction of each component in above described manner.
Instead, they may be copied and snapped into desired location using pattern of pad
positions as a placement template. For this purpose the tool Copy select component
and place (F2) is provided. The procedure consists of two steps.
In the first step the
“source” source component has to be identified by clicking on any of its pads. If not
specified otherwise, the program will ask for copied component name, create it and
start its relocation. The actual placement of the new component is done exactly in
the same way as described in Part 1 of this article. The component should be moved
in such way that selected pad hovers over corresponding pad position. Subsequent
click anchors the component. The program continues automatically to rotate the
component around selected pad to find best match for remaining pads in surrounding
pattern of pad positions. There are two other options connected to this tool (F4 and
F5) – one for ordering this rotation to take place in 90 degrees steps and the other
for using steps specified by value in Angle Snap box. In our example this procedure
may be used to copy U1 to U2 since they are instances of the same part – 7474. But
because each of other components represents different part, the part reference has
to be re-assigned while copying. Additional option tool Change part assignment (F6)
should be active in order to assign part to copied component in case it differs from
part referenced by “source” component. Identical rules apply here as with part
assignment for component reconstructed from package template (see above). This
option has to be ON while copying U2 to U3, U3 to U4 and U4 to U5. When this last
copying is done all components on this board are reconstructed. To rebuild the rest
of the board, use automatic reconstructing tools for via holes, traces/netlist and
finally for copper pour areas ...