  We generalize the correlation functions of the Clauser-Horne-Shimony-Holt
(CHSH) inequality to arbitrarily high-dimensional systems. Based on this
generalization, we construct the general CHSH inequality for bipartite quantum
systems of arbitrarily high dimensionality, which takes the same simple form as
CHSH inequality for two-dimension. This inequality is optimal in the same sense
as the CHSH inequality for two dimensional systems, namely, the maximal amount
by which the inequality is violated consists with the maximal resistance to
noise. We also discuss the physical meaning and general definition of the
correlation functions. Furthermore, by giving another specific set of the
correlation functions with the same physical meaning, we realize the inequality
presented in [Phys. Rev. Lett. {\bf 88,}040404 (2002)].
