p4c-bm
November 8, 2019 ยท View on GitHub
=============================== p4c-bm
.. image:: https://travis-ci.org/p4lang/p4c-bm.svg?branch=develop :target: https://travis-ci.org/p4lang/p4c-bm.svg
Generates the JSON configuration for the behavioral-model (bmv2) <https://github.com/p4lang/behavioral-model>_.
NOTE: This repository is no longer under active development or
maintenance. We recommend that you instead consider using the
currently developed open source P4 tools, which are p4c <https://github.com/p4lang/p4c>_ and behavioral-model <https://github.com/p4lang/behavioral-model>_.
Important: the PD has been moved out of this repository and split between the
bmv2 repository <https://github.com/p4lang/behavioral-model>_ (for fixed part
of the PD) and the new p4-build repository <https://github.com/p4lang/p4-build>_ (build infrastructure for the
auto-generated / program-dependent part of the PD).
Usage
-
To install p4c-bm on your machine:
- :code:
sudo pip install -r requirements.txt - :code:
sudo pip install -r requirements_v1_1.txtif you are interested in compiling P4 v1.1 programs - :code:
sudo python setup.py install
- :code:
-
Using p4c-bm
- Try :code:
p4c-bmv2 -h - :code:
--jsonto generate a JSON representation of the P4 program - :code:
--pdto generate the PD C++ code - :code:
--p4-v1.1if your input program is a P4 v1.1 program
- Try :code:
-
To install in a non-default location, you can use:
- :code:
python setup.py build install --prefix <your_path> [--single-version-externally-managed] --record install_files.txt - :code:
cat install_files.txt | xargs rm -rfif you need to uninstall later on
- :code:
.. Apache license
..
- Documentation: https://p4c_bm.readthedocs.org.