add ifdef for controller actions
This commit is contained in:
parent
af6fae7774
commit
93c98323f4
2 changed files with 62 additions and 5 deletions
49
doc/plan.org
49
doc/plan.org
|
@ -6201,7 +6201,8 @@ cd $SUME_FOLDER/lib/hw/xilinx/cores/cam_v1_1_0/ && make update && make
|
|||
cd $SUME_SDNET/sw/sume && make
|
||||
cd $SUME_FOLDER && make
|
||||
#+END_CENTER
|
||||
**** TODO Install build deps
|
||||
**** DONE Install build deps
|
||||
CLOSED: [2019-07-23 Tue 15:03]
|
||||
#+BEGIN_CENTER
|
||||
|
||||
sudo apt-get -y install python-matplotlib
|
||||
|
@ -6227,7 +6228,8 @@ make[1]: Leaving directory '/home/nico/master-thesis/netpfga/minip4/sw/CLI'
|
|||
ERROR: could not compile libcam souce files
|
||||
|
||||
#+END_CENTER
|
||||
**** TODO try2: includes missing
|
||||
**** DONE try2: includes missing
|
||||
CLOSED: [2019-07-23 Tue 15:03]
|
||||
#+BEGIN_CENTER
|
||||
/opt/Xilinx/Vivado/2018.2/lib/lnx64.o/../../tps/lnx64/gcc-6.2.0/bin/gcc -fPIC -c -Wa,-W -fPIC -m64 -B/opt/Xilinx/Vivado/2018.2/lib/lnx64.o/../../tps/lnx64/gcc-6.2.0/bin/../../binutils-2.26/bin/ -I"/opt/Xilinx/Vivado/2018.2/data/xsim/include" -I"/opt/Xilinx/Vivado/2018.2/data/xsim/systemc" "./Testbench/CAM.c" -O1 -o "/home/nico/master-thesis/netpfga/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/xsim.dir/work/xsc/CAM.lnx64.o" -DXILINX_SIMULATOR
|
||||
In file included from /usr/include/stdio.h:27:0,
|
||||
|
@ -6247,8 +6249,51 @@ libc6-dev-i386: /usr/include/sys/cdefs.h
|
|||
|
||||
|
||||
#+END_CENTER
|
||||
**** try3: missing makefile and axi files
|
||||
- step4 ok
|
||||
- step5, step 6, step7 ok
|
||||
|
||||
#+BEGIN_CENTER
|
||||
nico@ESPRIMO-P956:~/master-thesis$ ls /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch
|
||||
test
|
||||
|
||||
make: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test'
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/Makefile': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_log.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_stim.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_expected.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_log.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_stim.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_expected.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_log.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_stim.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_expected.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_log.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_stim.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_expected.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/dma_0_log.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/dma_0_expected.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/Makefile': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_stim.log': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_expect.axi': No such file or directory
|
||||
cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_stim.axi': No such file or directory
|
||||
NetFPGA environment:
|
||||
Root dir: /home/nico/projects/P4-NetFPGA
|
||||
Project name: simple_sume_switch
|
||||
Project dir: /tmp/nico/test/simple_sume_switch
|
||||
Work dir: /tmp/nico
|
||||
512
|
||||
=== Work directory is /tmp/nico/test/simple_sume_switch
|
||||
=== Setting up test in /tmp/nico/test/simple_sume_switch/sim_switch_default
|
||||
=== Running test /tmp/nico/test/simple_sume_switch/sim_switch_default ... using cmd ['/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default/run.py', '--sim', 'xsim']
|
||||
+ date
|
||||
Die Jul 23 13:34:54 CEST 2019
|
||||
+ [ = no ]
|
||||
+ cd /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch
|
||||
+ make
|
||||
make: *** No targets specified and no makefile found. Stop.
|
||||
|
||||
#+END_CENTER
|
||||
*** the config writes madness
|
||||
- step9 (sume simulation, the longest step) in the process calls
|
||||
"config_writes.py"
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
#include <sume_switch.p4>
|
||||
#include "headers.p4"
|
||||
|
||||
/********************************************************************************
|
||||
* Features
|
||||
*/
|
||||
|
||||
// #define ENABLE_CONTROLLER 1
|
||||
|
||||
/********************************************************************************
|
||||
* Header
|
||||
*/
|
||||
|
@ -101,7 +107,11 @@ control TopPipe(inout headers hdr,
|
|||
|
||||
action do_nothing() {
|
||||
EthAddr_t temp = hdr.ethernet.dst_addr;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CONTROLLER
|
||||
#include "actions_controller.p4"
|
||||
#endif
|
||||
|
||||
table lookup_table {
|
||||
key = {
|
||||
|
@ -109,7 +119,10 @@ control TopPipe(inout headers hdr,
|
|||
}
|
||||
|
||||
actions = {
|
||||
swap_eth_addresses;
|
||||
#ifdef ENABLE_CONTROLLER
|
||||
controller_debug;
|
||||
#endif
|
||||
swap_eth_addresses;
|
||||
do_nothing;
|
||||
send_to_port1;
|
||||
send_to_all_ports;
|
||||
|
@ -150,7 +163,6 @@ control TopDeparser(packet_out packet,
|
|||
|
||||
#include "deparser.p4"
|
||||
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************************
|
||||
|
|
Loading…
Reference in a new issue