Hi, I had a wicked hard board to route (200x160mm backplane with 8192 nets) and decided it would be easier to write an autorouter instead of routing it by hand. That’s what I did.
You can see the project writeup here: OrthoRoute | Benchoff Design Portfolio
And the GitHub repo is here: GitHub - bbenchoff/OrthoRoute: A GPU-accelerated PCB autorouter for KiCad
And there’s a Youtube demo on both of those pages showing it routing a 512 net board in about 2 minutes.
This project began with figuring out the new IPC API, and it’s great. I can put my own Python stuff in here and not be tied to one set system. Awesome. So I built a GPU-accelerated autorouter. I did the ‘traditional’ autorouter first, but it is just one pass, not push-and-shove, and performs as you think an autorouter would. That is to say, not well.
The real test was building the ‘Manhattan’ autorouter. This defines a grid of traces – only horizontal on layer 2, vertical on layer 3, horizontal on layer 4, etc… and routes with the PathFinder algorithm taken from FPGA fabric routers. Blind and buried vias connect the traces together.
Algorithmically, it’s not ideal, because PathFinder operates on a constrained set; if you calibrate the constants of the algorithm for one family of FPGAs, you can use it on all other FPGAs. But all PCBs are different, so you’ll have to tune the algorithm for each board. I’m attempting some auto-tuning but it’s not really great.
But still, the idea is there. I’m really looking for feedback on this and if anyone could actually use this. The project is very much in a pre-alpha state, but it does route and commit tracks to KiCad. That’s all I needed it to do, so now I’m releasing it to the public.
Two things that are explicitly KiCad specific I’d like to ask: First off, it seems the IPC API only ‘works’ when the ‘select items’ (the arrow pointer) is active and nothing is selected. Trying to connect to the API when ‘route tracks’ is selected simply doesn’t work.
To be fair, I didn’t investigate this much beyond ‘just make sure nothing’s selected’, but I’m wondering if this is expected behavior.
Secondly, when building the ‘traditional’ autorouter engine for this, I needed a way to get the ‘free routing space’ of a board. My hack was to read the polygon of a copper pour, the idea being that I can route through a copper pour, I can’t route through anything that isn’t included in the copper pour.
So, Feature Request: Could the IPC API expose a ‘get_free_routing_space(int layer)’ function? This would return a polygon representing the routable area (basically board outline minus pads, tracks, keepouts) similar to how a copper pour is calculated but without needing actual pours on the board. This is incredibly hacky, but it’s something that actually does sound simple to implement.
Anyway, just wondering if anyone else would find this useful. Feel free to try it out.