I think with a GPA of 3.14, getting into PhD at CMU, MIT, or UCB is difficult. In fact, getting into PhD at those three schools is difficult with any GPA.
Why does it need to be one of those three? There are other schools with good PhD programs as well.
Re. GPA, see https://people.eecs.berkeley.edu/~jrs/apply.html