HewlettPackard / cacti

An integrated cache and memory access time, cycle time, area, leakage, and dynamic power model
http://www.hpl.hp.com/research/cacti/
384 stars 131 forks source link

Question about subarray configuration in parameter.cc #5

Closed william-simon closed 6 years ago

william-simon commented 6 years ago

Hello, I came across a line of code in parameter.cc that seems like it may be a bug to my colleagues and me, though it could certainly be just my own misunderstanding.

Line 1947:

num_r_subarray = (int)ceil(capacity_per_die / (g_ip->nbanks g_ip->block_sz g_ip->data_assoc Ndbl Nspd));​

specifies the number of rows per subarray, but seems to not take into account that the block size is specified in bytes, not bits. This is seen in the next line that specifies the number of columns:

num_c_subarray = (int)ceil((*8 g_ip->block_sz* g_ip->data_assoc * Nspd / Ndwl));

It seems to me that the line should be

num_r_subarray = (int)ceil(capacity_per_die / (g_ip->nbanks * *8 g_ip->block_sz* g_ip->data_assoc Ndbl Nspd));​

Which would be the equivalent to saying:

num_r_subarray = (int)ceil(capacity_per_die / (num_c_subarray * Ndbl));​

Which is what we would expect: height = area/width.

Could you please advise me on where/if my reasoning is incorrect?