  The P4 language has become the dominant choice for programming the
reconfigurable match-action table based programmable switches. V1Model
architecture is the most widely available realization of this paradigm. The
open-source compiler frontend developed by the P4 consortium can execute syntax
analysis and derive a hardware-independent representation of a program written
using the latest version of P4 (also known as P416 ). A compiler backend is
required to map this intermediate representation to the hardware resources of a
V1Model switch. However, there is no open-source compiler backend available to
check the realizability of a P416 program over a V1Model switch. Proprietary
tools provided by different hardware vendors are available for this purpose.
However, they are closed source and do not provide access to the internal
mapping mechanisms. Which inhibits experimenting with new mapping algorithms
and innovative instruction sets for reconfigurable match-action table
architecture. Moreover, the proprietary compiler backends are costly and come
with various non-disclosure agreements. These factors pose serious challenges
to programmable switch-related research. In this work, we present an
open-source P416 compiler backend for the V1Model architecture-based
programmable switches. It uses heuristic-based mapping algorithms to map a P416
program over the hardware resources of a V1Model switch. It allows developers
to rapidly prototype different mapping algorithms. It also gives various
resource usage statistics of a P416 program, enabling comparison among multiple
P416 schemes.
