The process in which the anatomical structure of the central nervous system is generated and organized. The central nervous system is the core nervous system that serves an integrating and coordinating function. In vertebrates it consists of the brain, spinal cord and spinal nerves. In those invertebrates with a central nervous system it typically consists of a brain, cerebral ganglia and a nerve cord.