barefootnetworks / Open-Tofino

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

register support write operation?

kphf1995cm opened this issue · comments

Does the register in P4_16 support write opreration ? Could you give an example of register write operation in P4_16?

The latest versions of TNA and Barefoot compiler support read() and write() methods for registers. You can find the definitions right here.

These methods are enough for simple register operations, while the RegisterAction() extern allows you to express more advanced processing as well.

For more details and examples I suggest attending Intel Connectivity Academy

@kphf1995cm -- as stated, this is a relatively new feature and it is not available in the older releases.