  Silicon strip detectors have been widely utilized in space experiments for
gamma-ray and cosmic-ray detections thanks to their high spatial resolution and
stable performance. For a silicon micro-strip detector, the Monte Carlo
simulation is recognized as a practical and cost-effective approach to verify
the detector performance. In this study, a technique for the simulation of the
silicon micro-strip detector with the $\rm Allpix^{2}$ framework is developed.
By incorporating the electric field into the particle transport simulation
based on Geant4, this framework could precisely emulate the carrier drift in
the silicon micro-strip detector. The simulation results are validated using
the beam test data as well as the flight data of the DAMPE experiment, which
suggests that the $\rm Allpix^{2}$ framework is a powerful tool to obtain the
performance of the silicon micro-strip detector.
