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

It seems wrong for tileLocaEachLayer #12

Open
fishfishfishfishfish opened this issue Sep 2, 2022 · 0 comments
Open

It seems wrong for tileLocaEachLayer #12

fishfishfishfishfish opened this issue Sep 2, 2022 · 0 comments

Comments

@fishfishfishfishfish
Copy link

fishfishfishfishfish commented Sep 2, 2022

In the function ChipFloorPlan in Training_pytorch/NeuroSIM/Chip.cpp, it calculate the double vector tileLocaEachLayer.
I presume that tileLocaEachLayer record the location of the first tile that store a layer.
The following code to calculate tileLocaEachLayer seems wrong.

for (int i=0; i<netStructure.size(); i++) {
  if (i==0) {
	tileLocaEachLayerRow.push_back(0);
	tileLocaEachLayerCol.push_back(0);
  } else {
        // original code here
	// thisTileTotal += numTileEachLayer[0][i]*numTileEachLayer[1][i];
	tileLocaEachLayerRow.push_back((int)thisTileTotal/(*numTileRow));
	tileLocaEachLayerCol.push_back((int)thisTileTotal%(*numTileRow)-1);
  }
  // I think it should be moved here.
  thisTileTotal += numTileEachLayer[0][i]*numTileEachLayer[1][i];
}

I think the calculation of thisTileTotal should be moved from the else clause to outside.

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

1 participant