Processing ultra-fast optical signals without optical/electronic conversion is in demand and time-to-space conversion has been proposed as an effective solution. We have designed and fabricated an arrayed-waveguide grating (AWG) based optical spectrum control circuit (OSCC) using silica planar lightwave circuit (PLC) technology. This device is composed of an AWG, tunable phase shifters and a mirror. The principle of signal processing is to spatially decompose the signal's frequency components by using the AWG. Then, the phase of each frequency component is controlled by the tunable phase shifters. Finally, the light is reflected back to the AWG by the mirror and synthesized. Amplitude of each frequency component can be controlled by distributing the power to high diffraction order light. The spectral controlling range of the OSCC is 100 GHz and its resolution is 1.67 GHz. This paper describes equipping the OSCC with optical coded division multiplex (OCDM) encoder/decoder functionality. The encoding principle is to apply certain phase patterns to the signal's frequency components and intentionally disperse the signal. The decoding principle is also to apply certain phase patterns to the frequency components at the receiving side. If the applied phase pattern compensates the intentional dispersion, the waveform is regenerated, but if the pattern is not appropriate, the waveform remains dispersed. We also propose an arbitrary filter function by exploiting the OSCC's amplitude and phase control attributes. For example, a filtered optical signal transmitted through multiple optical nodes that use the wavelength multiplexer/demultiplexer can be equalized.