Some embodiments provide a method of performing circuit synthesis that
receives a design that has a function with several inputs. The method
identifies a set of early arriving inputs of the function and performs a
function decomposition on the function based on one of the early arriving
inputs. In some embodiments, the method estimates the number of circuits
a signal has to travel through to reach each input of the function and
selects a set of inputs with signals that travel through fewer numbers of
circuits compared to signals of inputs that are not selected. In some
embodiments in which the design has more than a particular number of
inputs, the method recursively identifies early arriving signals and
performs function decomposition until function decomposition results in a
set of functions all of which with fewer than the particular number of
inputs. In some embodiments, the function decomposition is Shannon
decomposition.