RSIM Bug Report #4
Version of RSIM | 1.0 |
Bug number | 4 |
Bug class | 3 |
Date | 9/25/97 |
Reported by | authors |
Affects | Configurations with small caches and high set associativity |
Files | rsimconfig.html |
Problem Description
The number of sets in the cache must be a power of 2. The check for this
was done by dividing the size of the cache by the set associativity, as
follows:
|| !ispowof2("number of L1 cache sets",form1.l1size.value/form1.l1assoc.value)
|| !ispowof2("number of L2 cache sets",form1.l2size.value/form1.l2assoc.value)
However, the size of the cache is expressed in KB. Thus, the Javascript
form processor might complain of a failure even if there actually was none.
Problem Fix
The size of the cache should first be converted to a number of lines
and then divided by the associativity.
The above code should be replaced with:
|| !ispowof2("number of L1 cache sets",form1.l1size.value*1024/(form1.linesize.value*form1.l1assoc.value))
|| !ispowof2("number of L2 cache sets",form1.l2size.value*1024/(form1.linesize.value*form1.l2assoc.value))
This change has been made in the distribution.