增加中断显示WD触发的测试代码
This commit is contained in:
@@ -50,9 +50,13 @@ def watchdog_test_sm_lvds_wr_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x404, True, 4, data0)
|
||||
+ genIFRwDataCode(1, 0x40C + (wd_id - 1) * 4, True, 4, data1)
|
||||
+ genIFRwDataCode(1, 0x078, True, 4, data2)
|
||||
@@ -131,9 +135,13 @@ def watchdog_test_sm_lvds_wr_no_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x404, True, 4, data0)
|
||||
+ genIFRwDataCode(1, 0x40C + (wd_id - 1) * 4, True, 4, data1)
|
||||
+ genIFRwDataCode(1, 0x078, True, 4, data2)
|
||||
@@ -210,6 +218,9 @@ def watchdog_test_sm_if_rd_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0x002000 ##看门狗的超时值
|
||||
data1 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(1, 0x404, True, 4, data0)
|
||||
@@ -219,6 +230,7 @@ def watchdog_test_sm_if_rd_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -294,6 +306,9 @@ def watchdog_test_sm_if_rd_no_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0x002000 ##看门狗的超时值
|
||||
data1 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(1, 0x404, True, 4, data0)
|
||||
@@ -303,6 +318,7 @@ def watchdog_test_sm_if_rd_no_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -382,6 +398,9 @@ def watchdog_test_sm_if_wr_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
@@ -393,6 +412,7 @@ def watchdog_test_sm_if_wr_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -462,6 +482,9 @@ def watchdog_test_sm_if_wr_no_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
@@ -473,6 +496,7 @@ def watchdog_test_sm_if_wr_no_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -541,6 +565,9 @@ def watchdog_test_sm_lvds_rd_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
@@ -551,6 +578,7 @@ def watchdog_test_sm_lvds_rd_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -619,6 +647,9 @@ def watchdog_test_sm_lvds_rd_no_timeout(tc_id, wd_id):
|
||||
|
||||
data = 0xffffffff ##清除中断
|
||||
data2 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
@@ -629,6 +660,7 @@ def watchdog_test_sm_lvds_rd_no_timeout(tc_id, wd_id):
|
||||
+ genIFRwDataCode(2, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(3, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(4, 0x078, True, 4, data2)
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x400, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x074, False, 0x04)
|
||||
+ genIFRwDataCode(1, 0x074, False, 0x04)
|
||||
@@ -684,9 +716,13 @@ def main_station_trans(tc_id, delay_time):
|
||||
#----------------------------------------------------------------------------------
|
||||
genPkt.clean()
|
||||
genPkt.setPktType(0)
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x070, True, 4, data3)
|
||||
)
|
||||
|
||||
data = [0, ] * 0x10
|
||||
@@ -718,6 +754,8 @@ def main_station_trans(tc_id, delay_time):
|
||||
+genIFRwDataCode(2, 0x74, False, 4)
|
||||
+genIFRwDataCode(3, 0x74, False, 4)
|
||||
+genIFRwDataCode(4, 0x74, False, 4)
|
||||
|
||||
|
||||
)
|
||||
|
||||
genPkt.gen("./generated/shin/%s.vh"%(gen_file_def,), 1)
|
||||
@@ -1029,9 +1067,13 @@ def slave_station_trans(tc_id, delay_time):
|
||||
#----------------------------------------------------------------------------------
|
||||
genPkt.clean()
|
||||
genPkt.setPktType(0)
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(1, 0x070, True, 4, data3)
|
||||
)
|
||||
|
||||
data = [0, ] * 0x10
|
||||
@@ -1264,7 +1306,7 @@ def tc36():
|
||||
def tc37():
|
||||
genPkt = GenPkt()
|
||||
|
||||
gen_file_def = "watchdog_tc36"
|
||||
gen_file_def = "watchdog_tc37"
|
||||
sm_idx = 0
|
||||
|
||||
tc_des = (f"使能从站的看门狗17,看通讯的超时Watchdog是否超时。\\n"
|
||||
@@ -1279,9 +1321,13 @@ def tc37():
|
||||
|
||||
data = 15000 ##看门狗的超时值
|
||||
data1 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
data = 0x80000010
|
||||
data3 = [data&0xff, (data>>8)&0xff, (data>>16)&0xff, (data>>24)&0xff]
|
||||
|
||||
genPkt.addBeforeExc(genTcStartFrameCode(gen_file_def, tc_des)
|
||||
+ genIFRwDataCode(0, 0x078, True, 4, [0xff, 0xff, 0xff, 0xff])
|
||||
+ genIFRwDataCode(0, 0x070, True, 4, data3)
|
||||
+ genIFRwDataCode(1, 0x404, True, 4, data0)
|
||||
+ genIFRwDataCode(1, 0x44c, True, 4, data1)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user