+doc +log +allports
This commit is contained in:
parent
9cebd4024a
commit
dec8a02a26
6 changed files with 140 additions and 14 deletions
|
|
@ -4,10 +4,10 @@
|
|||
# Copyright (c) 2017 Stephen Ibanez
|
||||
# All rights reserved.
|
||||
#
|
||||
# This software was developed by Stanford University and the University of Cambridge Computer Laboratory
|
||||
# This software was developed by Stanford University and the University of Cambridge Computer Laboratory
|
||||
# under National Science Foundation under Grant No. CNS-0855268,
|
||||
# the University of Cambridge Computer Laboratory under EPSRC INTERNET Project EP/H040536/1 and
|
||||
# by the University of Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 ("MRC2"),
|
||||
# by the University of Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 ("MRC2"),
|
||||
# as part of the DARPA MRC research programme.
|
||||
#
|
||||
# @NETFPGA_LICENSE_HEADER_START@
|
||||
|
|
@ -38,7 +38,7 @@ from switch_calc_headers import *
|
|||
from nf_sim_tools import *
|
||||
|
||||
PKT_SIZE = 64
|
||||
IFACE = "eth1"
|
||||
IFACE = "nf0"
|
||||
|
||||
ETH_SRC = "08:11:11:11:11:08"
|
||||
ETH_DST = "08:22:22:22:22:08"
|
||||
|
|
@ -57,7 +57,7 @@ class SwitchCalcTester(cmd.Cmd):
|
|||
intro = "The HW testing tool for the switch_calc design\n type help to see all commands"
|
||||
|
||||
def _to_int(self, op):
|
||||
try:
|
||||
try:
|
||||
val = int(op, 0)
|
||||
assert(val >= 0)
|
||||
return val
|
||||
|
|
@ -105,7 +105,7 @@ class SwitchCalcTester(cmd.Cmd):
|
|||
return pkt
|
||||
|
||||
def do_run_test(self, line):
|
||||
pkt = self._parse_line(line)
|
||||
pkt = self._parse_line(line)
|
||||
self._submit_pkt(pkt)
|
||||
|
||||
def help_run_test(self):
|
||||
|
|
@ -113,9 +113,9 @@ class SwitchCalcTester(cmd.Cmd):
|
|||
run_test <op1> <operation> <op2>
|
||||
DESCRIPTION: Create a single test packet to test the functionality of the switch_calc implementation
|
||||
NOTES:
|
||||
<operation> : must be one of the following [ADD, +, SUB, -, LOOKUP, ADD_REG, SET_REG]
|
||||
<operation> : must be one of the following [ADD, +, SUB, -, LOOKUP, ADD_REG, SET_REG]
|
||||
LOOKUP : <op1> = the key to lookup, <op2> = unused
|
||||
ADD_REG / SET_REG : <op1> = register index, <op2> = value
|
||||
ADD_REG / SET_REG : <op1> = register index, <op2> = value
|
||||
"""
|
||||
|
||||
def do_exit(self, line):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue