Software, Architecture, and VLSI Co-Design for Fine-Grain Voltage and Frequency Scaling