Extern Tables, unlike other tables, are not implemented inside VitisNetP4 IP, but outside
instead, similarly to how User Externs are integrated. Any table can be made an ‘extern
table’ as long as the attribute user_extern is used. This attribute
takes one or two inputs, depending on the mode required, similarly to how User Externs
are configured:
- Fixed latency mode
- Only one value is used to specify the fixed latency value in clock cycles.
Example:
table forwardIPv4 { key = { hdr.ipv4.tos : exact; } actions = { forwardPacket; NoAction; } size = 64; default_action = NoAction; user_extern = 15; // fixed latency mode, latency = 15 cycles } - Variable latency mode
- Two values are used. The first value is used to specify the minimum latency
value in clock cycles. The second value is used to specify the maximum pipeline
capacity of the extern table in clock cycles.
Example:
table forwardIPv4 { key = { hdr.ipv4.tos : ternary; } actions = { forwardPacket; NoAction; } size = 1024; default_action = NoAction; user_extern = {5, 30}; // variable latency mode. Min latency = 5 cycles & max pipe capacity = 30 cycles }Note: In variable latency mode, it is important to connect thereadysignals to the provided user extern interface ports. See Table 1.