增加sync下的测试用例
This commit is contained in:
@@ -69,11 +69,14 @@ def tc2():
|
||||
genPkt.clean()
|
||||
genPkt.setPktType(0)
|
||||
|
||||
genPkt.addBeforeExc(
|
||||
'''spi_trans( (16'h0100), (`SPI_READ), (8), (`IF_IDX(0)));\n'''
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+genEnableInsertTimeCode(0xa)
|
||||
+ '''spi_trans( (16'h0100), (`SPI_READ), (8), (`IF_IDX(0)));\n'''
|
||||
+ '''_temp_time = rxBuf[3] + (rxBuf[4] << 8) + (rxBuf[5] << 16) + (rxBuf[6] << 24) + (rxBuf[7] << 32) + (rxBuf[8] << 40) + (rxBuf[9] << 48) + (rxBuf[10] << 56);\n'''
|
||||
+ '''_temp_time = _temp_time + 32'h2000;\n\n''')
|
||||
|
||||
genPkt.addSubPkt(0x0, 0, 0x0, 0xc, 12, b'\0'*12)
|
||||
|
||||
#subPkt参数:索引、索引类型、地址、命令、长度、数据
|
||||
data = [0,] * 100 #bytearray(b"\0" * 100)
|
||||
data[0] = 0xff #地址0x120
|
||||
@@ -105,9 +108,6 @@ def tc2():
|
||||
|
||||
sm_idx = 0
|
||||
|
||||
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)
|
||||
@@ -158,10 +158,12 @@ def tc3():
|
||||
sm_idx = 3
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+genEnableInsertTimeCode(0xa, 1, 1)
|
||||
+ '''spi_trans( (16'h0100), (`SPI_READ), (8), (`IF_IDX(0)));\n'''
|
||||
+ '''_temp_time = rxBuf[3] + (rxBuf[4] << 8) + (rxBuf[5] << 16) + (rxBuf[6] << 24) + (rxBuf[7] << 32) + (rxBuf[8] << 40) + (rxBuf[9] << 48) + (rxBuf[10] << 56);\n'''
|
||||
+ '''_temp_time = _temp_time + 32'h3000;\n\n''')
|
||||
|
||||
genPkt.addSubPkt(0x0, 0, 0x0, 0xc, 12, b'\0'*12)
|
||||
#subPkt参数:索引、索引类型、地址、命令、长度、数据
|
||||
data = [0,] * 100 #bytearray(b"\0" * 100)
|
||||
data[0] = 0x0f #地址0x120
|
||||
@@ -279,10 +281,13 @@ def tc4():
|
||||
sm_idx = 3
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+genEnableInsertTimeCode(0xa, 1, 1)
|
||||
+ '''spi_trans( (16'h0100), (`SPI_READ), (8), (`IF_IDX(0)));\n'''
|
||||
+ '''_temp_time = rxBuf[3] + (rxBuf[4] << 8) + (rxBuf[5] << 16) + (rxBuf[6] << 24) + (rxBuf[7] << 32) + (rxBuf[8] << 40) + (rxBuf[9] << 48) + (rxBuf[10] << 56);\n'''
|
||||
+ '''_temp_time = _temp_time + 32'h3000;\n\n''')
|
||||
|
||||
genPkt.addSubPkt(0x0, 0, 0x0, 0xc, 12, b'\0'*12)
|
||||
|
||||
#subPkt参数:索引、索引类型、地址、命令、长度、数据
|
||||
data = [0,] * 100 #bytearray(b"\0" * 100)
|
||||
data[0] = 0x0f #地址0x120
|
||||
|
||||
Reference in New Issue
Block a user