增加代码,调试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

@@ -15,7 +15,7 @@ def tc1():
genPkt.setPktType(0)
#subPkt参数索引、索引类型、地址、命令、长度、数据
genPkt.addSubPkt(0x0, 0, random.randint(0, 65535), 0xc, 12, b'\0'*12)
genPkt.addSubPkt(0x0, 0, 0x0, 0xc, 12, b'\0'*12)
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
@@ -75,17 +75,20 @@ def tc2():
data[36] = 0x20#sync3偏移
data[37] = 0x00
genPkt.addSubPkt(random.randint(0, 2048), 0, 0x120, 0xe, 0x28, data)
genPkt.addSubPkt(0, 0, 0x120, 0xe, 0x28, data)
sm_idx = 0
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des))
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
)
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)
+genTcEndFrameCode(gen_file_def))
+"\n#1000000\n"
+genTcEndFrameCode(gen_file_def)
)
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def, ), 1)