You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 10, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,18 @@ The API definition is:
8
8
9
9
|Function | Syntax and Function | Example |
10
10
|---------|---------------------|---------|
11
-
|ECALL_YIELD|`ECALL_YIELD();`<br> Indicates to the nanoKernel scheduler that the Zone has nothing pressing to do and causes the nanoKernel to immediately move to the next Zone in context.|`ECALL_YIELD();`<br>In the case of a three zone implementation with a tick time of 10ms, the maximum time to come back to context is 20ms, faster if the other zones Yield as well.|
12
-
|ECALL_SEND|`ECALL_SEND([Zone #], [0-3][Int]);`<br> Send transmits a message from the current zone to the [Zone #]; the message size is an array of [4] integers and the nanoKernel manages transmission with no shared memory.|`ECALL_SEND(1, {201, 0, 0 ,0});`<br>Sends an array to Zone 1 of {201, 0, 0, 0}|
13
-
|ECALL_RECV|`ECALL_RECV[Zone #], [0-3][int]);`<br>Checks the mailbox of the current Zone for a message from the listed Zone #, if a message exists it copies it to the array structure provided.|`int msg[4]={0,0,0,0};`<br>`ECALL_RECV(1, msg);`<br>If a message exists in the mailbox from zone 1, it copies it to msg, otherwise msg value is unchanged.|
14
-
|ECALL_TRP_VECT |`ECALL_TRP_VECT([Exception Code], [Trap Handler])`<br>Registers a handler against a trap generated by anauthorized instructions; the TRAP #s are defined in the RISC-V Privileged Architectures definition V1.1, Table 3.6 Interrupt 0 types. https://riscv.org/specifications/privileged-isa/|`ECALL_TRP_VECT(0x0, trap_0x0_handler);`<br>Where trap_0x0_handler is registered at the User level of privilege with:<br>`Void trap_0x0_handler(void)__attribute__((interrupt("user")));`<br>`void trap_0x0_handler(void){`<br>` // Your handler code here`<br>`}`|
15
-
|ECALL_IRQ_VECT |`ECALL_IRQ_VECT([Interrupt #], [Trap Handler])`<br>Registers a handler for an interrupt that has been assigned to a Zone in the multizone.cfg file. <br> When an interrupt occurs, the nanoKernel will immediately pull the zone assigned to that interrupt into context and execute the registered interrupt handler. |`ECALL_IRQ_VECT(11, button_0_handler);`<br>Where button_0_handler is a registered at the user level of privilege with:<br>`void button_1_handler(void)__attribute__((interrupt("user")));`<br>`void button_1_handler(void){`<br>` // interrupt handler here`<br>`}`|
16
-
|ECALL_CSRR_MTIME()| Returns MTIME to a variable in a zone, MTIME is a privileged registered normally only available in M mode. |`Int64 mtime = ECALL_CSRR_MTIME();`|
17
-
|ECALL_CSRR_MCYCLE()| Returns MCYCLE to a variable in a zone, MCYCLE is a privileged registered normally only available in M mode. |`Int64 mcycle = ECALL_CSRR_MCYCLE();`
18
-
|ECALL_CSRR_MINSTR()| Returns MINSTR to a variable in a zone, MINSTR is a privileged registered normally only available in M mode. |`Int64 minstr = ECALL_CSRR_MINSTR();`
19
-
|ECALL_CSRR_MHPMC3()| Returns MHPMC3 to a variable in a zone, MHPMC3 is a privileged registered normally only available in M mode. |`Int64 mhpmc3 = ECALL_CSRR_MHPMC3();`
20
-
|ECALL_CSRR_MHPMC4()| Returns MHPMC4 to a variable in a zone, MHPMC4 is a privileged registered normally only available in M mode. |`Int64 mhpmc3 = ECALL_CSRR_MHPMC4();`
21
-
|ECALL_CSRR_MISA()| Returns MISA to a variable in a zone, MISA is a privileged registered normally only available in M mode. |`Int64 misa = ECALL_CSRR_MISA();`
22
-
|ECALL_CSRR_MVENDID()| Returns MVENDID to a variable in a zone, MVENDID is a privileged registered normally only available in M mode. |`Int64 misa = ECALL_CSRR_MVENDID();`
23
-
|ECALL_CSRR_MARCHID()| Returns MARCHID to a variable in a zone, MARCHID is a privileged registered normally only available in M mode. |`Int64 marchid = ECALL_CSRR_MARCHID();`
24
-
|ECALL_CSRR_MIMPID()| Returns MIMPID to a variable in a zone, MIMPID is a privileged registered normally only available in M mode. |`Int64 mimpid = ECALL_CSRR_ MIMPID ();`
25
-
|ECALL_CSRR_MHARTID()| Returns MHARTID to a variable in a zone, MHARTID is a privileged registered normally only available in M mode. |`Int64 mhardid = ECALL_CSRR_ MHARTID ();`
26
-
11
+
|ECALL_YIELD|`void ECALL_YIELD();`<br> Indicates to the nanoKernel scheduler that the Zone has nothing pressing to do and causes the nanoKernel to immediately move to the next Zone in context.|`ECALL_YIELD();`<br>In the case of a three zone implementation with a tick time of 10ms, the maximum time to come back to context is 20ms, faster if the other zones Yield as well.|
12
+
|ECALL_SEND|`void ECALL_SEND([Zone #], [0-3][Int]);`<br> Send transmits a message from the current zone to the [Zone #]; the message size is an array of [4] integers and the nanoKernel manages transmission with no shared memory.|`ECALL_SEND(1, {201, 0, 0 ,0});`<br>Sends an array to Zone 1 of {201, 0, 0, 0}|
13
+
|ECALL_RECV|`void ECALL_RECV[Zone #], [0-3][int]);`<br>Checks the mailbox of the current Zone for a message from the listed Zone #, if a message exists it copies it to the array structure provided.|`int msg[4]={0,0,0,0};`<br>`ECALL_RECV(1, msg);`<br>If a message exists in the mailbox from zone 1, it copies it to msg, otherwise msg value is unchanged.|
14
+
|ECALL_TRP_VECT |`void ECALL_TRP_VECT([Exception Code], [Trap Handler])`<br>Registers a handler against a trap generated by anauthorized instructions; the TRAP #s are defined in the RISC-V Privileged Architectures definition V1.1, Table 3.6 Interrupt 0 types. https://riscv.org/specifications/privileged-isa/|`ECALL_TRP_VECT(0x0, trap_0x0_handler);`<br>Where trap_0x0_handler is registered at the User level of privilege with:<br>`Void trap_0x0_handler(void)__attribute__((interrupt("user")));`<br>`void trap_0x0_handler(void){`<br>` // Your handler code here`<br>`}`|
15
+
|ECALL_IRQ_VECT |`void ECALL_IRQ_VECT([Interrupt #], [Trap Handler])`<br>Registers a handler for an interrupt that has been assigned to a Zone in the multizone.cfg file. <br> When an interrupt occurs, the nanoKernel will immediately pull the zone assigned to that interrupt into context and execute the registered interrupt handler. |`ECALL_IRQ_VECT(11, button_0_handler);`<br>Where button_0_handler is a registered at the user level of privilege with:<br>`void button_1_handler(void)__attribute__((interrupt("user")));`<br>`void button_1_handler(void){`<br>` // interrupt handler here`<br>`}`|
16
+
|ECALL_CSRR_MTIME()|`Int64 ECALL_CSRR_MTIME()`<br> Returns MTIME to a variable in a zone, MTIME is a privileged registered normally only available in M mode. |`Int64 mtime = ECALL_CSRR_MTIME();`|
17
+
|ECALL_CSRR_MCYCLE()|`Int64 ECALL_CSRR_MCYCLE()`<br> Returns MCYCLE to a variable in a zone, MCYCLE is a privileged registered normally only available in M mode. |`Int64 mcycle = ECALL_CSRR_MCYCLE();`
18
+
|ECALL_CSRR_MINSTR()|`Int64 ECALL_CSRR_MINSTR()`<br> Returns MINSTR to a variable in a zone, MINSTR is a privileged registered normally only available in M mode. |`Int64 minstr = ECALL_CSRR_MINSTR();`
19
+
|ECALL_CSRR_MHPMC3()|`Int64 ECALL_CSRR_MHPMC3()`<br> Returns MHPMC3 to a variable in a zone, MHPMC3 is a privileged registered normally only available in M mode. |`Int64 mhpmc3 = ECALL_CSRR_MHPMC3();`
20
+
|ECALL_CSRR_MHPMC4()|`Int64 ECALL_CSRR_MHPMC4()`<br> Returns MHPMC4 to a variable in a zone, MHPMC4 is a privileged registered normally only available in M mode. |`Int64 mhpmc3 = ECALL_CSRR_MHPMC4();`
21
+
|ECALL_CSRR_MISA()|`Int64 ECALL_CSRR_MISA()`<br> Returns MISA to a variable in a zone, MISA is a privileged registered normally only available in M mode. |`Int64 misa = ECALL_CSRR_MISA();`
22
+
|ECALL_CSRR_MVENDID()|`Int64 ECALL_CSRR_MVENDID()`<br> Returns MVENDID to a variable in a zone, MVENDID is a privileged registered normally only available in M mode. |`Int64 misa = ECALL_CSRR_MVENDID();`
23
+
|ECALL_CSRR_MARCHID()|`Int64 ECALL_CSRR_MARCHID()`<br> Returns MARCHID to a variable in a zone, MARCHID is a privileged registered normally only available in M mode. |`Int64 marchid = ECALL_CSRR_MARCHID();`
24
+
|ECALL_CSRR_MIMPID()|`Int64 ECALL_CSRR_MIMPID()`<br> Returns MIMPID to a variable in a zone, MIMPID is a privileged registered normally only available in M mode. |`Int64 mimpid = ECALL_CSRR_ MIMPID ();`
25
+
|ECALL_CSRR_MHARTID()|`Int64 ECALL_CSRR_MHARTID()`<br> Returns MHARTID to a variable in a zone, MHARTID is a privileged registered normally only available in M mode. |`Int64 mhardid = ECALL_CSRR_ MHARTID ();`
0 commit comments