| Notations | Implementation | Semantics |
| get_time | csrr rd, CSR_clock | Read CSR_CLOCK to get current time | set_compare | csrw CSR_compare, r1 | Cancel the previous timing (if any) and set a new timing | delay_until | custom0 zero, zero, zero, 0 | Stall until current time exceeds the value in provided register | wait_until | custom1 zero, zero, zero, 0 | Wait until current time exceeds the value in provided register | interrupt_on_expire | custom2 zero, zero, zero, 0 | Interrupt program when current time exceeds the value in provided register | exception_on_expire | custom2 zero, zero, zero, 1 | Throw exception when current time exceeds the value in provided register | meet_time/register | custom3 0, r1, 0, 0 | Label the entry of the code, record the timing limit by value in register | meet_time/immediate | lui zero, imm | Label the entry of the code, record the timing limit by value in immediate field | final_deadline | custom3 zero,zero,zero, 0 | Label the end of the code, throw exception when current time exceeds |
|
|