Merge branch 'ebmmu' into eb_dev

This commit is contained in:
2025-06-17 19:43:38 +08:00
5 changed files with 325 additions and 43 deletions

View File

@@ -18,8 +18,8 @@
`define ENABLE_SYNC_TEST
`define ENABLE_SYNC_SIG0_TEST
`define ENABLE_SYNC_SIG1_TEST
`define ENABLE_RESET_TEST
//`define ENABLE_SYNC_SIG1_TEST
//`define ENABLE_RESET_TEST
module ShinTopSpiTb(
@@ -1295,7 +1295,19 @@ initial begin
end
`endif
begin:RESET_SYSTEM_TEST
_t_start = $realtime;
#1000
$fdisplay(spidata_file, "\n\n测试用例EBMMU测试");
`include "ebmmu_settings.vh"
`include "ebmmu_read.vh"
_t_end = $realtime;
$fdisplay(spidata_file, "该测试用例运行时间:%t\n", _t_end - _t_start);
end
#1000000

View File

@@ -725,7 +725,7 @@ if __name__ == '__main__':
data[19] = '''(_temp_time >> 24) & 8'hff'''
data[24] = 0x00 #地址0x138, sync周期 4B
data[25] = 0x04 #地址0x139
data[25] = 0x04 #地址0x139genPkt.addBeforeExc(
data[28] = 0x0 #sync1偏移
data[29] = 0x0
@@ -844,7 +844,113 @@ if __name__ == '__main__':
#-------------------------------------------------------------------------
#>>>>>>设置EB-MMU
genPkt.clean()
genPkt.setPktType(0)
#subPkt参数索引、索引类型、地址、命令、长度、数据
data = [0,] * 30
data[0] = 0x00
data[1] = 0x00
data[2] = 0x00
data[3] = 0x10
data[4] = 0x00
data[5] = 0x02
data[6] = 0x0a
data[7] = 0x00
data[8] = 0x03
data[9] = 0x01
genPkt.addSubPkt(0x1, 0, 0x0200, 0x1, 10, data)
data = [0,] * 30
data[0] = 0x0a
data[1] = 0x00
data[2] = 0x00
data[3] = 0x10
data[4] = 0x00
data[5] = 0x02
data[6] = 0x0a
data[7] = 0x00
data[8] = 0x03
data[9] = 0x01
genPkt.addSubPkt(0x2, 0, 0x0200, 0x1, 10, data)
data = [0,] * 30
data[0] = 0x14
data[1] = 0x00
data[2] = 0x00
data[3] = 0x10
data[4] = 0x00
data[5] = 0x02
data[6] = 0x0a
data[7] = 0x00
data[8] = 0x03
data[9] = 0x01
genPkt.addSubPkt(0x3, 0, 0x0200, 0x1, 10, data)
data = [0,] * 30
data[0] = 0x1e
data[1] = 0x00
data[2] = 0x00
data[3] = 0x10
data[4] = 0x00
data[5] = 0x02
data[6] = 0x0a
data[7] = 0x00
data[8] = 0x03
data[9] = 0x01
genPkt.addSubPkt(0x4, 0, 0x0200, 0x1, 10, data)
gen_file_def = "ebmmu_settings"
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)
#-------------------------------------------------------------------------
#>>>>>>设置EB-MMU
genPkt.clean()
genPkt.setPktType(0)
#subPkt参数索引、索引类型、地址、命令、长度、数据
data = [0,] * 40
genPkt.addSubPkt(0x1000, 2, 0x0000, 0x0, 40, data)
gen_file_def = "ebmmu_read"
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)