Scaling frequency and voltage in a coordinated manner is a promising way to reduce energy and power. we explore the use of dynamic frequency clocking within the datapath and datapath scheduling algorithms that can be incorporated into a datapath synthesis tool. Given a schedule, we propose a practical optimal frequency assignment algorithm based on dynamic programming. The algorithm run very fast in practice. Though the algorithm theoretically run in a pseudo polynomial time O(ncT2ex), nc is the number of control steps and Tex is the difference between the timing constraint and the critical path delay.