A Quantitative Model For Hardware/Software Partitioning