寄存器自动化测试说明及时使用
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.

39 lines
1.0 KiB

  1. import os
  2. from telnetlib import PRAGMA_HEARTBEAT, SE
  3. import sys
  4. from se import *
  5. import se_system as ss
  6. from ctypes import *
  7. from deal import *
  8. json_name="skyeye.json"
  9. binary_params=("c5416_core_0","timer.out")
  10. run_to_time=("c5416_core_0",10)
  11. reg_data=[]
  12. def func():
  13. SE_define_conf(json_name)
  14. SE_load_binary(*binary_params)
  15. SE_init_ok()
  16. SE_run()
  17. dev_list=SE_get_simulation_device_info()
  18. SE_run_to_time(*run_to_time)
  19. read_params_list= deal_params(dev_list,SE_get_registers)
  20. for i in read_params_list:
  21. c=SE_read_dword(i[1],i[2])
  22. reg_value=list((i[0],i[1],i[3],i[2]))
  23. reg_value.append(c)
  24. reg_value[3]=hex(eval(str(reg_value[3])))
  25. reg_data.append(reg_value)
  26. output_value_csv(reg_data)
  27. reg_params_list=read_csv()
  28. test_res=[]
  29. try:
  30. for i in reg_params_list:
  31. test_res.append(SE_Test_regs_read_wirte(*i))
  32. out_put_test_reslut(test_res)
  33. except Exception as ep:
  34. print("please add test data")
  35. SE_Quit()
  36. SE_Quit()
  37. func()