<s>
In	O
electronic	O
design	O
,	O
wire	B-Algorithm
routing	I-Algorithm
,	O
commonly	O
called	O
simply	O
routing	B-Algorithm
,	O
is	O
a	O
step	O
in	O
the	O
design	O
of	O
printed	O
circuit	O
boards	O
(	O
PCBs	B-Language
)	O
and	O
integrated	O
circuits	O
(	O
ICs	O
)	O
.	O
</s>
<s>
It	O
builds	O
on	O
a	O
preceding	O
step	O
,	O
called	O
placement	O
,	O
which	O
determines	O
the	O
location	O
of	O
each	O
active	O
element	O
of	O
an	O
IC	O
or	O
component	O
on	O
a	O
PCB	B-Language
.	O
</s>
<s>
After	O
placement	O
,	O
the	O
routing	B-Algorithm
step	O
adds	O
wires	O
needed	O
to	O
properly	O
connect	O
the	O
placed	O
components	O
while	O
obeying	O
all	O
design	O
rules	O
for	O
the	O
IC	O
.	O
</s>
<s>
Together	O
,	O
the	O
placement	O
and	O
routing	B-Algorithm
steps	O
of	O
IC	O
design	O
are	O
known	O
as	O
place	O
and	O
route	O
.	O
</s>
<s>
The	O
task	O
of	O
all	O
routers	B-Algorithm
is	O
the	O
same	O
.	O
</s>
<s>
The	O
primary	O
task	O
of	O
the	O
router	B-Algorithm
is	O
to	O
create	O
geometries	O
such	O
that	O
all	O
terminals	O
assigned	O
to	O
the	O
same	O
net	O
are	O
connected	O
,	O
no	O
terminals	O
assigned	O
to	O
different	O
nets	O
are	O
connected	O
,	O
and	O
all	O
design	O
rules	O
are	O
obeyed	O
.	O
</s>
<s>
A	O
router	B-Algorithm
can	O
fail	O
by	O
not	O
connecting	O
terminals	O
that	O
should	O
be	O
connected	O
(	O
an	O
open	O
)	O
,	O
by	O
mistakenly	O
connecting	O
two	O
terminals	O
that	O
should	O
not	O
be	O
connected	O
(	O
a	O
short	O
)	O
,	O
or	O
by	O
creating	O
a	O
design	O
rule	O
violation	O
.	O
</s>
<s>
In	O
addition	O
,	O
to	O
correctly	O
connect	O
the	O
nets	O
,	O
routers	B-Algorithm
may	O
also	O
be	O
expected	O
to	O
make	O
sure	O
the	O
design	O
meets	O
timing	O
,	O
has	O
no	O
crosstalk	O
problems	O
,	O
meets	O
any	O
metal	O
density	O
requirements	O
,	O
does	O
not	O
suffer	O
from	O
antenna	O
effects	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
This	O
long	O
list	O
of	O
often	O
conflicting	O
objectives	O
is	O
what	O
makes	O
routing	B-Algorithm
extremely	O
difficult	O
.	O
</s>
<s>
Almost	O
every	O
problem	O
associated	O
with	O
routing	B-Algorithm
is	O
known	O
to	O
be	O
intractable	O
.	O
</s>
<s>
The	O
simplest	O
routing	B-Algorithm
problem	O
,	O
called	O
the	O
Steiner	O
tree	O
problem	O
,	O
of	O
finding	O
the	O
shortest	O
route	O
for	O
one	O
net	O
in	O
one	O
layer	O
with	O
no	O
obstacles	O
and	O
no	O
design	O
rules	O
is	O
NP-hard	O
if	O
all	O
angles	O
are	O
allowed	O
and	O
NP-complete	O
if	O
only	O
horizontal	O
and	O
vertical	O
wires	O
are	O
allowed	O
.	O
</s>
<s>
Variants	O
of	O
channel	B-Algorithm
routing	I-Algorithm
have	O
also	O
been	O
shown	O
to	O
be	O
NP-complete	O
,	O
as	O
well	O
as	O
routing	B-Algorithm
which	O
reduces	O
crosstalk	O
,	O
number	O
of	O
vias	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
Routers	B-Algorithm
therefore	O
seldom	O
attempt	O
to	O
find	O
an	O
optimum	O
result	O
.	O
</s>
<s>
Instead	O
,	O
almost	O
all	O
routing	B-Algorithm
is	O
based	O
on	O
heuristics	B-Algorithm
which	O
try	O
to	O
find	O
a	O
solution	O
that	O
is	O
good	O
enough	O
.	O
</s>
<s>
This	O
introduces	O
many	O
additional	O
complications	O
not	O
faced	O
by	O
routers	B-Algorithm
for	O
other	O
applications	O
such	O
as	O
printed	O
circuit	O
board	O
or	O
multi-chip	B-Algorithm
module	I-Algorithm
design	O
.	O
</s>
<s>
The	O
earliest	O
types	O
of	O
EDA	O
routers	B-Algorithm
were	O
"	O
manual	O
routers	B-Algorithm
"	O
—	O
the	O
drafter	O
clicked	O
a	O
mouse	O
on	O
the	O
endpoint	O
of	O
each	O
line	O
segment	O
of	O
each	O
net	O
.	O
</s>
<s>
Modern	O
PCB	B-Language
design	O
software	O
typically	O
provides	O
"	O
interactive	O
routers	B-Algorithm
"	O
—	O
the	O
drafter	O
selects	O
a	O
pad	O
and	O
clicks	O
a	O
few	O
places	O
to	O
give	O
the	O
EDA	O
tool	O
an	O
idea	O
of	O
where	O
to	O
go	O
,	O
and	O
the	O
EDA	O
tool	O
tries	O
to	O
place	O
wires	O
as	O
close	O
to	O
that	O
path	O
as	O
possible	O
without	O
violating	O
design	O
rule	O
checking	O
(	O
DRC	O
)	O
.	O
</s>
<s>
Some	O
more	O
advanced	O
interactive	O
routers	B-Algorithm
have	O
"	O
push	O
and	O
shove	O
"	O
(	O
aka	O
"	O
shove-aside	O
"	O
or	O
"	O
automoving	O
"	O
)	O
features	O
in	O
an	O
interactive	O
router	B-Algorithm
;	O
the	O
EDA	O
tool	O
pushes	O
other	O
nets	O
out	O
of	O
the	O
way	O
,	O
if	O
possible	O
,	O
in	O
order	O
to	O
place	O
a	O
new	O
wire	O
where	O
the	O
drafter	O
wants	O
it	O
and	O
still	O
avoid	O
violating	O
DRC	O
.	O
</s>
<s>
Modern	O
PCB	B-Language
design	O
software	O
also	O
typically	O
provides	O
"	O
autorouters	O
"	O
that	O
route	O
all	O
remaining	O
unrouted	O
connections	O
without	O
human	O
intervention	O
.	O
</s>
<s>
Many	O
routers	B-Algorithm
execute	O
the	O
following	O
overall	O
algorithm	O
:	O
</s>
<s>
First	O
,	O
determine	O
an	O
approximate	O
course	O
for	O
each	O
net	O
,	O
often	O
by	O
routing	B-Algorithm
on	O
a	O
coarse	O
grid	O
.	O
</s>
<s>
This	O
step	O
is	O
called	O
global	O
routing	B-Algorithm
,	O
and	O
may	O
optionally	O
include	O
layer	O
assignment	O
.	O
</s>
<s>
Global	O
routing	B-Algorithm
limits	O
the	O
size	O
and	O
complexity	O
of	O
the	O
following	O
detailed	O
routing	B-Algorithm
steps	O
,	O
which	O
can	O
be	O
done	O
grid	O
square	O
by	O
grid	O
square	O
.	O
</s>
<s>
For	O
detailed	O
routing	B-Algorithm
,	O
the	O
most	O
common	O
technique	O
is	O
rip-up	O
and	O
reroute	O
aka	O
rip-up	O
and	O
retry	O
:	O
</s>
<s>
If	O
not	O
all	O
nets	O
can	O
be	O
successfully	O
routed	O
,	O
apply	O
any	O
of	O
a	O
variety	O
of	O
"	O
cleanup	O
"	O
methods	O
,	O
in	O
which	O
selected	O
routings	B-Algorithm
are	O
removed	O
,	O
the	O
order	O
of	O
the	O
remaining	O
nets	O
to	O
be	O
routed	O
is	O
changed	O
,	O
and	O
the	O
remaining	O
routings	B-Algorithm
are	O
attempted	O
again	O
.	O
</s>
<s>
This	O
multi-pass	O
"	O
iterative-improvement	O
"	O
routing	B-Algorithm
method	O
is	O
described	O
by	O
the	O
following	O
algorithm	O
:	O
</s>
<s>
(	O
Some	O
of	O
the	O
routings	B-Algorithm
will	O
in	O
general	O
have	O
shorts	O
or	O
other	O
design	O
violations	O
.	O
)	O
</s>
<s>
Proceed	O
to	O
the	O
next	O
iterative	O
pass	O
until	O
routing	B-Algorithm
is	O
complete	O
and	O
correct	O
,	O
is	O
not	O
further	O
improved	O
,	O
or	O
some	O
other	O
termination	O
criterion	O
is	O
satisfied	O
.	O
</s>
<s>
Most	O
routers	B-Algorithm
assign	O
wiring	O
layers	O
to	O
carry	O
predominantly	O
"	O
x	O
"	O
or	O
"	O
y	O
"	O
directional	O
wiring	O
,	O
though	O
there	O
have	O
been	O
routers	B-Algorithm
which	O
avoid	O
or	O
reduce	O
the	O
need	O
for	O
such	O
assignment	O
.	O
</s>
