[P4-dev] Difference between "simple" control blocks and functions?

Kamila Součková kamila at ksp.sk
Wed Apr 3 08:48:36 EDT 2019


Hello,

I am wondering if there is any semantic difference between a "simple"
control block that has no constructor parameters and consists of only an
apply {...}, and a void function. I am asking because I have something that
could be written as either of those two things, and I am curious whether
there are any considerations I'm not aware of, or whether it is in this
case simply a matter of style.

Is the difference perhaps that some architectures don't allow conditionals
in functions, but do allow it in controls? Or in how these things may map
to hardware?

Thank you!

Best,
Kamila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190403/693d2dbc/attachment.html>


More information about the P4-dev mailing list