Generates the JSON configuration for the behavioral-model (bmv2).
Important: the PD has been moved out of this repository and split between the bmv2 repository (for fixed part of the PD) and the new p4-build repository (build infrastructure for the auto-generated / program-dependent part of the PD).
- To install p4c-bm on your machine:
sudo pip install -r requirements.txt
sudo pip install -r requirements_v1_1.txtif you are interested in compiling P4 v1.1 programs
sudo python setup.py install
- Using p4c-bm
--jsonto generate a JSON representation of the P4 program
--pdto generate the PD C++ code
--p4-v1.1if your input program is a P4 v1.1 program
- To install in a non-default location, you can use:
python setup.py build install --prefix <your_path> [--single-version-externally-managed] --record install_files.txt
cat install_files.txt | xargs rm -rfif you need to uninstall later on