On-chip Spectrometer Formed by a Multi-stage Structure