soc/hps_soc.py: Tidy cpu variant calculation
soc/hps_soc.py: Tidy cpu variant calculation

Refactor CPU variant calculation code to make modifying it simpler.

Signed-off-by: Alan Green <97e77871b5fcc4941bebceb4338c97c1fd149f8c@google.com>

google/CFU-Playground,google/CFU-Playground,google/CFU-Playground,google/CFU-Playground