  We report a detailed first-principles study of the structural, electronic and
vibrational properties of the superconducting C$_{32}$ phase of the ternary
alloy CaAl$_{2-x}$Si$_x$, both in the experimental range $0.6 \leq x \leq 1.2$,
for which the alloy has been synthesised, and in the theoretical limits of high
aluminium and high silicon concentration. Our results indicate that, in the
experimental range, the dependence of the electronic bands on composition is
well described by a rigid-band model, which breaks down outside this range.
Such a breakdown, in the (theoretical) limit of high aluminium concentration,
is connected to the appearance of vibrational instabilities, and results in
important differences between CaAl$_2$ and MgB$_2$. Unlike MgB$_2$, the
interlayer band and the out-of-plane phonons play a major role on the stability
and superconductivity of CaAlSi and related C$_{32}$ intermetallic compounds.
