An Energy and Timing Model for NoC with DVFS Links and its Application of Energy Optimization