Supported P416 Language Features - 2022.2 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The following table identifies supported and not supported P416 language features.

Table 1. P416Language Features
Context Supported Not Supported
Data Types

void (extern functions only)

match_kind (architecture defined)

error (architecture and user defined)

Integers (unsigned: bit and varbit)

bool

void (others)

match_kind (user defined)

ParserTimeout error

String ( @name “…”)

Integers (others)
Derived Types

enum (architecture specific)

header (and header stack)

struct

package (architecture specific)

typedef

const

enum (user defined)

header (push and pop methods)

header_union

tuple

package (user defined)
Expressions

Cast

Variables

Operators (!, ~, -, +, *, >>, <<, &, ^, |)
Operators (/, %, ?)
Statements

assign

if, else

switch

block

exit

return

Parsing

state

extract (fixed width extraction)

extract (variable width extraction)

transition (user defined)

transition (accept and reject)

select (no overlap with mask/range)

verify

lookahead

(extract to underscore, or advance)

length

select with overlapsskipping bits (mask/range)

sub-parsers

Control

action

table (key, actions, default_action, entries, size and implementation statement)

emit

apply

extern (user)

Externs (built-in counter)

Externs (checksum, register etc.)

Note: Conditional statements are not supported inside actions.