ominux / vtr-verilog-to-routing

Automatically exported from code.google.com/p/vtr-verilog-to-routing
0 stars 0 forks source link

Area calculation error in routing_stats() #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
for(i = 1; i <= nx; i++) {
 for(j = 1; j <= ny; j++) {
  if(grid[i][j].offset == 0) {
   if(grid[i][j].type->area == UNDEFINED) {
    area += grid_logic_tile_area * block[i].type->height;
   } else {
    area += grid[i][j].type->area;
   }
  }
 }
}

The code above indexes block using the variable i.  This variable is a loop 
through the rows.  I believe this should be grid[i][j] instead of block[i].

What steps will reproduce the problem?
1. Run a very sparse design rows > blocks

What is the expected output? What do you see instead?
Segfault

Please use labels and text to provide additional information.

Original issue reported on code.google.com by jeffrey....@gmail.com on 6 Feb 2012 at 10:27

GoogleCodeExporter commented 9 years ago
Sorry...This is stats.c line 54.

Original comment by jeffrey....@gmail.com on 6 Feb 2012 at 10:29

GoogleCodeExporter commented 9 years ago
Good catch!

Original comment by JasonKai...@gmail.com on 7 Feb 2012 at 5:34