itsme - how is the gap negative?

how is the gap negative?
No description
57 Replies
Seve
Seve2w ago
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)
itsme
itsmeOP2w ago
No description
itsme
itsmeOP2w ago
No description
itsme
itsmeOP2w ago
No description
itsme
itsmeOP2w ago
isnt the useless via remover supposed to be catching this stuff
itsme
itsmeOP2w ago
No description
Seve
Seve2w ago
Autorouter needs to merge those vias @0hmx
itsme
itsmeOP2w ago
shouldi. try and fix it
Seve
Seve2w ago
For sure, you can introduce a new phase if needed for merging same net vias
itsme
itsmeOP2w ago
ok is there a way to have a checkpoint in the autorouter debugging thing
Seve
Seve2w ago
Wdyn Like “go to iteration”?
itsme
itsmeOP2w ago
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?
Seve
Seve2w ago
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
itsme
itsmeOP2w ago
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?
Seve
Seve2w ago
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.
itsme
itsmeOP2w ago
how do i add a route?
Seve
Seve2w ago
tscircuit/checks uses circuit-json, which has a pcb_trace, but i'm kind of confused by your question
itsme
itsmeOP2w ago
nvm i figured it out nvm i havent figured it out.
Seve
Seve2w ago
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...
Seve
Seve2w ago
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%7D
itsme
itsmeOP2w ago
rn, im getting this error, but when i was testing stuff, i added
this.optimizedHdRoutes[viaToRemove.routeIndex].route.push({
x: 0,
y: 0,
z: layer
})
this.optimizedHdRoutes[viaToRemove.routeIndex].route.push({
x: 0,
y: 0,
z: layer
})
just to debug stuff, but it works with this
No description
itsme
itsmeOP2w ago
the errors are generated from multisimplifiedpathsolver2
Seve
Seve2w ago
you're removing vias right? Yea i think you need to just make their positions identical
itsme
itsmeOP2w ago
wdym
Seve
Seve2w ago
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)
itsme
itsmeOP2w ago
i think the error is from the route?
Seve
Seve2w ago
is that error from the tscircuit-autorouter? Which stage is throwing it? do you have a autorouting bug report?
itsme
itsmeOP2w ago
its throwing in multisomlifiedpathsolver2
Seve
Seve2w ago
are those errors from your modifications or vanilla autorouter?
itsme
itsmeOP2w ago
theyre from the modifications
Seve
Seve2w ago
yes probably because you're removing vias no?
itsme
itsmeOP2w ago
but im also ruoting stuff
Seve
Seve2w ago
yes so i'm saying don't remove vias just set the position of the vias to be the same
itsme
itsmeOP2w ago
its still throwing errors
Seve
Seve2w ago
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
itsme
itsmeOP2w ago
sry for the delay
Seve
Seve2w ago
Can u commit the snapshot
itsme
itsmeOP2w ago
done
Seve
Seve2w ago
Did you push Also format
itsme
itsmeOP2w ago
ok formatted
Seve
Seve2w ago
Can you update the snapshot and merge main, it will allow me to see the svg diff in the pr
itsme
itsmeOP2w ago
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?
No description
itsme
itsmeOP2w ago
O(n^2) perf in constructor is fixed
Seve
Seve2w ago
Not possuble to run tests with npm, to fix that error downgrade to bun 1.3.1 Sorry for the delay!
itsme
itsmeOP2w ago
snapshot done
Seve
Seve2w ago
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
itsme
itsmeOP2w ago
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?
itsme
itsmeOP2w ago
No description
No description
Seve
Seve2w ago
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
itsme
itsmeOP2w ago
how do i tell if there is a trace on the top layer?
No description
Seve
Seve2w ago
Not sure what you mean When moving a via? You have to move points on the trace as well
itsme
itsmeOP2w ago
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
Seve
Seve2w ago
❤️
Seve
Seve2w ago
me rn
No description

Did you find this page helpful?