Impact of Power-Management Granularity on The Energy-Quality Trade-off for Soft And Hard Real-Time Applications International Symposium on System-on-Chip,