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

Cost function, and a small example? #1

Open
profmadden opened this issue Oct 8, 2023 · 6 comments
Open

Cost function, and a small example? #1

profmadden opened this issue Oct 8, 2023 · 6 comments

Comments

@profmadden
Copy link

Hi -- can you give a little more detail on how you're calculating wire length, and what the overall metric will be?
In the example, metal 2:

WL_M2 = (25 + 100 + 50) + (50 + 50) = 275

Where does the 25 come from (and why?). If there's a via, are we assuming it's in the middle of the GCell? What would the capacity for the GCell boundaries be in terms of overflow?

A small (routed) example, with the routing cost given, would be great; it would help sanity check the code.

@liangrj2014
Copy link
Owner

Hi! Thanks a lot for the question! We will update the contest introduction to give more details soon! Also, we will release the evaluation scripts, including sanity check by this week. Thanks for your suggestion! We will provide a routed example as well. Sorry for the late response!

@liangrj2014
Copy link
Owner

Hi profmadden! FYI. We've released the evlaution scripts and example global routing solutions.

@profmadden
Copy link
Author

Hi -- the updated formats are great, and I very much appreciate the evaluator! Thanks!

To check that I'm doing this right -- the evaluator seems to take a long time, a few hours or more on some of the designs?
And also, the sample routings have overflows (here's ariane133_68)

num of uncovered nets 0
num of unchecked nets: 0
Finished!
numVia: 825323
totalWL: 7.18906e+09
Layer 0 worst oveflow 0
Layer 1 worst oveflow -3.14286
Layer 2 worst oveflow -5.68421
Layer 3 worst oveflow -1.71429
Layer 4 worst oveflow -5.63158
Layer 5 worst oveflow -1.71429
Layer 6 worst oveflow -5.78947
Layer 7 worst oveflow -3.14286
Layer 8 worst oveflow -7.21053
Layer 9 worst oveflow -22.1429
9.45929e+06 3.30129e+06 5.22501e+06
0.525937 0.183552 0.290511

All layers have global routing cells that overflow, with layer 9 having the worst overflow.

@liangrj2014
Copy link
Owner

Hi profmadden,

Thanks! I am you are doing right. Yes, the current version of evaluator is slow and we will see how to accelerate it. And the sample routings do have overflows, since we generate the sample routing by only conducting pattern routing without further addressing overflows. By releasing the evaluator and sample routing, we'd like to show how the performance metrics are calculated and what is the expected output format.

@profmadden
Copy link
Author

profmadden commented Nov 12, 2023

Thanks again for the evaluator and reference routings -- I'm digging through the evaluator, and was wondering about commitVia. It looks like when there's a via, there's a fraction of capacity consumed in the global routing cell (which makes perfect sense), but also in the global routing cell for [layer][x-1][y] on the horizontal layer. Should the cost function also add demand to the next global routing cell at [layer][x+1][y]?

The evaluator currently does this -

    for (int layer = l; layer <= l + 1; ++layer) {
        int direction = layerDirections[layer];
        if (direction == 0) {
            if (x + 1 < X) {
                Demand[layer][x][y] = Demand[layer][x][y] + (layerMinLengths[layer] * demand) / hEdgeLengths[x];
            }
            if ( x > 0) {
                Demand[layer][x-1][y] = Demand[layer][x-1][y] + (layerMinLengths[layer] *  demand) / hEdgeLengths[x-1];
            }

        } else {
            if (y + 1 < Y) {
                Demand[layer][x][y] = Demand[layer][x][y] + (layerMinLengths[layer] *  demand) / vEdgeLengths[y];
            }
            if ( y > 0) {
                Demand[layer][x][y-1] = Demand[layer][x][y-1] + (layerMinLengths[layer] *  demand) / vEdgeLengths[y-1];
            }
        }
    }

Perhaps modify to something like this, to capture the routing impact in both the next and prior cells?

    for (int layer = l; layer <= l + 1; ++layer) {
        int direction = layerDirections[layer];
        float delta;
        if (direction == 0)
        {
          delta = (layerMinLengths[layer] * demand) / hEdgeLengths[x];
        }
        else
        {
           delta = (layerMinLengths[layer] * demand) / vEdgeLengths[x];
        } 

       Demand[layer][x][y] += delta;
        if (direction == 0) {
            if (x + 1 < X) {
                Demand[layer][x+1][y] += delta;
            }
            if ( x > 0) {
                Demand[layer][x-1][y] = delta;
            }

        } else {
            if (y + 1 < Y) {
                Demand[layer][x][y+1] = delta;
            }
            if ( y > 0) {
                Demand[layer][x][y-1] = delta;
            }
        }
    }

@liangrj2014
Copy link
Owner

Hi profmadden,

Thanks a lot for the comments!

The demand map, represented by the "Demand", records the demand on GCell edges in our context. Each entry, such as Demand[layer][x][y], indicates the demand for the GCell edge from GCell[layer][x][y] to GCell[layer][x+1][y]. Similarly, Demand[layer][x-1][y] signifies the demand for the GCell edge from GCell[layer][x-1][y] to GCell[layer][x][y]. Consequently,
our implementation already capture the routing impact in both the next and prior cells. Hope it makes sense to you now. Please kindly let us know if you have further questions!

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