Embedded systems are composed of hardware and software. Many functions of the systems can be realized by either software or hardware. In order to partition the system according to function and performance requirements, such as cost, size, power consumption and timing, a hardware/software co-synthesis for SoC design was proposed, the corresponding mathematical model was presented, hardware/software co-synthesis was translated into optimal paths of directed graphs, and the feasible solutions were got in the whole solution space by conditional traversal. This method, which evaluates many performance factors and works in reuse of IP cores and software components, worked automatically and overcame the deficiency of the traditional methods. Finally, an example of the sender of audio and video subsystem of a PDA platform illustrated the practicability and effectiveness of the approach.