commit 271d262dbd64023595cdfb86da707a3144696b74 Author: lihansani Date: Mon Jul 13 17:47:24 2026 +0800 first commit diff --git a/coverage_summary.xlsx b/coverage_summary.xlsx new file mode 100644 index 0000000..adf4d02 Binary files /dev/null and b/coverage_summary.xlsx differ diff --git a/report2.txt b/report2.txt new file mode 100644 index 0000000..70f3488 --- /dev/null +++ b/report2.txt @@ -0,0 +1,624 @@ +Coverage Report Summary Data by file + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ADC_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 617 601 16 97.40 + Branches 288 284 4 98.61 + FEC Condition Terms 6 6 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 79.31 + States 15 15 0 100.00 + Transitions 29 17 12 58.62 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/BROADTIME_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 113 109 4 96.46 + Branches 44 42 2 95.45 + FEC Condition Terms 3 3 0 100.00 + FEC Expression Terms 6 6 0 100.00 + FSMs 83.33 + States 5 5 0 100.00 + Transitions 9 6 3 66.66 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/BUS_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 120 116 4 96.66 + Branches 56 54 2 96.42 + FEC Condition Terms 3 2 1 66.66 + FEC Expression Terms 6 6 0 100.00 + FSMs 80.00 + States 8 8 0 100.00 + Transitions 15 9 6 60.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/CMU_INJECTION_DATA_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 217 212 5 97.69 + Branches 132 129 3 97.72 + FEC Condition Terms 21 21 0 100.00 + FEC Expression Terms 2 2 0 100.00 + FSMs 83.33 + States 4 4 0 100.00 + Transitions 6 4 2 66.66 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/COUNTER_16BIT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 10 10 0 100.00 + Branches 6 6 0 100.00 + FEC Expression Terms 2 2 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/COUNTER_8BIT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 10 10 0 100.00 + Branches 6 6 0 100.00 + FEC Expression Terms 2 2 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/CRC16_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 23 23 0 100.00 + Branches 7 7 0 100.00 + FEC Condition Terms 2 2 0 100.00 + FEC Expression Terms 72 72 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/CTRL_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 121 115 6 95.04 + Branches 15 14 1 93.33 + FEC Expression Terms 8 8 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/DATA_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 238 232 6 97.47 + Branches 113 110 3 97.34 + FEC Condition Terms 12 6 6 50.00 + FEC Expression Terms 6 6 0 100.00 + FSMs 78.33 + States 15 15 0 100.00 + Transitions 30 17 13 56.66 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/DEC_BUS_CODE_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 346 346 0 100.00 + Branches 132 132 0 100.00 + FEC Condition Terms 7 7 0 100.00 + FEC Expression Terms 8 8 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/DIV_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 41 41 0 100.00 + Branches 18 18 0 100.00 + FEC Condition Terms 3 3 0 100.00 + FEC Expression Terms 6 6 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/DOWNLOAD_CTR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 144 140 4 97.22 + Branches 67 65 2 97.01 + FEC Condition Terms 8 7 1 87.50 + FEC Expression Terms 4 4 0 100.00 + FSMs 90.00 + States 5 5 0 100.00 + Transitions 10 8 2 80.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/DRIVER_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 301 287 14 95.34 + Branches 142 138 4 97.18 + FEC Condition Terms 2 2 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 81.25 + States 27 27 0 100.00 + Transitions 48 30 18 62.50 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/GEN_RS01TRIGGER_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 260 259 1 99.61 + Branches 101 100 1 99.00 + FEC Expression Terms 16 16 0 100.00 + FSMs 78.57 + States 8 8 0 100.00 + Transitions 14 8 6 57.14 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/GEN_TRIGGER_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 353 352 1 99.71 + Branches 161 160 1 99.37 + FEC Expression Terms 18 18 0 100.00 + FSMs 77.08 + States 13 13 0 100.00 + Transitions 24 13 11 54.16 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/HEALTH_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 71 71 0 100.00 + Branches 80 80 0 100.00 + FEC Condition Terms 14 14 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/HEAT_PAR_TREE2ONE_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 16 16 0 100.00 + Branches 12 12 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/HEAT_PAR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 121 120 1 99.17 + Branches 67 66 1 98.50 + FEC Condition Terms 2 2 0 100.00 + FSMs 75.00 + States 2 2 0 100.00 + Transitions 2 1 1 50.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/HEAT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 488 468 20 95.90 + Branches 202 198 4 98.01 + FEC Condition Terms 13 13 0 100.00 + FSMs 77.77 + States 17 17 0 100.00 + Transitions 36 20 16 55.55 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/IDENTIFY_OPERATION_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 248 240 8 96.77 + Branches 154 150 4 97.40 + FEC Condition Terms 2 2 0 100.00 + FEC Expression Terms 8 8 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/INIT_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 465 463 2 99.56 + Branches 217 216 1 99.53 + FEC Condition Terms 4 4 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 76.22 + States 70 70 0 100.00 + Transitions 143 75 68 52.44 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/INSTRUCTION_CHAIN_RD_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 157 154 3 98.08 + Branches 78 76 2 97.43 + FEC Condition Terms 13 13 0 100.00 + FSMs 81.81 + States 6 6 0 100.00 + Transitions 11 7 4 63.63 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/INSTRUCTION_CHAIN_WR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 173 167 6 96.53 + Branches 99 97 2 97.97 + FEC Condition Terms 6 6 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 84.48 + States 15 15 0 100.00 + Transitions 29 20 9 68.96 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/INSTRUCTION_SINGLE_FLASH_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 254 248 6 97.63 + Branches 144 141 3 97.91 + FEC Condition Terms 17 15 2 88.23 + FEC Expression Terms 4 4 0 100.00 + FSMs 79.48 + States 19 19 0 100.00 + Transitions 39 23 16 58.97 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ISO_CKSUM_DECODER.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 54 53 1 98.14 + Branches 29 28 1 96.55 + FEC Condition Terms 4 4 0 100.00 + FEC Expression Terms 2 2 0 100.00 + FSMs 78.12 + States 9 9 0 100.00 + Transitions 16 9 7 56.25 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ISO_CKSUM_DECODER_8BIT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 34 33 1 97.05 + Branches 20 19 1 95.00 + FEC Condition Terms 2 2 0 100.00 + FSMs 81.25 + States 5 5 0 100.00 + Transitions 8 5 3 62.50 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/LOAD_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 195 189 6 96.92 + Branches 118 116 2 98.30 + FEC Condition Terms 3 3 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 100.00 + States 14 14 0 100.00 + Transitions 16 16 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/MODE_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 169 166 3 98.22 + Branches 83 81 2 97.59 + FEC Condition Terms 4 4 0 100.00 + FEC Expression Terms 6 6 0 100.00 + FSMs 77.50 + States 11 11 0 100.00 + Transitions 20 11 9 55.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/NUC_SPI_FLASH_CTR_LW.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 212 208 4 98.11 + Branches 124 122 2 98.38 + FEC Condition Terms 2 1 1 50.00 + FEC Expression Terms 8 8 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ONEKEY_DB_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 553 551 2 99.63 + Branches 218 216 2 99.08 + FEC Condition Terms 18 18 0 100.00 + FSMs 67.60 + States 26 26 0 100.00 + Transitions 71 25 46 35.21 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ONEKEY_OFF_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 805 800 5 99.37 + Branches 362 360 2 99.44 + FEC Condition Terms 45 45 0 100.00 + FSMs 75.90 + States 42 42 0 100.00 + Transitions 83 43 40 51.80 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ONEKEY_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 39 39 0 100.00 + Branches 14 14 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/POSE_RS422_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 158 155 3 98.10 + Branches 112 110 2 98.21 + FEC Condition Terms 17 16 1 94.11 + FEC Expression Terms 2 2 0 100.00 + FSMs 89.13 + States 13 13 0 100.00 + Transitions 23 18 5 78.26 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/PROVE_MOTOR_CTR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 166 151 15 90.96 + Branches 97 84 13 86.59 + FEC Condition Terms 21 9 12 42.85 + FSMs 85.00 + States 6 6 0 100.00 + Transitions 10 7 3 70.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS01_CTR_TOP_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 16 16 0 100.00 + Branches 4 4 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS01_CTR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 406 395 11 97.29 + Branches 244 240 4 98.36 + FEC Condition Terms 36 35 1 97.22 + FEC Expression Terms 6 6 0 100.00 + FSMs 75.00 + States 19 19 0 100.00 + Transitions 54 27 27 50.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS422R_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 123 114 9 92.68 + Branches 91 89 2 97.80 + FEC Condition Terms 23 23 0 100.00 + FEC Expression Terms 7 6 1 85.71 + FSMs 87.50 + States 7 7 0 100.00 + Transitions 12 9 3 75.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS422T_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 71 66 5 92.95 + Branches 50 48 2 96.00 + FEC Condition Terms 12 12 0 100.00 + FEC Expression Terms 16 16 0 100.00 + FSMs 81.25 + States 5 5 0 100.00 + Transitions 8 5 3 62.50 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS422_CTR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 692 660 32 95.37 + Branches 299 294 5 98.32 + FEC Condition Terms 28 28 0 100.00 + FSMs 76.59 + States 16 16 0 100.00 + Transitions 47 25 22 53.19 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RS422_HIGH_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 367 359 8 97.82 + Branches 235 232 3 98.72 + FEC Condition Terms 18 18 0 100.00 + FEC Expression Terms 2 2 0 100.00 + FSMs 82.65 + States 25 25 0 100.00 + Transitions 49 32 17 65.30 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/RST_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 19 19 0 100.00 + Branches 9 9 0 100.00 + FEC Condition Terms 1 1 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/SELECT_CMD_SOURCE_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 173 153 20 88.43 + Branches 48 45 3 93.75 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/SPI_DRIVER_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 208 205 3 98.55 + Branches 110 108 2 98.18 + FEC Condition Terms 20 20 0 100.00 + FEC Expression Terms 23 23 0 100.00 + FSMs 82.35 + States 8 8 0 100.00 + Transitions 17 11 6 64.70 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/SPI_SET_RST_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 88 80 8 90.90 + Branches 43 41 2 95.34 + FEC Expression Terms 4 4 0 100.00 + FSMs 100.00 + States 4 4 0 100.00 + Transitions 6 6 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/SRNSOR_GUARD_PROCESSOR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 34 34 0 100.00 + Branches 19 19 0 100.00 + FEC Condition Terms 2 2 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/STEP_DB_MOT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 83 82 1 98.79 + Branches 52 51 1 98.07 + FEC Condition Terms 9 9 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/STEP_MOT_FH_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 66 65 1 98.48 + Branches 41 40 1 97.56 + FEC Condition Terms 3 3 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/STEP_MOT_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 66 65 1 98.48 + Branches 42 41 1 97.61 + FEC Condition Terms 4 4 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/TELEMETRY_1553B_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 139 135 4 97.12 + Branches 62 60 2 96.77 + FEC Condition Terms 1 1 0 100.00 + FEC Expression Terms 4 4 0 100.00 + FSMs 81.81 + States 6 6 0 100.00 + Transitions 11 7 4 63.63 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/TEL_CTR_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 249 244 5 97.99 + Branches 121 119 2 98.34 + FEC Condition Terms 20 18 2 90.00 + FEC Expression Terms 2 2 0 100.00 + FSMs 73.91 + States 16 16 0 100.00 + Transitions 46 22 24 47.82 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/TEL_REG_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 199 199 0 100.00 + Branches 104 104 0 100.00 + FEC Condition Terms 1 1 0 100.00 + FEC Expression Terms 2 2 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/TLC2543_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 102 99 3 97.05 + Branches 28 27 1 96.42 + FEC Condition Terms 3 3 0 100.00 + FSMs 83.33 + States 5 5 0 100.00 + Transitions 9 6 3 66.66 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ZHKZQ_TOP_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 14 14 0 100.00 + Branches 4 4 0 100.00 + FEC Expression Terms 21 21 0 100.00 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/ZT_RS422_VMODEL.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 102 97 5 95.09 + Branches 66 64 2 96.96 + FEC Condition Terms 3 3 0 100.00 + FSMs 83.33 + States 5 5 0 100.00 + Transitions 9 6 3 66.66 + +================================================================================= +=== File: D:/0_2025/F2553_SJWS_zhangwh_20250818/05_simulation/01_v01r00m00/copy_sim_xxx/02_case/01_func/func002/../../../01_source/01_func/signed_multiplier.v +================================================================================= + Enabled Coverage Active Hits Misses % Covered + ---------------- ------ ---- ------ --------- + Stmts 39 39 0 100.00 + Branches 4 4 0 100.00 + + +Total Coverage By File (code coverage only, filtered view): 93.52% + diff --git a/test.py b/test.py new file mode 100644 index 0000000..e4d83cb --- /dev/null +++ b/test.py @@ -0,0 +1,73 @@ +import re +import openpyxl +from pathlib import Path + +def md_to_xlsx(md_path, xlsx_path): + text = Path(md_path).read_text(encoding="utf-8") + + # 分模块 + modules = re.split(r"=+\s*\n(.+?)\n=+", text, flags=re.S) + + # Excel + wb = openpyxl.Workbook() + ws = wb.active + ws.title = "Coverage Summary" + + # 表头 + headers = [ + "Module", + "Stmts", "Stmts Covered", + "Branches", "Branches Covered", + "FEC Condition Terms", "FEC Condition Terms Covered", + "FEC Expression Terms", "FEC Expression Terms Covered", + "States", "States Covered" + ] + ws.append(headers) + + metrics = [ + "Stmts", + "Branches", + "FEC Condition Terms", + "FEC Expression Terms", + "States" + ] + + # 提取数量与覆盖率 + def extract_from_line(line): + ints = re.findall(r"(\d+)", line) + floats = re.findall(r"(\d+\.\d+)", line) + count = ints[0] if ints else "/" + covered = (floats[-1] + "%") if floats else "/" + return count, covered + + # 解析每个模块内容 + for i in range(1, len(modules), 2): + module = modules[i].strip() + content = modules[i+1] + + row = [module] + + for metric in metrics: + m = re.search(rf"^\s*{re.escape(metric)}\b.*$", content, flags=re.M) + if m: + cnt, cov = extract_from_line(m.group(0)) + else: + cnt, cov = "/", "/" + row.extend([cnt, cov]) + + ws.append(row) + + # 自动列宽 + for col in ws.columns: + max_len = max(len(str(cell.value or "")) for cell in col) + ws.column_dimensions[col[0].column_letter].width = max(10, min(50, max_len + 2)) + + wb.save(xlsx_path) + print(f"完成转换: {xlsx_path}") + + +# 示例调用 +md_to_xlsx( + "Coverage Report Summary Data by file.md", + "coverage_summary.xlsx" +) diff --git a/使用说明.md b/使用说明.md new file mode 100644 index 0000000..242594c --- /dev/null +++ b/使用说明.md @@ -0,0 +1,3 @@ +将覆盖率txt文件放入此目录(对txt文件名没有要求),双击 覆盖率转换工具.exe +脚本将生成xlsx表格 +!!!注意,此脚本只会读取目录下的第一个txt文件 !!! \ No newline at end of file diff --git a/打包命令.txt b/打包命令.txt new file mode 100644 index 0000000..386f027 --- /dev/null +++ b/打包命令.txt @@ -0,0 +1 @@ +pyinstaller -F --console 覆盖率转换工具.py \ No newline at end of file diff --git a/覆盖率转换工具.py b/覆盖率转换工具.py new file mode 100644 index 0000000..734379e --- /dev/null +++ b/覆盖率转换工具.py @@ -0,0 +1,118 @@ +import re +import openpyxl +from pathlib import Path +import time +import sys +import os + +def txt_to_xlsx(): + try: + print("正在启动覆盖率转换工具...") + print("正在搜索目录中的txt文件...") + + # 获取当前工作目录(兼容打包前后) + if getattr(sys, 'frozen', False): + # 如果是打包后的exe运行 + current_dir = Path(os.path.dirname(sys.executable)) + else: + # 如果是直接运行Python脚本 + current_dir = Path(__file__).parent + + print(f"当前工作目录: {current_dir}") + + # 查找当前目录下的所有txt文件 + txt_files = list(current_dir.glob("*.txt")) + + # 检查是否存在txt文件 + if not txt_files: + print("没有文件,请将txt文件放入当前目录后重试") + return + + print(f"找到 {len(txt_files)} 个txt文件,正在处理第一个文件: {txt_files[0].name}") + + # 使用找到的第一个txt文件 + txt_path = txt_files[0] + xlsx_path = current_dir / "coverage_summary.xlsx" + + text = txt_path.read_text(encoding="utf-8") + + # 创建Excel工作簿 + wb = openpyxl.Workbook() + ws = wb.active + ws.title = "Coverage Summary" + + # 表头 - 只包含指标名称和覆盖率 + headers = [ + "File", + "Stmts", "Stmts % Covered", + "Branches", "Branches % Covered", + "FEC Condition Terms", "FEC Condition Terms % Covered", + "FEC Expression Terms", "FEC Expression Terms % Covered", + "FSM States", "FSM States % Covered", + "FSM Transitions", "FSM Transitions % Covered" + ] + ws.append(headers) + + # 按文件分割内容 + files = re.split(r"={80}\n=== File: (.+?)\n={80}", text) + + # 解析每个文件内容 + for i in range(1, len(files), 2): + file_path = files[i].strip() + content = files[i+1] + + # 提取文件名(去掉路径) + file_name = Path(file_path).name + + # 初始化行数据 + row = [file_name] + + # 定义要提取的指标 + metrics = [ + "Stmts", + "Branches", + "FEC Condition Terms", + "FEC Expression Terms", + "States", # FSM States + "Transitions" # FSM Transitions + ] + + # 为每个指标提取数据 + for metric in metrics: + # 构建正则表达式模式 + pattern = rf"^\s*{re.escape(metric)}\b\s+(\d+)\s+\d+\s+\d+\s+([\d\.]+)%?$" + + # 查找匹配项 + match = re.search(pattern, content, flags=re.M) + + if match: + count, percent = match.groups() + row.extend([count, f"{percent}%"]) + else: + # 如果没有找到特定指标,统一填入 "/" + row.extend(["/", "/"]) + + ws.append(row) + + # 自动调整列宽 + for col in ws.columns: + max_len = max(len(str(cell.value or "")) for cell in col) + ws.column_dimensions[col[0].column_letter].width = max(10, min(50, max_len + 2)) + + # 保存Excel文件 + wb.save(xlsx_path) + print(f"完成转换: {xlsx_path}") + + except Exception as e: + print(f"发生错误: {e}") + import traceback + traceback.print_exc() + finally: + # 等待10秒防止窗口闪退 + print("程序将在10秒后退出...") + time.sleep(10) + + +# 直接调用函数,无需传入参数 +if __name__ == "__main__": + txt_to_xlsx() \ No newline at end of file