harvard-acc / ALADDIN

A pre-RTL, power-performance model for fixed-function accelerators
Other
162 stars 54 forks source link

improve runtime #2

Closed gina9726 closed 9 years ago

gina9726 commented 9 years ago

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.

gina9726 commented 9 years ago

I modified the code. Now the map key contains both num_of_bytes and wordsize.

ysshao commented 9 years ago

overall it looks pretty good! i have two minor comments on coding styles.

gina9726 commented 9 years ago

setScratchpad is called repeatedly by each partition, so the map must keep exist for all partitions.

ysshao commented 9 years ago

Thanks Gina! Just merged your pull request!