+ VoltageDomain *vdom = p->voltage_domain;
+
+ fatal_if(freqOpPoints.empty(), "DVFS: Empty set of frequencies for "\
+ "domain %d %s\n", _domainID, name());
+
+ fatal_if(!vdom, "DVFS: Empty voltage domain specified for "\
+ "domain %d %s\n", _domainID, name());
+
+ fatal_if((vdom->numVoltages() > 1) &&
+ (vdom->numVoltages() != freqOpPoints.size()),
+ "DVFS: Number of frequency and voltage scaling points do "\
+ "not match: %d:%d ID: %d %s.\n", vdom->numVoltages(),
+ freqOpPoints.size(), _domainID, name());
+
+ // Frequency (& voltage) points should be declared in descending order,
+ // NOTE: Frequency is inverted to ticks, so checking for ascending ticks
+ fatal_if(!std::is_sorted(freqOpPoints.begin(), freqOpPoints.end()),
+ "DVFS: Frequency operation points not in descending order for "\
+ "domain with ID %d\n", _domainID);
+
+ fatal_if(_perfLevel >= freqOpPoints.size(), "DVFS: Initial DVFS point %d "\
+ "is outside of list for Domain ID: %d\n", _perfLevel, _domainID);
+
+ clockPeriod(freqOpPoints[_perfLevel]);
+
+ vdom->registerSrcClockDom(this);