p4c-wp4
所属分类:云计算
开发工具:C++
文件大小:53KB
下载次数:0
上传日期:2022-01-05 23:56:04
上 传 者:
sh-1993
说明: P4数据平面编译器的编译器扩展
(Compiler extension for the P4 Data Plane compiler)
文件列表:
CMakeLists.txt (1661, 2021-01-29)
LICENSE (11357, 2021-01-29)
p4c-wp4.cpp (3286, 2021-01-29)
p4include (0, 2021-01-29)
p4include\wp4_model.p4 (1382, 2021-01-29)
runtime (0, 2021-01-29)
runtime\wp4_runtime.c (8505, 2021-01-29)
runtime\wp4_runtime.h (1485, 2021-01-29)
tests (0, 2021-01-29)
tests\Makefile (381, 2021-01-29)
tests\test_wp4.p4 (2665, 2021-01-29)
version.h.cmake (1243, 2021-01-29)
wp4-Backend.cpp (2282, 2021-01-29)
wp4-Backend.h (981, 2021-01-29)
wp4-CodeGen.cpp (10173, 2021-01-29)
wp4-CodeGen.h (4003, 2021-01-29)
wp4-Control.cpp (21281, 2021-01-29)
wp4-Control.h (3375, 2021-01-29)
wp4-Lower.cpp (5025, 2021-01-29)
wp4-Lower.h (1988, 2021-01-29)
wp4-Midend.cpp (5134, 2021-01-29)
wp4-Midend.h (1158, 2021-01-29)
wp4-Model.cpp (693, 2021-01-29)
wp4-Model.h (2910, 2021-01-29)
wp4-Object.h (1380, 2021-01-29)
wp4-Options.h (2125, 2021-01-29)
wp4-Parser.cpp (13105, 2021-01-29)
wp4-Parser.h (1676, 2021-01-29)
wp4-Program.cpp (7532, 2021-01-29)
wp4-Program.h (3128, 2021-01-29)
wp4-Table.cpp (13569, 2021-01-29)
wp4-Table.h (2332, 2021-01-29)
wp4-Target.cpp (2223, 2021-01-29)
wp4-Target.h (2950, 2021-01-29)
wp4-Type.cpp (8533, 2021-01-29)
wp4-Type.h (6301, 2021-01-29)
# WP4
P4 Compiler extension for IEEE 802.11 Wireless Data Planes.
## Installation
### Ubuntu dependencies
Most dependencies can be installed using `apt-get install`:
`sudo apt-get install cmake g++ git automake libtool libgc-dev bison flex
libfl-dev libgmp-dev libboost-dev libboost-iostreams-dev
libboost-graph-dev llvm pkg-config python python-scapy python-ipaddr python-ply
tcpdump`
For documentation building:
`sudo apt-get install -y doxygen graphviz texlive-full`
### Install protobuf 3.2.0
```bash
git clone https://github.com/google/protobuf.git`
git checkout v3.2.0`
./autogen.sh`
./configure`
make`
make check`
sudo make install`
sudo ldconfig # refresh shared library cache.`
```
### P4-16 Compiler
First you need to follow the installation guide of [P4-16](https://github.com/p4lang/p4c/)
When you have P4-16 compiler, then add this project as an extension.
Assuming you have P4-16 at your dir ~/p4c/, to setup p4c-wp4:
```bash
cd ~/p4c/
mkdir extensions
cd extensions
git clone https://github.com/pzanna/p4c-wp4.git
ln -s ~/p4c p4c-wp4/p4c
```
Now that you have cloned p4c-WP4 at ~/p4c/extensions/p4c-wp4, the next step is to
recompile p4c:
```bash
cd ~/p4c/
mkdir -p build
cd build/
cmake ..
make
```
This generates a p4c-wp4 binary in ~/p4c/build/extensions/p4c-wp4.
To build the test P4 program:
```bash
cd ~/p4c/extensions/p4c-wp4/tests
~/p4c/build/extensions/p4c-wp4/p4c-wp4 test_wp4.p4 -o wp4-p4.c
```
### Current Status
This is the first version of this extension and very much a work in progress to don't expect too much at the start with, more functionality will be added over time. On that note, any assistance would be extremely welcome.
近期下载者:
相关文件:
收藏者: