74 | | Scripts seemed broken, so manually export'd all of them. Specifics of variables pulled from README in base package root directory. |
75 | | {{{ |
76 | | export NF_ROOT=/home/test/netfpga #(wherever your netfpga base files are) |
77 | | export NF_DESIGN_DIR="${NF_ROOT}/projects/reference_router" #(whatever directory project is in) |
78 | | export PERL5LIB="${NF_DESIGN_DIR}/lib/Perl5:${NF_ROOT}/lib/Perl5:${PERL5LIB}" #(from ${NF_ROOT}/bin/nf_profile) |
| 72 | After setting NF_ROOT to the netfpga directory, source `nf_profile`, located in ${NF_ROOT}/bin/ |
| 73 | |
| 74 | {{{ |
| 75 | export NF_ROOT=/home/openflow/netfpga #(wherever your netfpga base files are) |
| 76 | source ${NF_ROOT}/bin/nf_profile |
122 | | ==== 7. modifications for the cpci reprogrammer ==== |
123 | | In Debian, the command `lspci` is located under /usr/bin/, and `ifconfig` under /sbin/. cpci_reprogram.pl must reflect these differences. Edit lines 24 and 25 in the file (under /usr/local/sbin, and ./netfpga/lib/scripts/cpci_reprogram/) as such: |
124 | | {{{ |
125 | | # System binaries |
126 | | my $lspci = '/usr/bin/lspci'; |
127 | | my $ifconfig = '/sbin/ifconfig'; |
128 | | }}} |
129 | | |
130 | | Then add cpci_reprogram.pl to the startup routine. Add the following to /etc/rc.local: |
131 | | {{{ |
132 | | /home/test/netfpga/lib/scripts/cpci_reprogram/cpci_reprogram.pl --all |
| 120 | ==== 7. add the cpci reprogrammer to startup routine ==== |
| 121 | Add the following to /etc/rc.local: |
| 122 | {{{ |
| 123 | /home/openflow/netfpga/lib/scripts/cpci_reprogram/cpci_reprogram.pl --all |
| 169 | |
| 170 | ==== 3. NetFPGA tunnel package ==== |
| 171 | Download and untar in `/home/openflow/`. Move `tunneling_openflow_switch.bit` and `reg_defines_tunneling_openflow_switch.h` to your_openflow_directory/hw-lib/nf2/. The files should be located under `bitfiles/` and `/projects/tunneling_openflow_switch/lib/C/` in the netfpga directory, respectively. Do a make and make install in the openflow directory. |
| 172 | |
| 173 | ==== 4. Regression test ==== |
| 174 | The setup should be wired as such |
| 175 | {{{ |
| 176 | eth1 <----> nf2c0 |
| 177 | eth2 <----> nf2c1 |
| 178 | }}} |
| 179 | |
| 180 | The test can be run with the following command: |
| 181 | {{{ |
| 182 | nf_regress_test.pl --project tunneling_openflow_switch |
| 183 | }}} |
| 184 | |
| 185 | As of now, getting this error: |
| 186 | {{{ |
| 187 | root@node1-2:~/netfpga/lib/scripts/cpci_reprogram# /home/akoshibe/netfpga/bin/n_regress_test.pl --project tunneling_openflow_switch |
| 188 | |
| 189 | NetFPGA environment: |
| 190 | Root dir: /home/openflow/netfpga |
| 191 | Project name: tunneling_openflow_switch |
| 192 | Project dir: /home/openflow/netfpga/projects/tunneling_openflow_switch |
| 193 | Work dir: /tmp/root |
| 194 | |
| 195 | Root directory is /home/openflow/netfpga |
| 196 | Running tests on project 'tunneling_openflow_switch'... |
| 197 | Running global setup... FAIL |
| 198 | Output was: |
| 199 | |
| 200 | NetFPGA environment: |
| 201 | Root dir: /home/openflow/netfpga |
| 202 | Project name: tunneling_openflow_switch |
| 203 | Project dir: /home/openflow/netfpga/projects/tunneling_openflow_switch |
| 204 | Work dir: /tmp/root |
| 205 | |
| 206 | Found net device: nf2c0 |
| 207 | Error: Virtex design compiled against a different CPCI version |
| 208 | Active CPCI version : 4 (rev 1) |
| 209 | Device built against: 3 (rev 4) |
| 210 | Bit file built from: nf2_top_par.ncd |
| 211 | Part: 2vp50ff1152 |
| 212 | Date: 2010/ 5/ 4 |
| 213 | Time: 15:49:32 |
| 214 | Error Registers: 0 |
| 215 | Good, after resetting programming interface the FIFO is empty |
| 216 | Download completed - 2377668 bytes. (expected -1). |
| 217 | DONE went high - chip has been successfully programmed. |
| 218 | CPCI Information |
| 219 | ---------------- |
| 220 | Version: 4 (rev 1) |
| 221 | |
| 222 | Device (Virtex) Information |
| 223 | --------------------------- |
| 224 | Project directory: tunneling_openflow_switch |
| 225 | Project name: Tunneling OpenFlow Switch |
| 226 | Project description: Tunneling OpenFlow Switch |
| 227 | |
| 228 | Device ID: 0 |
| 229 | Version: 0.1.0 |
| 230 | Built against CPCI version: 3 (rev 4) |
| 231 | |
| 232 | Download Failed: 256 |
| 233 | |
| 234 | |
| 235 | global/setup exited with value 1 |
| 236 | |
| 237 | }}} |
| 238 | |