1. A system, comprising: a plurality of functional blocks, wherein each functional block contains software configured to set the power state for the functional block; at least one power control domain, wherein each functional block is associated with a respective power control domain; and hardware configured to set the power state of each power control domain based on the power states of the functional blocks within the respective power control domains.