Idea for a semi-autorouter routine

As we all know, autorouters usually do not work that well, and that probably is the reason why this feature was eventually removed from KiCAD.

One problem is that parts placement and routing are two processes that are intertwined and an autorouter usually has to deal with suboptimal parts placement from the beginning.

I have an idea for an autorouter routine that might work better. Unfortunately, I don’t know anything about programming, so I’ll drop my idea here for someone to pick it up.

Here are the steps for my routine:

  • First you set the board outlines, all parts must not be placed inside the board outlines, yet.
  • Second, you define the net properties.
  • After that, you place the parts that need to have a certain location on the board, like connectors, buttons, LEDs etc.
  • After that, you define an area which limits the space in which the autorouter is allowed to work. This feature is useful for boards with digital and analog circuitry, as you can make sure that the signals are separated. Or you can route the passives (and other parts) belonging to a certain IC easily, by defining an area for each IC.
  • The next step is to move a part into the area defined in the last step. After the part was placed, the autorouter connects the pins of the newly placed part to the closest possible pins of the part or parts already placed. You can also place parts over existing traces, the trace will then be rerouted. On a 4±layer board, all power pins will be connected with a via close to the pad. On fast computers, you can activate a live preview of the routing.
  • After having placed all parts close to an IC, you make the router area larger, so the router can connect the circuits of different ICs, and an even larger area allows for all pins to be connected to the parts that were placed in the beginning

This solution would have some advantages:

  • You still have control over parts placement, while also already seeing the traces to decide whether the position of the part makes sense
  • You save a lot of time, as most of the “obvious” connections are done in realtime
  • By using areas for the autorouter, you can makes sure that specific requirements of the layout are met.
  • You can probably use the code for the interactive router in some parts, as this is mostly an interactive router in push and shove mode with intelligent via placement and area limits, and it automatically connects the pins when you move the part into the defined area.

Basic auto router algorithms are known. Any attempt to add them will probably be to help new users over the learning hump. Developers that know the short comings are more interested in improving the tools they use.

What would be far more useful would be a sum of total ratsnest length, maybe excluding GND to aid placement. A good placement always takes far longer than the routing.

2 Likes

I personally consider the interactive router already a semi auto router. If it also gets the option to route multiple parallel traces at once (best option would be one can freely chose which traces to route) then it will already handle most usecases a simple autorouter can handle.

I kind of suspect a complex autorouter is very unlikely to be added any time soon as it would require a lot of work on the development side with questionable benefit to users (the steep learning curve and general large setup time for such an autorouter will likely mean that users who could benefit from this power will chose to continue to work by “hand” anyway, there is after all a reason why even chips are still hand routed if they have a significant analog part).


A shove mode that also works for placing new components could be a good idea as well.

2 Likes

I very much like the idea of the interactive router, and it also works pretty well for me.

You could also say I try to make my boards too “dense”, which makes it nearly impossible for any auto router to route it.

An auto router that actually works would be great, but has proven difficult over the last 40 years or more.

For the short time future I see more benefit in improving the interactive router. Currently it gets confused if track width changes (which is already an issue on github) and it likes to ad very small diagonal stubs when not needed which is my greatest annoyance. It does this less than it used to do (hail to the developers), but still happens too much. You also need to clean them up, not just for “visual” reasons, but if you leave them and more and more accumulate on the PCB, the interactive router seems to get into more trouble for moving stuff around.

I heared a rumor that Eagle has also gotten an interactive router, and there are some great video’s on youtube of another program and interactive router. It has for example features to break out an address bus from a BGA, then give it an idea of the board space it can use, and connect that address buss to for example an connector or DDR ram chips. I think they call it a “guided router”.

They can’t compete with KiCad if they don’t have that. :slight_smile:

This one drew attention of a KiCad developer, but I haven’t seen anything concrete yet. But this is an example of enhancements which are realistic and useful instead of a full autorouter.

I have also seen talk about something which I have understood to be simple single-track autorouting: “continue automatically to the other endpoint from here”.

For any post about autorouter implementation, I will suggest to read my literature research:

From what I know, the most useful “autorouter” which could be implemented should be:

  • bus routing (multiple tracks at once)
  • single-track autorouting
  • escape routing (given a BGA chip, escape a certain netclass / all pads. Advanced escape router can match the escape routing from two chips, so the track order matches each other (and there are no crosses))
  • length-matched routing (given two escaped busses, connect them so that everything is correctly length-matched)

In my optinion, each of them should give a producitivity boost. Instead of full-blown autorouting they are aimed to do a specific thing really good, which should make them useful. Especially escape routing and length-matched routing should be important for the future, with the every growing complexity of KiCad boards designed.

8 Likes

This is an example of altium’s “ActiveRoute”. Beware that the demo is half bogus, as the (not shown) schematic is clearly tweaked to make the PCB layout look nice, but it does show some nice features in the last part of the video.
https://www.youtube.com/watch?v=PPTc-lYLS0A&t=64
One of the things is that you can select a connection by clicking on or dragging over (multiple) rats nest lines.
I also like the “continue automatically to the other endpoint from here” Idea, especially as a simple short time enhancement. It lets you do some complicated escape routing manually, and then be done with it. It’s very much related to:

Some trace hugging for data and address buses may be useful, though I suspect that it will be a natural result of routing a whole bus anyway.

This is a similar example from a 2014 video of 'Xpediton xPCB Layout", which also does this, and it seems to be a “real” PCB: https://www.youtube.com/watch?v=0YdLZAQSOa4

But for me first fixing the bugs would be some obvious first steps: The trouble with changing track width (already on gitlab) and the insertion of the small segments (I’ll have to check gitlab for that).

Edit: Addition,
I did not search too thorougly, but I bumped into KiCad V6 roadmap:


… which has most of these and then some others listed also.
3 Likes

They know what they need to do to be up to par when it comes to advancement.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.