Added sleep pin indicating when clk_i is allowed to be gated externally
Created by: Silabs-ArjanB
Adde core_sleep_o pin indicating when the clock (clk_i) is allowed (but not required) to be gated externally. The initial state (during and out of reset) of core_sleep_o = 0; the core_sleep_o pin can only possibly be set to 1 in response to executing a WFI instruction.
Once core_sleep_o is 1 it will go to 0 again only for the following conditions:
PULP_CLUSTER = 0: Any pending interrupt or debug request (debug_req_i == 1) PULP_CLUSTER = 1: clock_en_i == 1
The addition was slightly more complicated than suggested in #131 (closed) as the default state of clock_en is 0 during and closely after reset (and we do not want to indicate that the core is asleep during reset assertion nor when just coming out of reset before even an WFI has been executed).
Signed-off-by: Arjan Bink Arjan.Bink@silabs.com