[P4-dev] Any examples of "register" ?

David Gatting gattingd at gmail.com
Sat Sep 17 00:12:04 EDT 2016


Hi,

Are there any examples of "register" usage ?

1) I tried out register with *layout* & *direct* keywords and got an error
(shown below) while compiling the p4 file.


*CRITICAL:gen_json:registers with layout not supported*

When I tried the same with *layout* & *instance_count*, I didn't get any
error. Is this only partially supported ?

2) How do I use runtime_CLI.py to do register write and read ? especially
if register with layout where there could be multiple fields. I tried
"register_write <register_name> <index> <val>" (on a register with width
and instance_count, however write failed, complaining that index in
invalid).

3) While processing the packet, I would like to modify few fields of a
register entry as part of one of the actions.

Is there any working example showing all this ?

Thanks,
D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20160916/960cfe4b/attachment-0002.html>


More information about the P4-dev mailing list