Automatic synthesis of near-threshold circuits with fine-grained performance tunability