寄存器自动化测试说明及时使用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
1.0 KiB

import os
from telnetlib import PRAGMA_HEARTBEAT, SE
import sys
from se import *
import se_system as ss
from ctypes import *
from deal import *
json_name="skyeye.json"
binary_params=("c5416_core_0","timer.out")
run_to_time=("c5416_core_0",10)
reg_data=[]
def func():
SE_define_conf(json_name)
SE_load_binary(*binary_params)
SE_init_ok()
SE_run()
dev_list=SE_get_simulation_device_info()
SE_run_to_time(*run_to_time)
read_params_list= deal_params(dev_list,SE_get_registers)
for i in read_params_list:
c=SE_read_dword(i[1],i[2])
reg_value=list((i[0],i[1],i[3],i[2]))
reg_value.append(c)
reg_value[3]=hex(eval(str(reg_value[3])))
reg_data.append(reg_value)
output_value_csv(reg_data)
reg_params_list=read_csv()
test_res=[]
try:
for i in reg_params_list:
test_res.append(SE_Test_regs_read_wirte(*i))
out_put_test_reslut(test_res)
except Exception as ep:
print("please add test data")
SE_Quit()
SE_Quit()
func()