---
# System prepended metadata

title: SXM

---

## SXM module specification & instruction definition

![image](https://hackmd.io/_uploads/Sk7xoVl2gx.png)
* RX, TX : Receive/send the particular stream from/to C2C
* SEL : Shift superlane data and select from the north-shifted/south shifted/unshifted data
* TSP : Transpose fp16 data
* PER : 

### RX
1. ICU * 1

| 31 .. 13 |   12   | 11 .. 7 | 6 .. 3 | 2 .. 0  |
|----------|--------|---------|--------|---------|
| 0 ... 0  | pathsel|   str   | dskew  | dfunc   |

* str : str to be replaced by the input str from C2C
* pathsel : 0--bypass; 1--replace stream
2. IO spec

|    RX    | ICU                |         Data      |     Data         |
| ------ | ------------------ | --------------- | ---------------- |
| Input  | icu\_rx\_i \[31:0] | SR\_i \[4095:0] | rx\_str \[127:0] |
| Output | icu\_rx\_o \[31:0] | SR\_o \[4095:0] |                  |

3. Diagram
![image](https://hackmd.io/_uploads/r1MTg1bnlx.png)



### TX
1. ICU * 1

| 31 .. 13 |   12   | 11 .. 7 | 6 .. 3 | 2 .. 0  |
|----------|--------|---------|--------|---------|
| 0 ... 0  | pathsel|   str   | dskew  | dfunc   |

* str : str to be send to C2C 
* pathsel : 0--bypass; 1--select and output stream
2. IO spec

|    TX    | ICU              |         Data    |     Data         |
| ------ | ------------------ | --------------- | ---------------- |
| Input  | icu\_rx\_i \[31:0] | SR\_i \[4095:0] |  |
| Output | icu\_rx\_o \[31:0] | SR\_o \[4095:0] |  tx\_str \[127:0]                |

3. Diagram
![image](https://hackmd.io/_uploads/SkYTlkZ2ee.png)



### SEL
1. ICU * 1

| 31 .. 14 | 13 .. 12 | ... | 15 .. 14 | 13 .. 12 | 11 .. 8 |   7   | 6 .. 3 | 2 .. 0 |
|----------|----------|-----|----------|----------|---------|-------|-------|-------|
|    0     | splane_6 | ... | splane_2 | splane_1 |    N    |dstfunc| dskew | dfunc |

* N : shift amount
* splane1~6: select the shifted direction
* dstfunc : 0--R41; 1--R5
2. IO spec

|  SEL      |      ICU               |              Data  |                 
|--------|---------------------|----------------------|
| Input  | icu_rx_i [31:0]     | SR_i [24575:0]       |                     |
| Output | icu_rx_o [31:0]     | SR_o [24575:0]     

3. Diagram
![image](https://hackmd.io/_uploads/ry0qG1b3ll.png)



### TSP 
1. ICU * 1

| 31 .. 12 | 11 |  10 .. 8  | 7      | 6 .. 3 | 2 .. 0 |
|----------|----------|-----------|---------|--------|--------|
| 0 ... 0  | is_trp  | lastsplane| dstfunc | dskew  | dfunc  |

* lastsplane : transition from MaxL to minL
* dstfunc : 0--PRM; 1--R5
* is_tsp : whether the input data should perform the TSP

2. IO spec

|  TSP      |      ICU               |              Data  |                 
|--------|---------------------|----------------------|
| Input  | icu_rx_i [31:0]     | SR_i [4095:0]       |                     |
| Output | icu_rx_o [31:0]     | SR_o [4095:0]     
3. Diagram

![image](https://hackmd.io/_uploads/SJhqcxZ2gg.png)
![image](https://hackmd.io/_uploads/ByQ9W-bhex.png)

Note: The first cycle can not achieve II = 1


|--|