57 Replies
Can you share an image of the pcb
Also use file > bug report to send us full bug reports and we can pull the code locally (optional)



isnt the useless via remover supposed to be catching this stuff

Autorouter needs to merge those vias @0hmx
shouldi. try and fix it
For sure, you can introduce a new phase if needed for merging same net vias
ok
is there a way to have a checkpoint in the autorouter debugging thing
Wdyn
Like “go to iteration”?
like to make it start at an iteration
since everything befor ethe via remover takes about half a minute to solve
what file do i need to edit to add a new step in the pipeline?
There’s a button to start at an iteration
I think you want to add a new solver to the AutoroutingPipelineSolver
It can go at the very end
Its a pretty easy solver to make
https://github.com/tscircuit/tscircuit-autorouter/issues/335 btw this is the issue
GitHub
Autorouting Bug Report: <board#533 /> · Issue #335 · tscircuit/ts...
Bug Report Link: https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=b9a758f4-1dc2-4b22-8fb2-f7c75f6786fd (any additional details? Maybe a screenshot?)
is there a function that just routes between two points on one layer and checks if it works?
nvm that question. is there a function that checks if a route is fine?
ah sorry for the delay- yes those functions are in tscircuit/checks
they operate on circuit-json
the autorouter repo doesn't have a function like that, but you could look at the one in tscircuit/checks possibly, my guess is it collects all the vias together and runs distance checks against them. For checking same-net distance you could first collect the vias that are members of each net.
how do i add a route?
tscircuit/checks uses
circuit-json, which has a pcb_trace, but i'm kind of confused by your questionnvm i figured it out
nvm i havent figured it out.
this PR is kind of similar to what you need to do https://github.com/tscircuit/tscircuit-autorouter/pull/336
GitHub
Add same-net via merger stage by seveibar · Pull Request #336 · t...
Summary
add a SameNetViaMerger solver to co-locate overlapping vias that belong to the same net
append the via merger as the final AutoroutingPipelineSolver stage and return merged routes
cover th...
but i haven't tested it, i just directed codex to do what i mentioned, but i looked over the code and it's approximately what you should do
you can then use the autorouting debugger to animate the via merging stage
it might help me help you if you give an autorouting bug report, there is a script in that repo, something like
bun run generate-bug-report <bug-report-id> that will generate a test
that would help me know if this solution even works
btw i often use e2e3 which is something you originally reported https://capacity-node-autorouter-git-codex-add-samenet-31c2a2-tscircuit.vercel.app/?fixtureId=%7B%22path%22%3A%22examples%2Flegacy%2Fend-to-end%2Fe2e3.fixture.tsx%22%7Drn, im getting this error, but when i was testing stuff, i added
just to debug stuff, but it works with this

the errors are generated from multisimplifiedpathsolver2
you're removing vias right? Yea i think you need to just make their positions identical
wdym
unfortunately due to the representation, we need to keep the vias, but if the positions are the exact same i think core will dedupe them. It's definitely dumb
instead of removing a via, just set it's position to the via you want to merge with
we might need to add something like
consolidated_via_id, but yea circuit-json is somewhat bad at representing re-used vias (something I hope to fix but this is the hack)i think the error is from the route?
is that error from the tscircuit-autorouter? Which stage is throwing it?
do you have a autorouting bug report?
its throwing in multisomlifiedpathsolver2
are those errors from your modifications or vanilla autorouter?
theyre from the modifications
yes probably because you're removing vias no?
but im also ruoting stuff
yes so i'm saying don't remove vias
just set the position of the vias to be the same
its still throwing errors
it should get deduped later in core
i definitely don't have enough information to debug since i don't know your modifications
but i would start by doing a PR with just your reproduction, no modifications
that way i can compare the current autorouters current behavior to your modifications as they are made available
sry for the delay
Can u commit the snapshot
done
Did you push
Also format
ok formatted
Can you update the snapshot and merge main, it will allow me to see the svg diff in the pr
im getting this error when i run
bun test. i usually use npm because this happens whenever i use bun with tscircuit. can i run the tests in npm?
O(n^2) perf in constructor is fixed
Not possuble to run tests with npm, to fix that error downgrade to bun 1.3.1
Sorry for the delay!
snapshot done
Afk but take a quick peek at my comments, will do a deep review in 30-1hr
Thanks for the contribution, @0hmx can also help review
the samenetviamerger seems to be working but the multisimplified pathsolver is trying to simplify it and puts the via back. how should i fix it? should i just have a flag say that this part of the route shouldnt be simplified or should i have the samenetviamerger after the multisimplifiedpathsolver?


I would do the vi merging as the last stage maybe
Or does that cause other issues
Yea the thing is it would require a different simplification algorithm to have same net vias be coupled for that path simplifier, so you have to do same net via merging at the end
how do i tell if there is a trace on the top layer?

Not sure what you mean
When moving a via? You have to move points on the trace as well
the trace between the via and the bottom red trace
actaully nvm i think i solved it
@Seve i think ive fixed everything you talked about and also all tests pass now
❤️
me rn

