Optical pulses are generated from a coupled-cavity quantum-dot (QD) laser consisting of a short QD-waveguide Fabry-Perot (F-P) cavity and three long external fiber Bragg grating (FBG) cavities. When the laser is biased at low operation current, the feedback from the external cavities dominates and laser pulses have a 1.01 THz repetition rate, determined by the equal frequency difference of the three FBGs. We are thus able to decouple the repetition rate of a mode-locked laser from the cavity length. With much higher bias current, the QD F-P cavity dominates and the repetition rate is switched to 43.8 GHz, defined by the length of the F-Pcavity.Crown