aignacio / ravenoc

RaveNoC is a configurable HDL NoC (Network-On-Chip) suitable for MPSoCs and different MP applications
MIT License
148 stars 32 forks source link

Regarding Head, Body and Tail Flits #18

Closed kutaybulun closed 3 months ago

kutaybulun commented 3 months ago

Hello!

It is said in the repo that a head flit has the following format for vanilla configuration: FLIT_TYPE (2b) | X_DEST (1b) | Y_DEST (1b) | PKT_WIDTH (8b) | MESSAGE (20b) and flit type is appended in pkt_proc. Say that I am using an axi master to send a packet over the NoC via axi_slave_if. Should the first flit (head flit) I send have the following format below? X_DEST (1b) | Y_DEST (1b) | PKT_WIDTH (8b) | MESSAGE (20b) And the rest body and tail flit should have the following format below or they need destination and pkt_width fields as well? MESSAGE (32b)

Thanks in advance for your help!

aignacio commented 3 months ago

Hey @kutaybulun,

https://github.com/aignacio/ravenoc/blob/38a8ab0e948af3a8f46f646a22d17817e26c0282/tb/common_noc/ravenoc_pkt.py#L46-L48

There is a small mistake here, actually, the message should be 22b long, not 20b. The code is fine, it just the comment itself:

32 = X_DEST (1b) + Y_DEST (1b) + PKT_WIDTH (8b) + MESSAGE (22b)

So, coming to your question, it is only the header flit that requires the additional info, all the remaining flits, including the tail flit would not required to have the additional overhead bits. Thus a transmission flow for the vanilla cfg would be something like:

1x header flit:
| FLIT_TYPE (2b) = Header | X_DEST (1b) | Y_DEST (1b) | PKT_WIDTH (8b) | MESSAGE 
 (22b) |

Nx body flits:
| FLIT_TYPE (2b) = Body | MESSAGE (32b) |

1x tail flit:
| FLIT_TYPE (2b) = Tail | MESSAGE (32b) |