High level synthesis for packet processing pipelines