|
| 1 | +################################################################ |
| 2 | +## Test ID: |
| 3 | +FOLDER_PATH = r"C:\GitHub\Python\DVF101" |
| 4 | +FOLDER_NAME = "Log" |
| 5 | +TEST_NAME = "DVF101_MIPS_test" |
| 6 | + |
| 7 | +################################################################# |
| 8 | + |
| 9 | +execfile(r"C:\GitHub\Python\init.py") |
| 10 | + |
| 11 | + |
| 12 | +######################## |
| 13 | +DMM = Agillent34401A(DMM_ADDRESS, RESOURCE_MANAGER) #init DMM |
| 14 | +dvf101 = Lauterbach("DVF101") #from test1.py |
| 15 | +address = '5301000' |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +cmm_path = r"G:\Chip_Validation\sasone\DVF101\MIPS\DVF101_PLL1_Configuration.cmm" #changing frequency and measure the current on VDD_1V1 |
| 20 | +dvf101.execute_cmm_file(cmm_path) |
| 21 | + |
| 22 | +configuration_list = ['b03c083', '903c083', |
| 23 | + '1200c083', '1100c083', |
| 24 | + '1000c083', 'f00c083', |
| 25 | + 'e00c083', 'd00c083', |
| 26 | + 'c00c083', 'b00c083', |
| 27 | + 'a00c083', '900c083', |
| 28 | + '800c083', '700c083', |
| 29 | + '600c083', '500c083', |
| 30 | + '400c083', '300c083', |
| 31 | + '200c083', '100c083', |
| 32 | + 'C083'] |
| 33 | + |
| 34 | + |
| 35 | +wb1, excel_full_path = create_excel_file(DIR_NAME, LOG_NAME_EXCEL) |
| 36 | +ws1 = wb1.create_sheet("DVF101") |
| 37 | +row_idx = 3 |
| 38 | + |
| 39 | +for config in configuration_list: |
| 40 | + dvf101.write_register(address, config) |
| 41 | + time.sleep(0.5) |
| 42 | + dmm_value = DMM.meas("DCV") |
| 43 | + ws1.cell(row=row_idx, column=3).value = dmm_value |
| 44 | + row_idx = row_idx+1 |
| 45 | + |
| 46 | +ws1.cell(row=2,column=3).value="DVF101_MIPS_test" |
| 47 | +wb1.save(excel_full_path) |
| 48 | + |
| 49 | +## Excel: |
| 50 | + |
| 51 | + |
| 52 | +# wb1, full_path = create_excel_file(DIR_NAME, LOG_NAME_EXCEL) |
| 53 | +# ws1 = wb1.create_sheet("new sheet is the new shit!") |
| 54 | +# ws1.cell(row=3,column=3).value="write something" |
| 55 | +# wb1.save(full_path) |
| 56 | +# wb = open_excel_file(full_path) |
| 57 | +# print wb.get_sheet_names() |
| 58 | + |
| 59 | + ## Lauterbach: |
| 60 | + |
| 61 | + # DVF101 = Lauterbach("DVF101") |
| 62 | + # DVF101.write_register("5300000", "5555") |
| 63 | + # DVF101.set_bits("5300000", "410", "40") |
| 64 | + # print DVF101.read_register("5300000") |
| 65 | + # DVF101.execute_cmm_file(br"T:\barkristal\DVF101\SPI\clkout.cmm") |
| 66 | + # DVF101.close() |
| 67 | + |
| 68 | +######################## |
| 69 | +## Excel: |
| 70 | + |
| 71 | +# wb1, full_path = create_excel_file(DIR_NAME, LOG_NAME_EXCEL) |
| 72 | +# ws1 = wb1.create_sheet("new sheet is the new shit!") |
| 73 | +# ws1.cell(row=1,column=1).value="write something" |
| 74 | +# wb1.save(full_path) |
| 75 | +# wb=open_excel_file(full_path) |
| 76 | +# print wb.get_sheet_names() |
0 commit comments