Given your timetable and assuming you won't have a vehicle, here's what my itinerary would be:
Sevilla - 2 days. This is obviously a very subjective call but I personally think this is more than enough time to get a feel for this city and visit the major sites.
Cordoba/Granada - 2 days. Take the AVE high speed train from Sevilla to Cordoba. Spend 1 day in Cordoba and don't forget the Mezquita. Do a day trip to Granada perhaps by renting a car, which is about a 2-hour one-way trip. Personally, after visiting the Alhambra, I was somewhat bored in Granada and so the day trip would suffice.
Madrid - 4 days. Take the AVE from Cordoba to Madrid. Spend 2 days sightseeing in Madrid. Take a full day trip to Avila/Segovia and another full day trip to Toledo/El Escorial/Valle de los Caidos. Since you would be pressed for time I would suggest using a guided tour for these day trips because doing these trips on your own could take more time. I have used the following website to book day trips to the aforementioned locations and they offer 9-hour day trips to both. Visit
http://makeashorterlink.com/?E55332529 All in all, I would say try to be flexible and add a day here and subtract a day there, though I realize that this could wreak havoc in terms of hotel reservations.
Whatever you decide, have a great vacation!