Closed austin-marcus closed 1 year ago
I think it might be a better idea that when all the prime implicants have been calculated, we use them to get activity. If not, just calculate activity from LUT. So we get faster calculation in both situations. For c=1 sensitivity, that is the same. If PIs are already there, use sum of activity, otherwise use the old code.
Actually sensitivity was already implemented, under function name c_sensitivity(), which is a general version of sensitivity. The new sensitivity implementation has two problems: 1, it involves prime implicants, which is unnecessary for sensitivity calculation; 2, it is a special case of c=1 for c_sensitivity, so actually it is better to call c_sensitivity(). For activity, the original code was wrong, Thank Felipe for spotting that. I was under the impression that there is an implementation that doesn't involve prime implicants, I don't know why it wasn't there. Probably got lost when merging code.