It takes long to call cacti to calculate power/area. In order to reduce the redundant calls, I add a map to record the result computed by cacti since we don't need to call cacti repeatedly if the partition size has been computed beforehand.
Yes. You are right. There is no need to change ScratchpadDatapath. We can achieve the goal by just adding a map in Scratchpad to record the cacti_value. I'll modify the codes.
Improve runtime(Avoid calling cacti repeatedly)
It takes long to call cacti to calculate power/area. In order to reduce the redundant calls, I add a map to record the result computed by cacti since we don't need to call cacti repeatedly if the partition size has been computed beforehand.