barefootnetworks / Open-Tofino

Other
314 stars 66 forks source link

register support write operation? #5

Closed kphf1995cm closed 3 years ago

kphf1995cm commented 3 years ago

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

vgurevich commented 3 years ago

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 commented 3 years ago

Does SDE 8.9.1 support register read and write operations?

 况鹏     Peng Kuang  清华大学 网络科学与网络空间研究院     Tel: +86 18292886592     @.***

发件人: Vladimir Gurevich 发送时间: 2021年5月26日 1:55 收件人: barefootnetworks/Open-Tofino 抄送: echorez; Author 主题: Re: [barefootnetworks/Open-Tofino] register support write operation?(#5)

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 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kphf1995cm commented 3 years ago

It seems that SDE 8.9.1 does not support register read and write operations?

--  况鹏     Peng Kuang  清华大学 网络科学与网络空间研究院     Tel: +86 18292886592     @.***

发件人: Vladimir Gurevich 发送时间: 2021年5月26日 1:55 收件人: barefootnetworks/Open-Tofino 抄送: echorez; Author 主题: Re: [barefootnetworks/Open-Tofino] register support write operation?(#5)

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 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

vgurevich commented 3 years ago

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