source: xssim/src/test/rewolucja/energy/profile/CPU_B_PowerProfile.java @ 104

Revision 104, 986 bytes checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package test.rewolucja.energy.profile;
2
3import java.util.Collections;
4import java.util.HashMap;
5import java.util.Map;
6
7
8public class CPU_B_PowerProfile extends CPUPowerProfile{
9
10        public CPU_B_PowerProfile() {
11                //pState = getSupportedPStates().get(PStateType.P0);
12        }
13       
14        public Map<PStateType, PState> getSupportedPStates(){
15                return ModelB.getConfiguration();
16        }
17       
18        private static class ModelB{
19                private static final Map<PStateType, PState> pStates;
20                static {
21                        Map<PStateType, PState> pStatesMap = new HashMap<PStateType, PState>();
22                        pStatesMap.put(PStateType.P0, new PState(PStateType.P0, 2660, 0, 363));
23                        pStatesMap.put(PStateType.P1, new PState(PStateType.P1, 2330, 0, 357));
24                        pStatesMap.put(PStateType.P2, new PState(PStateType.P2, 2000, 0, 350));
25                        pStatesMap.put(PStateType.P3, new PState(PStateType.P3, 1860, 0, 343));
26                        pStates = Collections.unmodifiableMap(pStatesMap);
27                }
28               
29                public static Map<PStateType, PState> getConfiguration(){
30                        return pStates;
31                }
32        }
33}
Note: See TracBrowser for help on using the repository browser.