增加代码,调试sync测试用例

This commit is contained in:
2025-08-04 19:19:08 +08:00
parent 03b63276b8
commit 594c8d70d9
3 changed files with 78 additions and 12 deletions

View File

@@ -749,7 +749,7 @@ def tc10():
gen_file_def = "base_tc10"
sm_idx = 0
tc_des = "发送超过带有64个子包的。检查子包的状态、中断、统计等信息。"
tc_des = "发送超过带有64个子包的。检查子包的状态、中断、统计等信息。"
#-------------------------------------------------------------------------
#>>>>>>设置顺序地址
@@ -767,7 +767,7 @@ def tc10():
genPkt.addSubPkt(i, 0, 0x0814, 1, 4, [21, 22, 23, 24])
genPkt.addSubPkt(i, 0, 0x0818, 1, 4, [25, 26, 27, 28])
genPkt.addSubPkt(i, 0, 0x081c, 1, 4, [29, 30, 31, 32])
genPkt.addSubPkt(i, 0, 0x0820, 1, 4, [i + 1, 2, 3, 4])
genPkt.addSubPkt(i, 0, 0x0820, 1, 4, [1, 2, 3, 4])
genPkt.addSubPkt(i, 0, 0x0824, 1, 4, [5, 6, 7, 8])
genPkt.addSubPkt(i, 0, 0x0828, 1, 4, [9, 10, 11, 12])
genPkt.addSubPkt(i, 0, 0x082c, 1, 4, [13, 14, 15, 16])
@@ -810,6 +810,68 @@ def tc10():
+genSlvSMReadData(3, 0, 0x40)
+genSlvSMReadData(4, 0, 0x40)
+genIFRwDataCode(0, 0x80, False, 48)
+genIFRwDataCode(1, 0x80, False, 48)
+genIFRwDataCode(2, 0x80, False, 48)
+genIFRwDataCode(3, 0x80, False, 48)
+genIFRwDataCode(4, 0x80, False, 48)
+genTcEndFrameCode(gen_file_def)
)
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)
return gen_file_def
def tc11():
genPkt = GenPkt()
gen_file_def = "base_tc11"
sm_idx = 0
tc_des = "清除统计信息。"
#-------------------------------------------------------------------------
#>>>>>>设置顺序地址
genPkt.clean()
genPkt.setPktType(0)
data = [0, ] * 48
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
+genIFRwDataCode(0, 0x80, True, 48, data)
+genIFRwDataCode(1, 0x80, True, 48, data)
+genIFRwDataCode(2, 0x80, True, 48, data)
+genIFRwDataCode(3, 0x80, True, 48, data)
+genIFRwDataCode(4, 0x80, True, 48, data)
)
genPkt.addAfterExc(genMessageCode("--读取中断")
+genIFRwDataCode(0, 0x74, False, 4)
+genIFRwDataCode(1, 0x74, False, 4)
+genIFRwDataCode(2, 0x74, False, 4)
+genIFRwDataCode(3, 0x74, False, 4)
+genIFRwDataCode(4, 0x74, False, 4)
+genMessageCode("--清除中断")
+genIFRwDataCode(0, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(1, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(2, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(3, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(4, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genMessageCode("--读取中断")
+genIFRwDataCode(0, 0x74, False, 4)
+genIFRwDataCode(1, 0x74, False, 4)
+genIFRwDataCode(2, 0x74, False, 4)
+genIFRwDataCode(3, 0x74, False, 4)
+genIFRwDataCode(4, 0x74, False, 4)
+genIFRwDataCode(0, 0x80, False, 48)
+genIFRwDataCode(1, 0x80, False, 48)
+genIFRwDataCode(2, 0x80, False, 48)
+genIFRwDataCode(3, 0x80, False, 48)
+genIFRwDataCode(4, 0x80, False, 48)
+genTcEndFrameCode(gen_file_def)
)