CIMFlow LogoCIMFlow

Inter-Core Communication

Cross-core data transmission and synchronization instructions

Inter-core communication instructions enable data exchange and synchronization between processing cores in a multi-core architecture. These instructions use communication IDs to ensure reliable, ordered message passing.


SEND

Initiates a data transmission from the current core to a remote receiver core. The instruction specifies sender/receiver IDs, destination address, transfer size, and a communication ID for acknowledgment tracking.

31:26
25:21
20:16
15:11
10:6
5:1
0
110100
opcode
rs
sender ID
rt
receiver ID
rd
dest addr
re
size
rf
comm ID
Syntax
SEND rs, rt, rd, re, rf
Operation
Send GRF[re] bytes to core GRF[rt] @ addr GRF[rd]


RECV

Receives data from a remote sender core. The instruction specifies sender ID, source/destination addresses, transfer size, and a communication ID that must match the corresponding SEND operation.

31:26
25:21
20:16
15:11
10:6
5:1
0
110110
opcode
rs
sender ID
rt
src addr
rd
dest addr
re
size
rf
comm ID
Syntax
RECV rs, rt, rd, re, rf
Operation
Receive GRF[re] bytes from core GRF[rs] @ addr GRF[rt]

Communication IDs must match between SEND and RECV operations. Mismatched IDs may cause deadlock or data corruption.


Examples

; Core 0: Send 1024 bytes to Core 1
G_LI  r1, 0x1000        ; Source address in Core 0
G_LI  r2, 1             ; Receiver Core ID (Core 1)
G_LI  r3, 0x2000        ; Destination address in Core 1
G_LI  r4, 1024          ; Transfer size (bytes)
G_LI  r5, 100           ; Communication ID
SEND  r1, r2, r3, r4, r5  ; src_addr, dst_core, dst_addr, size, trans_id

; Core 1: Receive 1024 bytes from Core 0
G_LI  r1, 0             ; Source Core ID (Core 0)
G_LI  r2, 0x1000        ; Source address in Core 0
G_LI  r3, 0x2000        ; Local destination address
G_LI  r4, 1024          ; Transfer size (must match)
G_LI  r5, 100           ; Communication ID (must match)
RECV  r1, r2, r3, r4, r5  ; src_core, src_addr, dst_addr, size, trans_id

; Multi-transfer sequence with unique IDs
G_LI  r10, 200          ; Base communication ID
G_LI  r11, 1            ; Counter
G_LI  r1, 0x1000        ; Source address
G_LI  r2, 1             ; Destination core
G_LI  r3, 0x2000        ; Destination address
G_LI  r4, 1024          ; Size

; Transfer 1
SC_ADDI r5, r10, 1      ; comm_id = 200 + 1 = 201
SEND  r1, r2, r3, r4, r5

; Transfer 2
SC_ADDI r5, r10, 2      ; comm_id = 200 + 2 = 202
SEND  r1, r2, r3, r4, r5

Last updated on

On this page