0
\$\begingroup\$

Curious to understand the use case of designing synthesizable linked list in RTL. This seems to be common in network chip designs.

Given that synthesized hardware has static memory size, what's the advantage of having linked list structure over array?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

There are a lot of use cases. Some examples:

  • incoming packets of different sizes need to be received and stored in a way that the OS can skip over one without reading its contents. Storing a length field is already a primitive form of a linked list
  • for known flows, packet headers can be stripped off and stored separately, while the payload is appended to a payload buffer. A linked list is generated so the network stack can still inspect the entire packet as a whole if it needs to.
  • outgoing packets can be assembled inside the network chip, pulling the headers from one area of RAM and the payload from another
\$\endgroup\$
2
  • \$\begingroup\$ Thanks for response. Can we not do these with arrays? Given that synthesized hardware has static memory size, what's the advantage of having linked list structure over array? Trying to wrap my head around the array vs linked list part. \$\endgroup\$
    – HWDesigner
    Commented Apr 7 at 18:16
  • \$\begingroup\$ Pretty much all of these are on the interface to a host PC, so we're using the host's memory here, not BRAM, and in larger quantities than we have BRAM available. \$\endgroup\$ Commented Apr 7 at 23:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.