1. A method of automatically configuring optional pipeline stages within a system on a chip, the method comprising the steps of: determining a unit cost for at least one optional pipeline stage; determining module timing delays with a configuration of activated optional pipeline stages; determining at least one timing constraint; and using a solver to find a system configuration of activated optional pipeline stages that meets the timing constraints of the system with a minimal total cost.