There's no such thing as a main frame. But you do have an E.C.M, which stands for engine control module. You also have a B.C.M. Which is your Body Control Module. You may also have other computers in your car, depending on the model and option package.
The price of an E.C.M. Will vary so widely, it's impossible to give you an estimate. It will be most expensive at a dealership. Probably a couple thousand dollars. It will be least expensive at a junk yard. Probably a couple hundred. Labor to install it will vary just as widely.