Hello, I am a freshman in P4->NetFPGA. I am trying to compile my code following the Workflow Overview provided in the Wiki of this project.
I set P4_PROJECT_NAME=switch_calc, and go to the directory for compiling.
When I enter make, an error occurs as follows:
p4c-sdnet -o switch_calc.sdnet switch_calc_solution.p4
/home/tian/wbq/P4-NetFPGA/contrib-projects/sume-sdnet-switch/bin/p4_px_tables.py commands.txt .sdnet_switch_info.dat
Traceback (most recent call last):
File "/home/tian/wbq/P4-NetFPGA/contrib-projects/sume-sdnet-switch/bin/p4_px_tables.py", line 409, in <module>
main()
File "/home/tian/wbq/P4-NetFPGA/contrib-projects/sume-sdnet-switch/bin/p4_px_tables.py", line 404, in main
make_px_tables(args.switch_info_file)
File "/home/tian/wbq/P4-NetFPGA/contrib-projects/sume-sdnet-switch/bin/p4_px_tables.py", line 225, in make_px_tables
with open(switch_info_file) as f:
IOError: [Errno 2] No such file or directory: '.sdnet_switch_info.dat'
Makefile:34: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/tian/wbq/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/switch_calc/src'
Makefile:57: recipe for target 'frontend' failed
make: *** [frontend] Error 2
The problem is from the following pieces of code in p4_px_tables.py:
def make_px_tables(switch_info_file):
with open(switch_info_file) as f:
switch_info = json.load(f)
for table_dict in switch_info['lookup_engines']:
table_name = table_dict['p4_name']
table_type = table_dict['match_type']
if (table_type == "EM"):
PX_TABLES[table_name] = PXCAMTable(table_dict)
elif (table_type == "TCAM"):
PX_TABLES[table_name] = PXTCAMTable(table_dict)
elif (table_type == "LPM"):
PX_TABLES[table_name] = PXLPMTable(table_dict)
else:
print >> sys.stderr, "ERROR: {0} uses an unsupported match type".format(table_name)
sys.exit(1)
The problem is the missing of file .sdnet_switch_info.dat, which should be placed in the src folder of the switch_cal project. However, it is missing right now.
I have searched the error in Google, but there is not an explanation of this error or related to .sdnet_switch_info.dat file.
These are the environment settings of my PC:
###### Vivado ######
source /home/tian/Xilinx/Vivado/2016.4/settings64.sh
#### P4-NetFPGA #####
source /home/tian/wbq/P4-NetFPGA/tools/settings.sh
#### SDNet ####
source /home/tian/Xilinx/SDNet/2018.1.1/settings64.sh
export PATH=/home/tian/Xilinx/SDNet/2018.1.1/bin:$PATH
# point to Vivado license file and SDNet license file
export XILINXD_LICENSE_FILE=/home/tian/software/license/Xilinx_sdnet.lic
Could you share some ideas on my problem? Thank you for your time.
Best wishes.
Hello, I am a freshman in P4->NetFPGA. I am trying to compile my code following the
Workflow Overview
provided in the Wiki of this project.I set
P4_PROJECT_NAME=switch_calc
, and go to the directory for compiling.When I enter
make
, an error occurs as follows:The problem is from the following pieces of code in
p4_px_tables.py
:The problem is the missing of file
.sdnet_switch_info.dat
, which should be placed in thesrc
folder of theswitch_cal
project. However, it is missing right now.I have searched the error in Google, but there is not an explanation of this error or related to
.sdnet_switch_info.dat
file.These are the environment settings of my PC:
Could you share some ideas on my problem? Thank you for your time. Best wishes.