[P4-dev] Implementing externs
mbudiu at vmware.com
Fri May 5 14:07:18 EDT 2017
Externs are specific to an architecture, so each back-end must know how to handle the externs of its target architecture. On software architectures it makes sense to allow users to extend the space of externs by providing software implementations for new ones, but currently none of the backends in plang/p4c allows that. This should be doable, but nobody worked on this topic. Maybe you can file an issue with the compiler so we have it on our todo list.
From: Rui Miguel<mailto:rmiguel at lasige.di.fc.ul.pt>
Sent: Friday, May 5, 2017 10:43 AM
To: p4-dev lists.p4.org<mailto:p4-dev at lists.p4.org>
Subject: [P4-dev] Implementing externs
After briefly analyzing the JSON representation of an extern declaration, I'm wondering where to implement extern functionality. I imagine there's a C++ class that can be extended? Is it plausible to use the v1model.p4 architecture along with an extern block declared in my header definitions file? (I suppose for hardware targets the P4 programmer shouldn't be declaring externs of his own, but is it legit to change v1model?)
This comes after an attempt to study the project files, but for someone who isn't much into C++, compilers or the project itself, things look a tad cryptic overall.
Thanks in advance,
~ Rui Miguel
P4-dev mailing list
P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev