XMSG Metadata to Data Buffer Relationship Analysis¶
Overview¶
Analysis of the correlation between XMSG API metadata (receiving/sending ports) and the actual data buffers written to memory addresses, revealing SINTRAN's network routing and message passing architecture.
Key XMSG Command Pattern Analysis¶
Repeated Transmission Sequence (Every ~130ms):¶
Phase 1: Node Header Preparation¶
XFWRI (000007) - Write 8 bytes to Address=0x1E30
Data: [014B 0004 0102 00XX] where XX = target node
XFSND (000014) - Send to [Receiving port: 0x00000000 Sending port: 5]
Phase 2: Routing Data Preparation¶
XFREA (000006) - Read response
XFWRI (000007) - Write 20 bytes to Address=0x00D6
Data: [routing table data for target node]
XFSND (000014) - Send to [Receiving port: 0xFFFFFFFF Sending port: 1]
Detailed Metadata to Buffer Correlations¶
Node Targeting Pattern:¶
Sequence 1: Node 0001¶
Line 9: XFWRI Address=0x1E30 Data=[014B 0004 0102 0001] - Target Node 1
Line 11: XFSND [Receiving port: 0x00000000 Sending port: 5]
Line 15: XFWRI Address=0x00D6 Data=[0100 0010 0102 0064 0202 0004 0302 0064 0402 0000]
Line 17: XFSND [Receiving port: 0xFFFFFFFF Sending port: 1]
Sequence 2: Node 0064 (100)¶
Line 25: XFWRI Address=0x1E30 Data=[014B 0004 0102 0064] - Target Node 100
Line 27: XFSND [Receiving port: 0x00000000 Sending port: 5]
Line 31: XFWRI Address=0x00D6 Data=[0100 0010 0102 0064 0202 0004 0302 0064 0402 0000]
Line 33: XFSND [Receiving port: 0xFFFFFFFF Sending port: 1]
Sequence 3: Node 0065 (101)¶
Line 73: XFWRI Address=0x1E30 Data=[014B 0004 0102 0065] - Target Node 101
Line 75: XFSND [Receiving port: 0x00000000 Sending port: 5]
Line 79: XFWRI Address=0x00D6 Data=[0100 0010 0102 0066 0202 0001 0302 0001 0402 0001]
Line 81: XFSND [Receiving port: 0xFFFFFFFF Sending port: 1]
Sequence 4: Node 0066 (102) (Multiple instances)¶
Line 89: XFWRI Address=0x1E30 Data=[014B 0004 0102 0066] - Target Node 102
Line 91: XFSND [Receiving port: 0x00000000 Sending port: 5]
Line 95: XFWRI Address=0x00D6 Data=[0100 0010 0102 0066 0202 0001 0302 0001 0402 0001]
Line 97: XFSND [Receiving port: 0xFFFFFFFF Sending port: 1]
Line 105: XFWRI Address=0x1E30 Data=[014B 0004 0102 0066] - Target Node 102 (repeat)
Line 107: XFSND [Receiving port: 0x00000000 Sending port: 5]
Line 111: XFWRI Address=0x00D6 Data=[0100 0010 0102 0066 0202 0001 0302 0001 0402 0001]
Line 113: XFSND [Receiving port: 0xFFFFFFFF Sending port: 1]
Line 121: XFWRI Address=0x1E30 Data=[014B 0004 0102 0066] - Target Node 102 (repeat)
Line 123: XFSND [Receiving port: 0x00660000 Sending port: 5] **DIFFERENT PORT!**
Critical Metadata Pattern Analysis¶
Port Assignment Architecture:¶
Header Message Ports (0x1E30 buffer):¶
- Receiving port: 0x00000000 - Standard broadcast/control port
- Receiving port: 0x00660000 - Node-specific port (0x66 = 102₁₀)
- Sending port: 5 - Consistent control channel
Routing Data Ports (0x00D6 buffer):¶
- Receiving port: 0xFFFFFFFF - Broadcast to all nodes
- Sending port: 1 - Primary data channel
Buffer Address Mapping:¶
0x1E30 Buffer (8 bytes) - Node Header Messages:¶
Byte 0-1: 014B = Message type/command
Byte 2-3: 0004 = Message length
Byte 4-5: 0102 = Protocol identifier
Byte 6-7: 00XX = Target node ID (0001, 0064, 0065, 0066)
0x00D6 Buffer (20 bytes) - Routing Table Data:¶
For Node 100: [0100 0010 0102 0064 0202 0004 0302 0064 0402 0000]
For Node 102: [0100 0010 0102 0066 0202 0001 0302 0001 0402 0001]
Structure Analysis:
0100 0010 = Routing header (16 bytes total)
0102 00XX = Primary route to node XX
0202 00YY = Secondary route parameter
0302 00ZZ = Tertiary route parameter
0402 00WW = Route flags/terminator
Network Architecture Revealed¶
Two-Stage Message Transmission:¶
Stage 1: Node Identification¶
- Buffer: 0x1E30 (header)
- Purpose: Identify target node for routing
- Port: Control channel (port 5)
- Recipient: 0x00000000 (broadcast) or 0x00XX0000 (node-specific)
Stage 2: Route Advertisement¶
- Buffer: 0x00D6 (routing data)
- Purpose: Advertise routes to/through nodes
- Port: Data channel (port 1)
- Recipient: 0xFFFFFFFF (all nodes)
Port Significance:¶
Receiving Port Patterns:¶
- 0x00000000: Broadcast control messages
- 0x00660000: Direct message to node 102 (0x66)
- 0xFFFFFFFF: Broadcast data messages
Sending Port Patterns:¶
- Port 5: Control/command channel
- Port 1: Primary data/routing channel
Key Insights¶
1. Dynamic Port Assignment¶
The system uses node-specific receiving ports (0x00XX0000) for direct communication, showing sophisticated addressing.
2. Two-Channel Architecture¶
- Control Channel (Port 5): Node identification and commands
- Data Channel (Port 1): Routing tables and bulk data
3. Buffer Specialization¶
- 0x1E30: Short control messages (node headers)
- 0x00D6: Complex routing data structures
4. Routing vs Direct Messaging¶
- Broadcast routing (0xFFFFFFFF): Route advertisements to all nodes
- Direct messaging (0x00XX0000): Targeted communication to specific nodes
5. Frame Preparation Pipeline¶
Each network frame requires two XMSG operations: 1. Node header preparation → Control port transmission 2. Routing data preparation → Broadcast transmission
This explains why the DMA controller receives multiple prepared frames but can only transmit some before stopping - the OS is continuously preparing routing advertisements for multiple nodes, but the DMA transmission stops prematurely before all prepared frames can be sent.
Correlation with DMA Frames¶
XMSG Data → DMA Frame Mapping:¶
The routing data from XMSG 0x00D6 buffer likely becomes the payload in DMA frames:
DMA Frame: [09 XX 21 13 00 0E 00 66 00 64 00 YY ZZ ZZ WW WW]
[header] [ctrl] [protocol] [len] [dst] [src] [seq] [routing_data]
↑
From XMSG 0x00D6 buffer
This shows perfect integration between SINTRAN's XMSG message preparation and HDLC DMA frame transmission systems.