Files
eb001/tb/shinTest/testcase/detect.py

33 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from pyutils import *
def tc1():
genPkt = GenPkt()
#-------------------------------------------------------------------------
#>>>>>>嗅探数据包1正常的嗅探数据包
genPkt.clean()
genPkt.setPktType(1)
gen_file_def = "detect_pkt"
sm_idx = 0
genPkt.addAfterExc(genWriteTransLenCode(gen_file_def, sm_idx)
+genWriteTransPktCode(gen_file_def, sm_idx)
+genTrgTransPktCode(gen_file_def, sm_idx)
+genReadAckPktCode(gen_file_def, sm_idx))
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)
def tc2():
genPkt = GenPkt()
#-------------------------------------------------------------------------
#>>>>>>嗅探数据包2正常的嗅探数据包
genPkt.clean()
genPkt.setPktType(1)
gen_file_def = "detect_pkt2"
sm_idx = 0
genPkt.addAfterExc(genWriteTransLenCode(gen_file_def, sm_idx)
+genWriteTransPktCode(gen_file_def, sm_idx)
+genTrgTransPktCode(gen_file_def, sm_idx)
+genReadAckPktCode(gen_file_def, sm_idx))
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)