Thermal-aware system analysis and software synthesis for embedded multi-processors