Energy-Aware System Design: Algorithms and Architectures