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

Potential bug in evaluation script #3

Open
ZFTurbo opened this issue Nov 28, 2023 · 2 comments
Open

Potential bug in evaluation script #3

ZFTurbo opened this issue Nov 28, 2023 · 2 comments

Comments

@ZFTurbo
Copy link

ZFTurbo commented Nov 28, 2023

There is this part of code which I believe check if all access points were covered by solution for given net:

            bool cover = false;
            // std::cout << "numPins " << numPins << std::endl;

            for (int i = 0; i < numPins; ++i) {
                std::vector<std::vector<int>> points = accessPoints[i];
                for (auto point : points) {
                    int l = point[0], x = point[1], y = point[2];
                    // std::cout << "Access point " << l << " " << x << " " << y << std::endl;
                    if (l == 0) {
                        if (GR[l][x][y] == 1 && GR[l + 1][x][y] == 1) {
                            cover = true;
                            break;
                        }
                    }
                    else {
                        if (GR[l][x][y] == 1) {
                            cover = true;
                            break;
                        }
                    }
                }

                if (!cover) {
                    uncovered_net_cnt++;
                    std::cout << "uncovered net " << name << std::endl;
                }
                // assert(cover);
            }

I think that bool cover = false; must be placed after for (int i = 0; i < numPins; ++i) {

            // std::cout << "numPins " << numPins << std::endl;

            for (int i = 0; i < numPins; ++i) {
                bool cover = false;
                std::vector<std::vector<int>> points = accessPoints[i];
                for (auto point : points) {
                    int l = point[0], x = point[1], y = point[2];
                    // std::cout << "Access point " << l << " " << x << " " << y << std::endl;
                    if (l == 0) {
                        if (GR[l][x][y] == 1 && GR[l + 1][x][y] == 1) {
                            cover = true;
                            break;
                        }
                    }
                    else {
                        if (GR[l][x][y] == 1) {
                            cover = true;
                            break;
                        }
                    }
                }

                if (!cover) {
                    uncovered_net_cnt++;
                    std::cout << "uncovered net " << name << std::endl;
                }
                // assert(cover);
            }
@liangrj2014
Copy link
Owner

Thanks for the feedback! I will check it out soon!

@liangrj2014
Copy link
Owner

You are right! Thanks for pointing out the error! We plan to release the updated version of evaluator script next week, which will fix some bugs and have 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