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

On non-stacking vias #17

Open
RecursionSheep opened this issue Jan 8, 2024 · 3 comments
Open

On non-stacking vias #17

RecursionSheep opened this issue Jan 8, 2024 · 3 comments

Comments

@RecursionSheep
Copy link

I read the latest version of the contest introduction, and it says that "we exclude the consideration of routing demand overhead attributed to stacking vias."
In the current version of the evaluator, it seems that it does not check whether a via is stacking or non-stacking (lines 521-524). Could you please check if this is correct?
Also, in NVR_DB::update_nonstack_via_counter (lines 614-647), it seems that a non-stacking via connecting layer z and z+1 only contributes to the demand of layer z. As far as I am concerned, a via will impede the utilization of routing resources on both layers. Could you please confirm if this is correct?
Thanks for your help!

@liangrj2014
Copy link
Owner

Thanks for the questions! I

Q1: In the current version of the evaluator, it seems that it does not check whether a via is stacking or non-stacking (lines 521-524). Could you please check if this is correct?

In line 620, we will first check whether flag[pp.z()][pp.x()][pp.y()] !=net_idx. For stacking vias , it would be NO, since the flag has been updated in line 533-549. For non-stacking vias, it would be YES.

Q2: Also, in NVR_DB::update_nonstack_via_counter (lines 614-647), it seems that a non-stacking via connecting layer z and z+1 only contributes to the demand of layer z. As far as I am concerned, a via will impede the utilization of routing resources on both layers. Could you please confirm if this is correct?

If vias connect a wire metal at layer z to a wire metal at layer z+h, our evaluator will account for additional routing demand overhead from layer z+1 to layer z+h-1.

@RecursionSheep
Copy link
Author

I get it. Thanks for your reply!

@akrishnaams
Copy link

void NVR_DB::update_nonstack_via_counter(unsigned net_idx,
  const std::vector<NVR_Point3D> &via_loc,
  std::vector< std::vector< std::vector<int> > > &flag,
  std::vector< std::vector< std::vector<int> > > &nonstack_via_counter) const
{
  for(const NVR_Point3D &pp : via_loc) {
    if(flag[pp.z()][pp.x()][pp.y()] != net_idx) {
      flag[pp.z()][pp.x()][pp.y()] = net_idx;

      int direction = layer_directions[pp.z()];
      if(direction == 0) {
        if ((pp.x() > 0) && (pp.x() < m_graph.num_gridx() - 1)) {
          nonstack_via_counter[pp.z()][pp.x()-1][pp.y()]++;
          nonstack_via_counter[pp.z()][pp.x()][pp.y()]++;
        } else if (pp.x() > 0 ) {
          nonstack_via_counter[pp.z()][pp.x()-1][pp.y()] += 2;
        } else if (pp.x() < m_graph.num_gridx() - 1) {
          nonstack_via_counter[pp.z()][pp.x()][pp.y()] += 2;
        }
      } else if (direction == 1) {
        if ((pp.y() > 0) && (pp.y() < m_graph.num_gridy() - 1)) {
          nonstack_via_counter[pp.z()][pp.x()][pp.y()-1]++;
          nonstack_via_counter[pp.z()][pp.x()][pp.y()]++;
        } else if (pp.y() > 0 ) {
          nonstack_via_counter[pp.z()][pp.x()][pp.y()-1] += 2;
        } else if (pp.y() < m_graph.num_gridy() - 1) {
          nonstack_via_counter[pp.z()][pp.x()][pp.y()] += 2;
        }
      }
      //nonstack_via_counter[pp.z()][pp.x()][pp.y()]++;
    }

  }
}

Why are non-stack vias considered on adjacent GCells as well? Like

          nonstack_via_counter[pp.z()][pp.x()-1][pp.y()]++;
          nonstack_via_counter[pp.z()][pp.x()][pp.y()]++;

Sorry if I am missing out on something

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

3 participants