Close

Trusting the Autorouter Hack Chat Transcript

A event log for Trusting the Autorouter

In this chat, we welcome Ben Jordan from Altium to discuss routing technology and PCB design

LutetiumLutetium 02/23/2018 at 21:101 Comment

Sophi Kravitz says:

for those who are here now, the reason I asked @Ben Jordan to join us was because of the last EDA chat where a bunch of you were talking about autorouting

in a not so favorable way :)))

I thought it would be excellent to discuss from the standpoint of understanding how it works

@Ben Jordan welcome! please introduce yourself!

Ben Jordan says:

Hi all, thanks for coming. I've worked at Altium for 13.5+ years

I *was* an FPGA designer, then R&D applications engineer, then FAE, then product manager

I've seen a lot change in EDA, and worked with some cool people including @technolomaniac who's now with Autodesk, and Dave Jones from EEVBlog. Heard every opinion there is about auto routing tech

This topic is contraversial

Sophi Kravitz says:

@Ben Jordan why do you think it's contraversial

Ben Jordan says:

Most professional PCB designers I have talked to would not use an autorouter. They wear the T-shirt that says "never trust the autorouter".... and usually for good reasons

But realistic people, also know if you have computers, you should use them... right?

First, let me 'splain some autorouter history from our side…

Sophi Kravitz says:

our first q comes from @Lutetium : Where can someone who has felt duped by the autorouter time and time start to begin seeing it the useful tool it was meant to be?

Ben Jordan says:

Excellent question

hopefully knowing the how it works a bit will help with that

First, let me 'splain some autorouter history from our side...

First there are different types of autorouters: Grid, Rectilinear, and Topological are the main ones

Grid routing is the oldest tech, and what you'd find in most older PCB tools. It works like this:

12:13 PM

So everything's on a grid

The router is a dumb algorithm that leaves the net's starting pad horizontally or vertically (can be arbitrary or biased) then takes right-angles to get around where it has to go. If an object (like a component pad) is in the way, it will take a left or right turn based on the overall direction.

Simple, fast, but low completion rates, and wasteful of space.

Grid based routing worked really okay for 1970s and 1980s boards which were mainly through-hole, and introduced the notion of path costs, bias, decision making

Dave Blundell says:

this is my autorouter experience, in a nutshell.

Ben Jordan says:

you can see why most poeple said, yeah, I like the idea but this can't cut it

Sophi Kravitz says:

but that was 30 years or more ago

Ben Jordan says:

yeah. so Autorouters back then were $$$$$$ add-ons to CAD workstations. A few were sold and then a few years went by and they were abandoned in favor of human labor

Grid based router was in old Protel, old P-CAD, and older versions of EAGLE as well. So then, Cooper and Chyan Technology  (now part of Cadence) came up with "Rectilinear" routing which did away with the grid.

Rectilinear routers divide the board geometry into rectangles with no grid (hence the name)

routes are still mainly done horizontal, vertical, etc. but more room was available.

For each trace being routed, it would create a new rectangle array of the board map.

Much better completion rates, but still suffered problems because the further the board was completed the more crap was in the way.

And the results never "looked" like what a human would do. And in spite of all practical opinions, apparently it matters what the routing looks like, even though the board will not likely be seen by humans once it's in the final product ;-)

So the next evolution came in the late 1990s (still, a long time ago!) with "topological" autorouters

A topological router (like the ones currently in EAGLE, PADS, Altium Designer, CircuitMaker etc) maps the board space with polygons, usually triangles:

darryln says:

12:24 PM

(CCT router in 1996 sucked mightily, trust me)

Ben Jordan says:

A lot of people abandoned automation for PCB at many times throughout history

So that's the triangle-based topology map. Now, why is this called topological? Besides the fact that the PCB has geometric topology, it's also got graph topology

Who here is into computer science?

toybuilder says:

(raises hand)

Boian Mitov says:

Maybe me... ;-)

Ben Jordan says:

right-on

John says:

(raises hand)

Paul Stoffregen says:

only a little...

Ben Jordan says:

Paul, you're killing me

Anyone looked at "graph theory" in numerical computing?

I vaguely recall that from second year at university

Sophi Kravitz says:

// googles graph theory

Ben Jordan says:

okay, so you know that "travelling businessmen" lemma they told us about in school... where the businessman has to visit 5 clients in 6 days, but they're all in different cities, and they have so much travel budget, and they can use planes, trains , or fly?

So each path has different costs, based on direction, mode of travel, ticket or gas prices etc. etc.

and you have to use Dijkstra's algorithm to find the optimal travel plan!

Well, that's precisely what a true TOPOLOGICAL AUTOROUTER does.

we assign path costs to changing layers in the PCB to avoid an obstacle, different path costs to going a long way around versus changing layer, or plow-through and ripup other already routed traces and retry (aka ripup and retry).

So this is what modern routing tools do - Altium Designer and CircuitMaker have the interactive router that does this for manual routing and auto-complete. But also the Situs autorouter does this

Dave Blundell says:

sounds like setting up an autorouter with appropriate costs is critical to getting results

Ben Jordan says:

it is ABSOLUTELY KEY

This is also what TOPOR (from Russia) does. Anyone seen that?

most of the costs are pre-done by developers, who have spent the time testing and adjusting

but you can tweak things.

Sophi Kravitz says:

which brings us to question 1: Where can someone who has felt duped by the autorouter time and time start to begin seeing it the useful tool it was meant to be?

Ben Jordan says:

Well, apart from giving it a try again, it's important to know how it works and what drives it's decisions

that's why I wanted to start with an explanation of topological routing

but there’s more to it

Sophi Kravitz says:

yeah, this is super interesting Ben

Ben Jordan says:

most people are bitterly dissappointed with autorouter resutls very soon. Why? Because we create a board shape, layout the components and netlist from schematic, and press "autoroute all" and wait to see what happens... invariably, the results suck

The router needs good input. By good input I mean reasonable and comprehensive design rules, but NOT OVERCONSTRAINED

over-constraining a design is the other major reason why automation doesn't produce good results

If a human can't route it, there's no way the software can

Earlier versions of our situs router worked pretty well for simple 2-layer boards with 0603s, SOICs, and PTH components, but would do weird things like place two vias right on top of each other.

toybuilder says:

(and loops that look like two spiders in a battle)

Ben Jordan says:

hahaa yes

Setting up some appropriate same-net clearance rules, along with defining routing orders and priorities, went a long way towards improving the results.

So we had to do some work on the routing as well, for improving the quality of the routing

John says:

@Ben Jordan , a quick question. Is the situs router the one inside of Altium 17/18?

Ben Jordan says:

yes, BUT the ActiveRoute (I'll get to that) is a completely new engine

Situs is in all our tools (except Upverter, because that's still Upverter at the moment)

And Situs can be very useful, knowing how it works and how to setup rules.

even if you don't autoroute the design, Situs can be used as an experimental tool for improving component placement, by rotating parts and moving them, then autorouting a bus, and if it has trouble, maybe rotate some other parts and adjust placement - kind of an iterative approach

So the other aspext of how these work under the hood is this: The topological autorouter is actually based on artificial intelligence

Now, I'm a complete neophyte when it comes to AI and machine learning... but I do know, that the Situs autorouting engine, and all those path costs and topology mappers, were build with nueral nets trained by a set of human-routed boards.

anfractuosity says:

Intriguing!

Ben Jordan says:

The idea was entirely to make an autorouter that generated human-like results, that thought about routing the way a person does.

Sophi Kravitz says:

do you take the boards routed with Circuit Maker and use that to train/?

Ben Jordan says:

@Sophi Kravitz we don't do that today, but I really really really WANT us to do that

I think it's the only way we can make fast autorouters that actually produce good results, in future

Sophi Kravitz says:

makes sense, lots of boards, lots of data

Dave Blundell says:

all of your board are belong to us

we are altium prepare to be assimilated

Ben Jordan says:

mwuhahahhaaaa

<evil laugh>

but no, the CM boards at this time are not examined at all programmatically (at least that I know of)

Sophi Kravitz says:

actually would be cool if the boards learned to add components + passives + routing

Ben Jordan says:

yeah - actually that's a nother whole topic for discussion, AI for things like decoupling capacitors

Some of these things just take us a long time but should be seen as trivial, yet, they're actually prety difficult to do with software.

Sophi Kravitz says:

let's come back to the AI for dc caps the next time you come back!

Sophi Kravitz says:

we have about 10 mins left and a question from @toybuilder : Is there a good way to handle things like a GND class w/ fat traces for power distribution AND still have ground for (say) pin-strapping with a normal trace and handle them (semi-) automagically?

Ben Jordan says:

in answer to @toybuilder 's question

That's handled by "neck down" rules. Neck down says, that the trace should narrow for pad entry. Then you can also use (in AD at least) rooms, and scope a design rule for "touchesroom" or "withinroom" to allow narrower traces for PWR/GND

also watch for "SMD to corner" rule which affects the distance of the neck-down trace from the pad entry to the nearest corner or via

toybuilder says:

But that only happens during the full-autorouter session? Not during AR-assisted manual routing?

Or do I just need to really set the rules better?

Ben Jordan says:

For me personally, boards are so cheap, I've pretty much made it a policy to go with 4-layers and have a GND plane

The ActiveRoute will follow the same rules as Situs

so interactive routing and batch autorouting will follow your design rules

Dave Blundell says:

4 layer boards are so nice but sometimes reality of available substrates imposes.

Ben Jordan says:

true @Dave Blundell

Ben Jordan says:

So, about ActiveRoute

ActiveRoute is an improved nueral net based topological engine, but is entirely user-guided, so it only executes groups of connections. It requires that components are already fanned-out (ie, have the vias in place) unless you're only routing on one layer

Sophi Kravitz says:

Next question is from John: Can you describe the decision making process of when it would make sense to start using the autorouter functionality? Does it depend upon the number of nodes that require routing? Does it depend upon the physical density of the nets on the board? Is there a time when the autorouter is the only method to complete the routing? Is the autorouter a crutch for the newbie pcb designer? Is the autorouter a black magic art to setup and to run?

Ben Jordan says:

Thanks John for your question

based on my own experience (which is limited), I would definitely at least partially auto-route a board if the connection count got beyond a few hundred. There are always critical nets, power supplies, and some sensitive analog stuff these days - I tend to manually route these and use experience and common sense with those. but then, there's always some which are low-speed, less sensitive to / for EMI

and digital signals which are often in parallel and all pretty much the same

those are the candidates for autorouting and activeroute.

you can always use the automation to get the bulk of the work done, then cleanup and improve by hand after

ActiveRoute is better than Situs in that it will also do length tuning for your DDR nets or USB 3.0 etc.

Sophi Kravitz says:

thanks Ben! our last question is from @Frank Leon Rose : The problem is difficult enough when you are exploring just the space of physically&electrically *valid* layouts of a complete board. If your autorouter is creating invalid layouts that seems like a qualitatively different problem. Why is creating a valid layout so difficult?

Ben Jordan says:

It's a very complex puzzle, with more than one solution. So there will always be some subjectivity involved

Frank Leon Rose says:

(Not suggesting it *isn't* difficult, just wondering from your experience what we haven't figured out yet.)

Ben Jordan says:

but if by "valid" you mean, "it works and passes EMI testing" then that'

s totally doable at least in part by automation. The number one reason why it is hard, is that you have to be careful to configure your design rules

Component placement and design rules are most important! for an autorouter or a human... either could make or break the design project.

toybuilder says:

(Running an autorouter is not a toaster -  more like an airplane - have to check everything before takeoff)

Ben Jordan says:

indeed. In fact, a good analogy would be like programming a fully automated drone

but I encourage you all to give it a go!!!, I will attempt, over the coming months, to finish my blog series and youtube videos on this subject, to at least help those using Altium tools to be able to get something useful out of Situs and ActiveRoute...

perhaps I can share progress on Hackaday?

Sophi Kravitz says:

you can! start a project!

Ben Jordan says:

excellent

toybuilder says:

That'd be nice! Thanks!!

Sophi Kravitz says:

start a project and make sure @Stephen or I knows about it :)

Sophi Kravitz says:

this officially concludes the chat. thanks so much for coming @Ben Jordan !

Sophi Kravitz says:

here's the link to the trial again: http://altium.com/free-trials

Ben Jordan says:

thank you all for asking great questions and keeping me on my toes!

Discussions

Ben Jordan wrote 04/24/2018 at 21:35 point

There's a new project I created to continue the discussion. If people are interested and ask questions then I'll be motivated to keep adding to it!

  Are you sure? yes | no