  The intriguing coexistence of the charge density wave (CDW) and
superconductivity in SrPt$_2$As$_2$ and LaPt$_2$Si$_2$ has been investigated
based on the {\it ab initio} density functional theory band structure and
phonon calculations. We have found that the local split distortions Pt atoms in
the [As-Pt-As] layers play an essential role in driving the five-fold supercell
CDW instability as well as the phonon softening instability in SrPt$_2$As$_2$.
By contrast, the CDW and phonon softening instabilities in LaPt$_2$Si$_2$ occur
without split distortions of Pt atoms, indicating that the driving mechanisms
of the CDW in SrPt$_2$As$_2$ and LaPt$_2$Si$_2$ are different. We have found
that the CDW instability for the former arises from the Fermi surface nesting,
while, for the latter, from the saddle point scattering.
  The phonon calculations, however, suggest that the CDW and the
superconductivity coexist in [{\it X}-Pt-{\it X}] layers ({\it X} = As or Si)
for both cases.
