Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Evaluate Scripts #6

Open
XCI9 opened this issue Nov 30, 2023 · 1 comment
Open

Bug in Evaluate Scripts #6

XCI9 opened this issue Nov 30, 2023 · 1 comment

Comments

@XCI9
Copy link

XCI9 commented Nov 30, 2023

Hi,
I think the evaluate scripts may contain bug:
From line 445 to 464

for (int l = 1; l < nLayers; ++l) {
    int direction = layerDirections[l];
    if (direction == 0) {  // horizontal
        for (int x = 0; x < xSize - 1; ++x) {
            for (int y = 0; y < ySize; ++y) {
                if (GR[l][x][y] == 1 && GR[l][x + 1][y] == 1) {
                    wireMap[l][x][y]++;
                }
            }
        }
    } else {  // vertical
        for (int x = 0; x < xSize; ++x) {
            for (int y = 0; y < ySize - 1; ++y) {
                if (GR[l][x][y] == 1 && GR[l][x][y + 1] == 1) {
                    wireMap[l][x][y]++;
                }
            }
        }
    }
}

It check if current net passes both current GCell and neighboring GCell (right for horizontal layer and up for vertical layer). If so, mark usage to current edge. But if the GCell is actually only use for via pass through and no edge to neighboring GCell, the code will calculate the usage wrongly.

For example, for the following .net input:

net1
(
[(0, 0, 0)]
[(0, 0, 1)]
)

Tow points are vertically adjecent. Assume even layers are for vertical. And we decided to use layer 6 to connect two points:

# point 1 vias
0 0 1 1 metal1
0 0 1 1 metal2
0 0 1 1 metal3
0 0 1 1 metal4
0 0 1 1 metal5
0 0 1 1 metal6
# point 2 vias
0 1 1 2 metal1
0 1 1 2 metal2
0 1 1 2 metal3
0 1 1 2 metal4
0 1 1 2 metal5
0 1 1 2 metal6
# edge
0 0 0 2 metal6

The (0, 0) on metal4 and metal2 will also count as it has edge to (0, 1), although only vias pass through. Or is this a expected behavior?

Thank you!

@liangrj2014
Copy link
Owner

Thanks for pointing out the corner case! You are right! Our evaluator will calculate the usage wrongly for the corner case you mentioned. We plan to release the updated evaluator script next week, which will fixed a few bugs as well as has much faster runtime. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants