Theoretical study of the structure, lattice dynamics, and equations of state of perovskite-type MgSiO3 and CaSiO3