Dependencies: 1. Python 2.7 x64 bit. No special tool boxes or libraies are required. 2. implement as follows: ####################### Usage of the tool ################################## python eepromverification.py -h usage: eepromverification.py [-h] [-i INPUT_FILE] [-o OUTPUT_FILE] [-f CONFIGURATION_FILE] EEPROM verification Script optional arguments: -h, --help show this help message and exit -i INPUT_FILE input file name -o OUTPUT_FILE Output file name -f CONFIGURATION_FILE input configuration file for example: python eepromverification.py -i eeprom_dump.bin -f config_vicuna.json -o vicuna_result.json Where: eeprom_dump.bin is the eeprom file as read from the eeprom. The eeprom_dump.bin is the full 8K bytes read of the eeprom that we want to verify, please don't provide smaller sections otherwise the offsets in the configuration file will be incorrect. config_vicuna.json: Configuration file that tells the script what fields to parse and what's the criteria for Pass/Fail. More explanation on how to program the configuration file is below. vicuna_result.json: Output pass/Fail file generated by the program that the "control software" needs to parse. More information is below. ############################# Configuration file ############################## Configuration file is made of small json sections, each section controls the segment of the eeprom that we want to verify. The EEPROM segement is divided into 3 groups: Sensor ID, checksum verification and data verification. If we consider the below example: "verify_sensor_id": <----- This is a eeprom section which we want to verify, it's a user defined tag name { "verify":1, <---- Enable/disable verification of this eeprom section "is_sensor_id":1, <---- Is the eeprom section contains module serial ID? If yes, special processing is required. "is_checksum":0, <---- Is this eeprom section contains checksum? If yes, special processing is required. "start_address":34, <---- Start address of eeprom section "data_size":13, <---- Total size in bytes of eeprom section "byte_size":1, <---- Each value size in bytes "checksum_compute_start": 0, <---- If it's a checksum entity, specify checksum data starting address "checksum_compute_size": 0, <---- If it's a checksum entity, specify checksum size from starting address "checksum_compute_byte_size": 2, <---- If it's a checksum entity, specify while computing checksum, summation happened considering uint16 or uint8 data type "max_value":18, <---- If its not checksum or serial ID, each data will undergo a min/max value check. this is the min limit "min_value":18 <---- If its not checksum or serial ID, each data will undergo a min/max value check. this is the max limit } You can add as many json sections as possible, given the same format of key:value is maintained. If there are 20 different data types/section in eeprom, we can specify 20 of them in the configuration file with correct start and size configurations. ##################################################################################### ########################### Output data file ######################################## The output file will be similar to input as follows: "verify_sensor_id": <---- Same Tag name as provided in the configuration file. { "checksum_test_pass": "NA", <---- If NO checksum is enabled, this will be "Not Applicable" or "NA" "min_max_test_pass": 1, <---- For sensor_ID, year of manufacturing will be checked, just to see valid data and is it's not 0xFF "value": "567164124318000Y" <---- Parsed module ID number. }, "overallPass": 1, <---- Pass/Fail Criteria for all CHECKS. "verify_lsc_2800k": { "checksum_test_pass": "NA", "min_max_test_pass": 1, <---- For Data, this specifies if the data is within the min/max limits specified. "value": "NA" <---- Usually the data is big, so it's not prinited here... }, "verify_lsc_4150k_checksum": { "checksum_test_pass": 1, <---- For checksum result pass/ fail when the section is defined as is_checksum=1. "min_max_test_pass": "NA", <---- Min/Max test is disabled. "value": [ <----- Value[0]: Computed checksum value; Value[1]: Stored Checksum Actual value (both are same in this case.) 57, 57 ] }, #########################################################################################