blob: d92a5c4734a820864909d380551f608995470b2a [file] [log] [blame]
Carmelo Cascone228092b2018-06-15 20:41:10 +02001#!/usr/bin/env bash
2
3set -ex
4
5BMV2_CPU_PORT="255"
6BMV2_PP_FLAGS="-DTARGET_BMV2 -DCPU_PORT=${BMV2_CPU_PORT}"
7
8PROFILE=$1
9OTHER_PP_FLAGS=$2
10
11OUT_DIR=./p4c-out/${PROFILE}/bmv2/default
12
13mkdir -p ${OUT_DIR}
14
15p4c-bm2-ss --arch v1model \
16 -o ${OUT_DIR}/bmv2.json \
17 ${BMV2_PP_FLAGS} ${OTHER_PP_FLAGS} \
18 --p4runtime-file ${OUT_DIR}/p4info.txt \
19 --p4runtime-format text \
20 fabric.p4