Open Source High Quality Autorouting: Is it possible? - Page 1
Forum section: electronics / general

author: timofonic
author_rank: Frequent Contributor
timestamp: August 26, 2015, 06:50:50 pm
content: Hello.I found the following projects related to PCB autorouting. How are they in terms of functionality?The common saying is that PCB autorouting is like black magic and just a few big companies managed to make it somewhat work.Why is PCB autorouting so difficult to manage efficiently? Where's the problem behind it? Why are there still issues about it after so many years? Or is the research just fine by private companies and kept their algorithms secret?I know what happened about Zuken and FreeRouting. Despite its coded in Java, it looked promising.Just for information, some URLs about PCB autorouting projects;https://github.com/markemer/pcb/blob/master/src/toporouter.chttp://apt.cs.manchester.ac.uk/projects/tools/mucs-pcb/http://www.ssalewski.de/Router.html.enhttps://github.com/markemer/pcb/blob/master/src/autoroute.chttps://github.com/sephamorr/FreeRoutehttps://github.com/iank/route1https://github.com/vygr/C-PCBKind regards.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: August 26, 2015, 06:53:28 pm
content: i use freerouting. I grabbed the source when it came up about the zuken takedown. built it to run locally (no webstart etc needed), the others I cant comment on.

author: free_electron
author_rank: Super Contributor
timestamp: August 26, 2015, 06:54:17 pm
content: the definition of the problem is very simple : you are trying to solve the 'travelling salesman problem' , except you are doing it for thousands of salesmen travelling at the same time and they can't use the same roads ... throw in rules for certain roads to be the same length and rules to keep certain roads specific distances away from others and how many bridges you can built between point a and b ... and you can imagine how the complexity simply explodes...There is only one router that really works and that is SPECCTRA. And even that is a bitch to control and set up and get anything useful out of it.

author: janoc
author_rank: Super Contributor
timestamp: August 26, 2015, 07:03:52 pm
content: Yo and a little detail - traveling salesman is most likely NP-hard too, so writing an autorouter that will actually do its jobandfinish in a reasonable time is pretty much black magic.Then you have pesky domain-specific details that an experienced board designer will know but autorouters generally don't - like don't run weak ADC input traces next to the main Vcc rail. It is amuchmore complex problem than just routing few lines and making sure they don't cross.Autorouter is not something that a hobbyist or someone working on an open source project in their free time is likely going to have resources and knowledge to tackle - that's why there are no decent ones around.@Circuiteromalaguito, if you are looking for a "push a button for a ready to manufacture board" type of solution, better spend the time elsewhere - even the expensive commercial autorouters are not anywhere near to that sort of ability yet, unless you are doing very simple boards (but then why to use autorouter?).

author: marshallh
author_rank: Unknown
timestamp: August 27, 2015, 03:39:43 am
content: I have used both freerouting and ELECTRA, freerouting produces superior results for small boards with zero effort.ELECTRA scales to large boards well, but does need a lot of care and feeding to produce something meaningful.

author: rs20
author_rank: Super Contributor
timestamp: August 27, 2015, 04:13:47 am
content: Autorouting is not the travelling salesman problemat all, because the complexity in TSP is in finding the one and onlyoptimalsolution. Meanwhile, autorouters just have to find a solution that conforms to certain geometric constraints (tracks mustn't intersect), a problem which TSP isn't concerned with at all. TSP is really hard with 2000 points, right? I can write you an autorouter right now that can instantly connect 2000 points (all on the same net) on a PCB right now easily. TSP is one continuous, unbranching path. Autorouters are allowed to branch.So no, there's basically nothing at all in common between TSP and autorouting. TSP doesn't even operate in a cartesian space, it's on a graph.The misapprehension about TSP aside, autorouters need a lot of careful training before they can be useful -- "these are power rails, they should be short and thick". "This chip should have no signal lines running under it". "These are delicate analog signal traces that should be kept far away from the switching power supply". "The ground plane shouldn't be interrupted unnecessarily". It's very hard a) for the user to teach the autorouter all this, and b) for the autorouter to be able to take this all into account. Just the UI for the human-machine interaction there is a pain. It's one of those really ill-defined problems that benefits from man-years of hacky little adjustments and special cases and painstaking,expensivedevelopment. And even when an autorouter is done well, it requires a great deal of user configuration to actually work well. Which is why completely autorouting a board from scratch should never be done; you'll spend more time teaching the computer how to route certain parts than how long it'd take you to do yourself. Now if you have already routed your power lines and CPU and all that, and all you have left is 250 lines from shift registers than lead to 250 LEDs,thenyou're in autorouter territory. And even a fairly dumb autorouter will do well in thus circumstances. Routing CPUs to PCI express slots and memory slots is another example where autorouters shine, although those autorouters have 8 or more PCB layers to work with and undoubtedly that's not what you're planning to do.Oh, and also, autorouting on even just a 4 layer board is much better than a 2 layer board. Once you have four layers, fairly trivial strategies like "Layer 1 is signals running horizontal, Layer 2 is ground, Layer 3 is power, Layer 4 is signals running vertical" work quite nicely.

author: zapta
author_rank: Super Contributor
timestamp: August 27, 2015, 04:29:10 am
content: Quote from: free_electron on August 26, 2015, 06:54:17 pmMinimal Steiner tree is a closer problem because you are allowed to introduce junction points. And then you have the obstacles, dependencies between nets (one blocking the other) and multi layers.It was shown that the hard part of routing is finding the topology of the traces (how they go in relation to pads, obstacles and to each other). Once this is determined, assigning exact x/y locations to the traces can be done algorithmically fast in polynomial time. IIRC Altium is using a topological router.This guy designed a topological routerhttp://www.ssalewski.de/Router.html.en. You can see how he cares only on the topological aspects of the routing, representing the wires as rubber bands.Arduino Blinky is much more fun IMO.

author: timofonic
author_rank: Frequent Contributor
timestamp: August 27, 2015, 04:37:01 am
content: Quote from: rs20 on August 27, 2015, 04:13:47 amCouldn't a PCB autorouter be collectively trained and learn in some way plus having a component library with useful metadata (this chip needs specific routing, take care of power lines, these RF stuff must be fine in certain way...), then submit that training data somewhere and improve it based on "big data"? And even make it learn from manual routing.I know it's an insane idea and just thinked about OCR and speech recognition systems. Maybe some kind of weak AI could be applied here?I'm a total layman, just speculating and very curious about why it's so difficult.

author: rs20
author_rank: Super Contributor
timestamp: August 27, 2015, 06:28:21 am
content: You should have a look at a PCB netlist file... it's just "there's a chip called U1, it has package TQFP-48, and pin 1 connects to the net called "Net-U1-1", pin 2 connects to the net "+5V", etc etc. Obviously in a machine-readable text-format, but that's the gist of it. An AI can't glean anything from that (aside from making assumptions based on the name of the nets, which is just a horrible idea), even a human would have to either make the name-based assumption, or reverse-engineer the original schematic to understand what net is actually doing (complete with reading component datasheets). You think an AI can handle this when 99.9% of humans aren't able to?I'm not sure if you're saying that you're a layman with respect to software engineering, or PCB layout as well. But if you're a software layman, this doesn't need to be a mystery to you. I'd encourage you to imagine teaching another layman how to do PCB layout, since a computer is the ultimate extremely fast, pedantic, stupid layman. Try to imagine a list of written-out instructions that you could hand to a temp worker to do PCB layout. Because a computer program is just that, a written-out pile of instructions.Regarding machine learning and AI, you perhaps appear (like many) to think that AI is some sort of magical panacea that just solves any problem. But the problems you mentioned (OCR, speech recognition) are recognition problems: take a large file (image of words, or speech audio) and output text (which has precisely one correct answer). In the case of image recognition, the successive layers in the neural net recognise progressively more complex/higher level concepts -- lines/bends, then junctions and loops, then digits. Similar for audio. PCB autorouting as a huge space of different-looking but essential equally acceptable outputs, so the solution is not unique; the output is a huge amount of data because it's a fully routed board, not some condensed text output; and it's really hard for me to imagine what the different layers of the neural net would be doing. What does the first layer of the neural net do?One last thought: 4 year old humanscando OCR and speech recognition. Theycan'tlay out PCBs better than autorouters. Just imagine trying to teach a 4 year old to route a PCB, and you should have a good sense of what trying to program a computer is like.

author: Bassman59
author_rank: Super Contributor
timestamp: August 27, 2015, 07:24:58 pm
content: Quote from: Circuiteromalaguito on August 27, 2015, 04:37:01 amThe time you spend specifying all of the various layout constraints is better spent doing something else -- like, perhaps, doing the layout work manually.Here's the problem I see with the whole notion of hobbyist autorouters: In order to get useful output from the autorouter, the designer needs to fully understand the design requirements and all of the specialist layout rules. This requires experience.The hobbyist thinks that all he needs to do is just hand the netlist and the board size off to the autorouter and a high-quality board layout, better than the person can do manually, will pop out. But perhaps this hobbyist doesn't have the experience required to know what defines "high-quality board layout," so he can't properly constraint the autorouter, and the result is basically the same thing he'd get if he did it manually.In other words, just expecting a high-quality result from the autorouter when you don't know what that means is a mistake.I will offer the following comparison: lots of people complain about the lack of open-source FPGA synthesis and place-and-route tools. The problem domain for FPGA tools and PCB autorouters is highly similar. It's very complex work that requires disparate skills -- programming, obviously, but also a full understanding of the problem domain. The handful of people (compared to the number of skilled application programmers) who can do this work have a simple choice: a) do it as an open-source project, and maybe make a name for yourself, or b) work for Cadence or Mentor Graphics and get paid a nice salary and let someone else handle the marketing and support.

author: nctnico
author_rank: Super Contributor
timestamp: August 27, 2015, 07:29:51 pm
content: Quote from: Bassman59 on August 27, 2015, 07:24:58 pmThat thought has kept me from attempting to use an autorouter with SMD boards. I think I autorouted one SMD board but I wasn't satisfied with the result. Back in the IC-in-DIP-package days I used the autorouter in Protel Autotrax a lot but it took a lot of tweaking to get useful results. And in many cases doing the last 3% of the traces and tidying up the power distribution took a lot of time as well.

author: free_electron
author_rank: Super Contributor
timestamp: August 27, 2015, 07:52:33 pm
content: Quote from: rs20 on August 27, 2015, 04:13:47 am

author: ScribblesOnNapkins
author_rank: Regular Contributor
timestamp: August 28, 2015, 01:34:29 pm
content: The real question is will any router closed or open source ever actually prove useful. For digital stuff maybe they can do the bulk work of doing buses but still.

author: Bassman59
author_rank: Super Contributor
timestamp: August 28, 2015, 08:45:45 pm
content: Quote from: ScribblesOnNapkins on August 28, 2015, 01:34:29 pmAt a previous job where some of the products were multiple-CPU processor boards, the layout gang would use specctra for the processor memory and PCI etc bus routing. Doing a couple hundred matched-length lines by hand is a royal pain in the ass. The autorouter could do it in minutes. The rest of the board was routed by hand.

author: vygr
author_rank: Contributor
timestamp: August 29, 2015, 02:00:46 pm
content: Hi folks, I'm the author ofhttps://github.com/vygr/C-PCB.I just wanted to do this as it was a technical challenge, I did the dsn import prog so I could test against a friends shower room controller board filesI can route his board at 2-Layers in 1 second on the default settings, although more complex settings push that time up a little. There are a lot of paramaters to control direction vectors, wire grouping, Z transition cost and so forth to play around with, as well as various distance metrics worth trying. Viewer output can be alpha'd coloured layers or a Gerber style PCB copper mask for each layer. You can view the route in realtime as it calculates or view an animation too.It uses glfw3 lib for the viewer, but the rest is plain old c++11/14 so should be easy to build on most systems for anyone that wants to play with it.Not had much exposure to bigger test files, and the dsn importer was done by reverse engineering the spec via just looking at the dsn filesBest regards to all.Chrisps. I might be slow to reply as I'm of on holiday for a while, so excuses my tardiness !pps. Why not take a look at the prog and maybe give it a few Github stars

author: timofonic
author_rank: Frequent Contributor
timestamp: August 30, 2015, 12:49:22 am
content: Thanks a lot for your reply!I'm the guilty of making you post here, I confess it!I think it's a good idea to make your project gain visibility, suggestions, testing and possible collaborators.Maybe the perfect autorouter isn't possible to do, but maybe there could be an Open Source one in the future that could compete with the propietary ones.I really hope your project becomes this one!I'll try your project soon, as I need to learn KiCad and would like to do autorouter as a way of testing. They are easy designs, but I'll provide feedback.Anyway....Could anyone try C-PCB with deferent designs in terms of complexity and compare it with good quality manual routing? Maybe this could provide interesting feedback.I'm not skilled to make a complex PCB, I'm to newbie at electronics

author: zapta
author_rank: Super Contributor
timestamp: August 30, 2015, 03:10:38 am
content: I use the eagle auto router on every project. I first route manually the critical nets and then let the auto router do the rest. I care about functionality, not traces aesthetics.

author: rs20
author_rank: Super Contributor
timestamp: August 30, 2015, 04:30:27 am
content: Quote from: zapta on August 30, 2015, 03:10:38 amIf you're doing, for example, an audio amp with a SMPS,allyour nets are "critical" to some extent.

author: zapta
author_rank: Super Contributor
timestamp: August 30, 2015, 05:14:06 am
content: Quote from: rs20 on August 30, 2015, 04:30:27 amI don't ;-)Mostly MCU stuff. Roughly %25 of my nets are critical (power, crystal, USB lines, etc). I also use the auto router to evaluate component placement.

author: timofonic
author_rank: Frequent Contributor
timestamp: November 06, 2015, 06:51:16 pm
content: Hello.Are there someone working on this?Kind regards.

author: Godzil
author_rank: Frequent Contributor
timestamp: November 07, 2015, 04:00:28 pm
content: I don't know what it is doing, but C-PCB is unable to route my design, where freerouter has done it in a snap(Hu? we can't direct attach DSN files? o_O)The two images are the hand routed version in 3D view without the solder mask, I can do it better for sure, and remove the two via on the board, but I'm lazy...

author: timofonic
author_rank: Frequent Contributor
timestamp: November 07, 2015, 11:02:38 pm
content: Quote from: Godzil on November 07, 2015, 04:00:28 pmCan you show the results by both C-PCB and Freerouter? It could be interesting to see themOSHW retrocomputing? We need a retro section in eevblog, I'm also a retrocomputer/retrogaming fan

author: Godzil
author_rank: Frequent Contributor
timestamp: November 07, 2015, 11:13:49 pm
content: Here are the results of freerouter, keeping the planes I've done manually for the routing I made by hand, the result without is better than when I don't keep them, but I'm not really fond of it. I will join the result of freerouter without the planes.And for C-PCB, no results at all, I get nothing interesting I don't know why.Edit: I've added the result without the planes, this one is really ugly

author: timofonic
author_rank: Frequent Contributor
timestamp: November 08, 2015, 01:52:33 am
content: I hope C-PCB developer read this, maybe he can find why...Do you want to add this as an issue?https://github.com/vygr/C-PCB/issues

author: vygr
author_rank: Contributor
timestamp: November 10, 2015, 08:44:31 pm
content: Hey folks, C-PCB hasn't had a huge test with various DSN files ! If fact it only had two board designs to test with and I reverse engineered the DSN format so can't say for certain that I got it correct !However I would be interested to look at the DSN file and see why nothing happens at all if you could get a copy to me for testing ?When you tried it did it run the test files OK before you ran your own DSN file ? Just as a sanity check.Can you send me a copy via the Github project maybe ?Best regardsChris

author: vygr
author_rank: Contributor
timestamp: November 10, 2015, 08:50:34 pm
content: I've grabbed the Oric_mouse.dsn file and I'll have a look at the weekend to see if I can find the issue.RegardsChris

author: free_electron
author_rank: Super Contributor
timestamp: November 10, 2015, 08:59:10 pm
content: yuckkk. Look at all the whacky pad terminations... what a pile of garbage.

author: vygr
author_rank: Contributor
timestamp: November 10, 2015, 09:19:48 pm
content: Hi folks, just had a quick look before I have to turn in for the night. Looks like it completely gets the parsing of the DSN file wrong ! So no surprise the router prog gets nowhere. I didn't expect it to work on any other dsn file currently so this is no surprise to meIf I have permission from the owner I'll use the Oric_mouse.dsn file as a test dsn and try sort out my dsn2png prog. Thanks.RegardsChris

author: Godzil
author_rank: Frequent Contributor
timestamp: November 10, 2015, 10:22:00 pm
content: vygr: Yes of course! If I've put the file there, it was for you to play with it!

author: vygr
author_rank: Contributor
timestamp: November 11, 2015, 06:52:13 pm
content: OK, found two errors in my dsn2pcb parser thanks to the Oricmouse dsn file.1) Did not understand Oval pins could be (0,0,0,0) ie a Circle ! Now it just parses them to a circular pin.2) Was getting the rotation angle of components the wrong way round, clockwise<->anti-clockwise.Fixed and uploaded the fix, could do with a better testing but I'll have to wait till weekend for that.Couple of screen grabs with a few different parameters, routed in a few seconds.Regards allChris

author: vygr
author_rank: Contributor
timestamp: November 11, 2015, 07:09:26 pm
content: A few boards with some of the flood vector params tweaked a bit just for fun.RegardsChris

author: Godzil
author_rank: Frequent Contributor
timestamp: November 12, 2015, 10:17:29 am
content: If I may, you should add an option to force pad neckdown to be either a 0/90/180/270° exit or a 0/45/90/135/180/225/270/315° exit, and if it takes only a few seconds thats interesting and much more quicker than freerouting, it only miss the "optimisation" phase I think

author: vygr
author_rank: Contributor
timestamp: November 12, 2015, 05:54:45 pm
content: Neckdown ? Term I've never heard of ! Time for some more studyYeah most of these runs took a few seconds. The test board I use from my friends wet room controller take 1.2s.You can stretch that time out by using very high resolution routing or high Z bias values, but for a quick route it's generally taking a few seconds.Chris

author: vygr
author_rank: Contributor
timestamp: November 12, 2015, 06:04:54 pm
content: Example using route the following command line.time ./dsn2pcb test4.dsn | ./pcb --v 0 -r 2 -z 16 | ./view -o 1 -s 6Number of terminals: 242Number of Nets: 83Number of Vias: 36real 0m4.347suser 0m4.333ssys 0m0.009sSmallish Z bias.RegardsChris

author: timofonic
author_rank: Frequent Contributor
timestamp: November 13, 2015, 03:02:32 pm
content: Hi.Thanks a lot for your fixes!Does it generate pcb files for gEDA's PCB? Have you considered making a tool for KiCad too?As for GUI...This project looked interesting but got abandoned since 2011:https://launchpad.net/qautorouterAnyone willing to provide all kind of .dsn files for testing? I'm going to export some old projects this weekend in a few spare time, as I'm very busy at this moment. But they are very simple designs, complex designs nicely routed to compare would be nicer to have, I think.Kind regards.

author: vygr
author_rank: Contributor
timestamp: November 13, 2015, 04:59:37 pm
content: Dons't create anything that you would call a standard output format. I just wanted to work on the route solving problem, the viewer I created is just so I can sanity check the output. The router takes a simple format but it's not standard. I did the DSN converter so I could expose the router to more test files.So no KiCAD plugin or anything else.Problem is that, beyond some simple fixes, I don't have the capacity to do any heavy work on it now due to work consuming my time.I would hope that if the routing speed is good that some enterprising person might have a go at using the router portion to create a KiCAD plugin.My stretch goal for the router was to be able to do routing in near realtime, ie within a few seconds of moving your component on a GUI the board was re-routed and done. At least for simpler hobby boards.One of the things that would need doing is to make sure that existing protected wiring is maintained. Currently even is there is a wiring section in the .DSN file I just ignore it.RegardsChris

author: Godzil
author_rank: Frequent Contributor
timestamp: November 13, 2015, 05:01:50 pm
content: I don't know anything about the SES format, but for Kicad, if you could convert your output to the SES format, it would be possible to import the output of your router into kicad pcbnew, like we do using freerouter

author: timofonic
author_rank: Frequent Contributor
timestamp: November 28, 2015, 06:10:21 pm
content: Does anyone know about the SES format?

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: December 05, 2015, 09:28:09 am
content: The DSN and SES files are defined in "SPECCTRA Design Language Reference", I found a copy of the spec by google search :http://support.ema-eda.com/search/eslfiles/default/main/sl_legacy_releaseinfo/staging/sl3/release_info/psd142/spdlr/preface.html. There are some other copies I found, that is the most recent. Not sure who owns the copyright or whether there is an official distribution point.I started looking at C-PCB as it sounds promising. First I have to get/build clang...

author: timofonic
author_rank: Frequent Contributor
timestamp: December 13, 2015, 06:27:34 pm
content: I just wrote this in the Freerouting repo after some activity, in hoping someone might get interested at looking at C-PCB.https://github.com/freerouting/freerouting/issues/7Just for fun...I found this old forum thread about freerouting...https://www.eevblog.com/forum/projects/can-you-route-better-than-an-autorouter/

author: vygr
author_rank: Contributor
timestamp: December 15, 2015, 09:10:56 pm
content: Hi guys, I just did some mods to the C-PCB repo to get it building on Ubuntu 15.10 but I have got some problem that I can't debug due to running on a VM.For some reason the router is just spinning forever, which it doesn't do on the Mac, and I can't see the output on my VM (OpenGL issue) so can't see the live output easily to hunt down the problem.I did have a problem with the Linux compiler not doing a lambda capture correctly, I tried a workaround, but it may be that this is just causing the spinning regardless. It was in a part of the code that would cause things to go wrong in a big way if the compiler error's there.But I'll keep trying.RegardsChris

author: vygr
author_rank: Contributor
timestamp: December 16, 2015, 09:13:43 pm
content: Well the latest version of C-PCB is compiling and working on Ubuntu 15.10. I had to install the glfw3 libs to get the viewer app to compile but it does seams to run ok now.Regards to allChrishttps://github.com/vygr/C-PCB

author: timofonic
author_rank: Frequent Contributor
timestamp: December 19, 2015, 10:40:59 pm
content: @vygrThanks a lot!

author: timofonic
author_rank: Frequent Contributor
timestamp: January 08, 2016, 10:31:13 pm
content: Stefan Salewski updatedhis websiteagainQuote

author: Godzil
author_rank: Frequent Contributor
timestamp: January 08, 2016, 10:35:25 pm
content: Why using another just another langage??...Will wait for the result but I fear that it will not help to integrate in tools like Kicad, which is already a big beast(aka they already struggle adding Python to Kicad, I don't think they may consider integrating a Ruby interpreter)I hope the main dev is just using Ruby as a prototyping tool

author: timofonic
author_rank: Frequent Contributor
timestamp: January 08, 2016, 11:06:39 pm
content: Quote from: Godzil on January 08, 2016, 10:35:25 pmMaybe he was more comfortable with it for prototyping it. I dunno.He seems to be more of a researcher. Let him research on whatever language while or provides interesting results for the first FOSS community and

author: timofonic
author_rank: Frequent Contributor
timestamp: May 22, 2016, 06:54:36 am
content: Any news about this? gEDA people are playing with Freerouting, but the use of Java and controversial legal situation are a major issue.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: May 22, 2016, 08:15:40 am
content: I wonder if the combination of Deep Learning stuff (feed it a gazillion existing PCB layouts) and GPU horsepower might open up some possibilities, but as has been said, a major issue is simply explaining what the constraints are, however clever the routing algorithm is.I think there probably is some scope for "assisted" routing, where a person guides the progress of a partly automated process. And maybe if this gets used enough it would start to learn and present better options sooner, requiring less intervention.

author: janoc
author_rank: Super Contributor
timestamp: May 22, 2016, 10:24:02 am
content: I think that the problem is not the routing algorithm as such. That's relatively trivial part of the problem. A much bigger issue is how to bring all that "tribal knowledge" into it in the form of well performing constraints, as you have said.So going to deep learning or GPU acceleration won't help much there - that is addressing the "easy" part of the problem. Unless you are auto-routing something on the scale of a PC motherboard, you likely don't care whether the routing takes 5 or 20 minutes so much, but you do care whether the setup is a 15 minutes or half a day of work.Also constraint solvers are not really the type of problem that lends itself well to massive parallelization (which is where GPUs shine). The inter-dependencies will often force at least partial serialization of the problem and it may actually take more time if using GPU than doing it purely in software because of the non-negligible overheads involved.For the assisted routing I would like to see some improvements of the push-and-shove router that is in KICAD already - e.g. routing several traces in parallel (like a bus). It can route differential pairs already, so this would be a natural extension. That pretty much covers most of the common needs for auto-routing already.

author: lem_ix
author_rank: Regular Contributor
timestamp: May 22, 2016, 02:07:13 pm
content: Had a one semester subject on the topic. We used Matlab to auto route and place components in Altium but the results were far from stellar(better then altium tho) and the time to set these algorithms up is better spent just doing it by yourself. I could imagine using these algorithms for something repeatable maybe inside an IC for standard cells(just guessing no experience). Amazing amount of books and papers on the topic but the results published in them are far from real world examples. Think that most people interested in auto routers don't have much design experience

author: timofonic
author_rank: Frequent Contributor
timestamp: May 27, 2016, 05:45:43 pm
content: It's surprising a student effort may offer better features than high end EDA software such as Altium Designer.Is so difficult to make a top quality advanced autorouter or just a "boring" topic?What able sending patches to KiCad or other projects?Those are the most active autorouters. Do to know about some more?C-PCB. Last commit: Apr 13, 2016.FreeRoutingNew. Last commit: May 27, 2016.My interest lies in assisted learning, mostly. Good autorouters aren't perfect, but they inspire me to what paths to choose and such. Routing is somewhat a therapy for my spatial issues of ADHD too.

author: Godzil
author_rank: Frequent Contributor
timestamp: May 27, 2016, 06:19:56 pm
content: Quote from: timofonic on May 27, 2016, 05:45:43 pmFirst reason. You know about the P=NP problems? and the Travelling salesman problem?Autorouting is some order of magnitude more complex than that.

author: altaic
author_rank: Unknown
timestamp: May 27, 2016, 09:58:50 pm
content: Quote from: Godzil on May 27, 2016, 06:19:56 pmI would be interested in seeing a proof of that.TSP is NP-hard with a time complexity of O(n^2 * 2^n). Auto-routing is closer to the n-body problem, which has a time complexity of O(n^2). Furthermore, there are many approximation techniques which can reduce the time to O(n log n) if not O(n). Also, the algorithms for solving such problems are highly parallelizable and thus run nicely on GPUs. Finally, routing a PCB is unlikely to be a worst-case scenario, and algorithms exist that make solving common cases fast.So, I respectfully disagree. Auto-routing is not so hard-- getting correct models from device manufacturers so can auto-routers can work is hard.

author: Godzil
author_rank: Frequent Contributor
timestamp: May 28, 2016, 12:52:47 pm
content: There are also a lot of approximation on the TSP problem.Auto routing is basically the TSP as we want the shortest path, but we have- multiple path to look at the same time- there are most of the time constrain on the path you have to choose because some sellers have to travel at the same time going to different borough of the same town (basically routing a bus)- path MUST NOT cross in most conditions, where in the normal TSP it doesn't matter- Highly parallelisable? Maybe by doing a lot of approximations, but there are some rules that would ultimately prevent parallelisations, like the fact that two track which does not belong to the same net must not ever cross, and that have a huge impact on parallelisation as each thread need to know what the other are doing, so basically they are not running asynchronously.- Giving a solution "fast" does not mean that it's the best! It's also possible to give really fast a solution for the TSP, but it will never be the best solution.There are way more constrain on routing than on the TSP, that's why it's more difficult.Current approach of auto routing are approximations and not the "best results", as current TSP solvers.

author: timofonic
author_rank: Frequent Contributor
timestamp: May 28, 2016, 01:24:57 pm
content: Why aren't brave souls improving projects like C-PCB or FreeRoutingNew? what about making a bounty for it?- C-PCB is developed in C++14, it provides a better integration with EDA software and better performance.- FreeRouting(New) provides better results, but it has a dubious legal situation and users the controversial and non-native Java programming language.

author: zapta
author_rank: Super Contributor
timestamp: May 29, 2016, 04:04:04 pm
content: Quote from: Godzil on May 28, 2016, 12:52:47 pmNets are typically not routed as a long trace going through a sequence of pads. For a single layer, single net, no obstacles, any angle routing and total length minimization, this is a closer problemhttps://en.wikipedia.org/wiki/Steiner_tree_problemwhich allows to insert additional points and to fork the trace.

author: nctnico
author_rank: Super Contributor
timestamp: May 29, 2016, 05:06:34 pm
content: Quote from: timofonic on May 28, 2016, 01:24:57 pmIMHO fixing how Kicad handles components, symbols and footprints should have a much higher priority. As it is now you can't really use it in a (somewhat) professional environment. Once you get used to what Orcad Capture CIS offers (one click BOM generation from a database) you never want to go back to editing BOM files manually!

author: Jeroen3
author_rank: Super Contributor
timestamp: May 29, 2016, 07:44:19 pm
content: Last routing sessing in Eagle I decided to record it using OBS. Inspired by Dave's Altium uSupply timelapse.I must say that it is interesting to watch to see layout choices change on the way.You can learn from yourself when playing back stuff like this.It must be really hard for an AI to perform this, because even I cannot think of all the variables at play when I'm routing a board. It's an art.

author: timofonic
author_rank: Frequent Contributor
timestamp: May 30, 2016, 08:28:14 am
content: Extreme cases are extreme.What are the best autorouters in the world? Specctre? Electra? TopoR?Do they got analyzed and reverse engineered in Europe? Maybe clean room could help.

author: Godzil
author_rank: Frequent Contributor
timestamp: May 30, 2016, 03:00:39 pm
content: Reverse engineering? Yeah probably, but I will wish you a really good luck at that, and clean room is not possible are you are not documenting API but how it is working, aka the algorithm which is likely to be patented.It's would be easier to start from a blank paper than to try to clone something existing which is that complex.

author: timofonic
author_rank: Frequent Contributor
timestamp: June 02, 2016, 10:35:30 pm
content: I see.Why not get C-PCB and improve it?What developers think about the code base? What about making it a library?

author: timofonic
author_rank: Frequent Contributor
timestamp: June 07, 2016, 12:45:28 am
content: No opinions? Any developer alive work some interest in it?

author: janoc
author_rank: Super Contributor
timestamp: June 08, 2016, 07:22:06 pm
content: Quote from: timofonic on May 30, 2016, 08:28:14 amConsidering that most people working on these things do so in their free time, I doubt that there is much interest in reverse engineering another program. The effort required in order to not put oneself in legal jeopardy (all the clean room stuff) is not something most will want to touch.Even if the algorithms weren't patented (I doubt they are - there are many many publications on graph algorithms and specifically PCB routing, so at least the general ideas cannot really be patented), unless someone actually funds a project like that then nobody is going to do it just as a "hobby". Way too much legal risk (even if reverse engineering is legal, the costs of having to defend a baseless lawsuit are not free!) and there are much more pressing problems in the free EDA tools than the lack of an autorouter.Quote from: timofonic on June 07, 2016, 12:45:28 amC-PCB is pretty much a toy at the moment and not a serious/usable router. It takes a netlist and routes everything, without any constraints or rules, such as "don't route this high current trace around my ADC!". I don't think that anyone would want to spend the non-trivial time that it would take to integrate on something that is ultimately not usable yet. Also the development doesn't seem to be very active - one developer and the last significant changes were 6 and 11 months ago.

author: vygr
author_rank: Contributor
timestamp: August 18, 2016, 05:03:55 pm
content: Hi folks, got a little time to experiment with my PCB solver. I'm going to do a JavaScript version. With a view to eventually having a website where you drop your .dsn file and set a few options and it gives you back the Gerbers etc.Just got the viewer going so far this weekend. Learning JavaScript while I go, and D3/SVG for the output. Nice thing about this version will be that any modern browser gives you all you need to route your boards, no software to install etc. The client does the solving, not the server.I'm hoping that modern JavaScript jits are as good as they say 60% C++ speed. We will see.....If it is, then hobby boards should solve in a few seconds. Well that's the plan.https://github.com/vygr/JS-PCBRegards to all as usual.Chris

author: vygr
author_rank: Contributor
timestamp: August 18, 2016, 05:12:28 pm
content: BTW I completely agree with Janoc's comments that for a comercial router you need more rules about how to route tracks. But you've got to start somewhere so I did.Thanks Timofonic for your enthusiastic push of C-PCB, but there does need to be more done than I can possibly do alone. I put it out there to see if it was useful to people. As I said before, I was interested in the problem but don't have full time I can spend on it. Certainly not if I can't make money for living from it !I'll keep adding bits as I find time, and the JavaScript web version is the next idea I'm going to tackle.Chris

author: vygr
author_rank: Contributor
timestamp: August 23, 2016, 02:14:26 pm
content: Progress being made on the JS version.Live view is now enabled athttps://vygr.github.io/JS-PCB/. No need to download or clone anything, just give it a try on a DSN file, you might find a few issues ATM, enjoy.Just got the DSN import going and the viewer. No solver ported yet, but working on it.RegardsChris

author: janoc
author_rank: Super Contributor
timestamp: August 23, 2016, 04:24:35 pm
content: Um, I don't want to pour cold water on your effort, but you do realize that a JavaScript based autorouter has very little chance to be actually integrated into anything? (unless you are planning to run it as a web service hosted somewhere, of course).I simply don't see Kicad/Geda/whatever developers to include Node.js or a Chrome/Webkit runtime (or whatever you are using) only to run your autorouter. You would stand a lot better chance to have it integrated if it had a C/C++ or Python interfaces, because that is what these projects are using already.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: August 23, 2016, 07:23:32 pm
content: Quote from: janoc on August 23, 2016, 04:24:35 pmkicad is built with wxwidgets, wx already has a wxWebView which lets you run javascript...

author: janoc
author_rank: Super Contributor
timestamp: August 23, 2016, 08:21:25 pm
content: Quote from: BloodyCactus on August 23, 2016, 07:23:32 pmwxWebView actually has to be enabled at compile time first, it is an optional component in Wx. It is also meant to display HTML using Webkit (Linux & Mac) or Microsoft's IE engine (in Windows), but that is not a full blown browser by itself. So while you can run Javascript, I would be mightily surprised if some complex "weby" framework stuff relying on the presence of certain browser features was running in it out of the box, without hooking up a ton of extra plumbing to it first.Anyhow, even if it did - have you actually tried interacting with HTML/Javascript code running inside of a webpage from outside of the HTML widget using C++ APIs? I can tell you, you don't want to go there - it is a huge and complex mess, because most of the Javascript apis are simply not accessible from outside. It is an encapsulated black box (by design) and all you get is an API to load a HTML page, navigate history, copy & paste and similar, but nothing to actually interact with the objects within the page (e.g. DOM access). So the "integration" would have to be done using temporary files, injecting bits of Javascript to the page and similar kludges. Gee, thank you ..

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: August 24, 2016, 12:14:24 am
content: Quote from: janoc on August 23, 2016, 08:21:25 pmhuh thats interesting. I use javascript scripts in java all the time for scripting. as long as you dont do DOM manipulation, you can do all kinds of javascript stuff. I thought it would have been similar in wx.

author: janoc
author_rank: Super Contributor
timestamp: August 24, 2016, 12:31:17 pm
content: Quote from: BloodyCactus on August 24, 2016, 12:14:24 amWell, look at the API of that class for yourself:http://docs.wxwidgets.org/trunk/classwx_web_view.htmlThat's all you get. There is not even direct access to the Webkit backend.