diff --git a/comm/functions.py b/comm/functions.py new file mode 100644 index 0000000..9d32e6d --- /dev/null +++ b/comm/functions.py @@ -0,0 +1,31 @@ +#coding=utf8 +#*************************************************************************************** +# This project is licensed under Mulan PSL v2. +# You can use this software according to the terms and conditions of the Mulan PSL v2. +# You may obtain a copy of Mulan PSL v2 at: +# http://license.coscl.org.cn/MulanPSL2 +# +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# +# See the Mulan PSL v2 for more details. +#**************************************************************************************/ + +def merge_dict(dict1, dict2): + """ + Merge two dictionaries + """ + if not dict1: + return dict2 + if not dict2: + return dict1 + for key in dict2: + if key in dict1: + if isinstance(dict1[key], dict) and isinstance(dict2[key], dict): + merge_dict(dict1[key], dict2[key]) + else: + dict1[key] = dict2[key] + else: + dict1[key] = dict2[key] + return dict1 diff --git a/docs/data/ut_data_progress.json b/docs/data/ut_data_progress.json index 82c8c0b..74d9b06 100644 --- a/docs/data/ut_data_progress.json +++ b/docs/data/ut_data_progress.json @@ -1,1744 +1,1955 @@ { - "nodes": [ - { - "id": "0", - "name": "Myriel", - "symbolSize": 19.12381, - "x": -266.82776, - "y": 299.6904, - "value": 28.685715, - "category": 0 - }, - { - "id": "1", - "name": "Napoleon", - "symbolSize": 2.6666666666666665, - "x": -418.08344, - "y": 446.8853, - "value": 4, - "category": 0 - }, - { - "id": "2", - "name": "MlleBaptistine", - "symbolSize": 6.323809333333333, - "x": -212.76357, - "y": 245.29176, - "value": 9.485714, - "category": 1 - }, - { - "id": "3", - "name": "MmeMagloire", - "symbolSize": 6.323809333333333, - "x": -242.82404, - "y": 235.26283, - "value": 9.485714, - "category": 1 - }, - { - "id": "4", - "name": "CountessDeLo", - "symbolSize": 2.6666666666666665, - "x": -379.30386, - "y": 429.06424, - "value": 4, - "category": 0 - }, - { - "id": "5", - "name": "Geborand", - "symbolSize": 2.6666666666666665, - "x": -417.26337, - "y": 406.03506, - "value": 4, - "category": 0 - }, - { - "id": "6", - "name": "Champtercier", - "symbolSize": 2.6666666666666665, - "x": -332.6012, - "y": 485.16974, - "value": 4, - "category": 0 - }, - { - "id": "7", - "name": "Cravatte", - "symbolSize": 2.6666666666666665, - "x": -382.69568, - "y": 475.09113, - "value": 4, - "category": 0 - }, - { - "id": "8", - "name": "Count", - "symbolSize": 2.6666666666666665, - "x": -320.384, - "y": 387.17325, - "value": 4, - "category": 0 - }, - { - "id": "9", - "name": "OldMan", - "symbolSize": 2.6666666666666665, - "x": -344.39832, - "y": 451.16772, - "value": 4, - "category": 0 - }, - { - "id": "10", - "name": "Labarre", - "symbolSize": 2.6666666666666665, - "x": -89.34107, - "y": 234.56128, - "value": 4, - "category": 1 - }, - { - "id": "11", - "name": "Valjean", - "symbolSize": 66.66666666666667, - "x": -87.93029, - "y": -6.8120565, - "value": 100, - "category": 1 - }, - { - "id": "12", - "name": "Marguerite", - "symbolSize": 4.495239333333333, - "x": -339.77908, - "y": -184.69139, - "value": 6.742859, - "category": 1 - }, - { - "id": "13", - "name": "MmeDeR", - "symbolSize": 2.6666666666666665, - "x": -194.31313, - "y": 178.55301, - "value": 4, - "category": 1 - }, - { - "id": "14", - "name": "Isabeau", - "symbolSize": 2.6666666666666665, - "x": -158.05168, - "y": 201.99768, - "value": 4, - "category": 1 - }, - { - "id": "15", - "name": "Gervais", - "symbolSize": 2.6666666666666665, - "x": -127.701546, - "y": 242.55057, - "value": 4, - "category": 1 - }, - { - "id": "16", - "name": "Tholomyes", - "symbolSize": 17.295237333333333, - "x": -385.2226, - "y": -393.5572, - "value": 25.942856, - "category": 2 - }, - { - "id": "17", - "name": "Listolier", - "symbolSize": 13.638097333333334, - "x": -516.55884, - "y": -393.98975, - "value": 20.457146, - "category": 2 - }, - { - "id": "18", - "name": "Fameuil", - "symbolSize": 13.638097333333334, - "x": -464.79382, - "y": -493.57944, - "value": 20.457146, - "category": 2 - }, - { - "id": "19", - "name": "Blacheville", - "symbolSize": 13.638097333333334, - "x": -515.1624, - "y": -456.9891, - "value": 20.457146, - "category": 2 - }, - { - "id": "20", - "name": "Favourite", - "symbolSize": 13.638097333333334, - "x": -408.12122, - "y": -464.5048, - "value": 20.457146, - "category": 2 - }, - { - "id": "21", - "name": "Dahlia", - "symbolSize": 13.638097333333334, - "x": -456.44113, - "y": -425.13303, - "value": 20.457146, - "category": 2 - }, - { - "id": "22", - "name": "Zephine", - "symbolSize": 13.638097333333334, - "x": -459.1107, - "y": -362.5133, - "value": 20.457146, - "category": 2 - }, - { - "id": "23", - "name": "Fantine", - "symbolSize": 28.266666666666666, - "x": -313.42786, - "y": -289.44803, - "value": 42.4, - "category": 2 - }, - { - "id": "24", - "name": "MmeThenardier", - "symbolSize": 20.95238266666667, - "x": 4.6313396, - "y": -273.8517, - "value": 31.428574, - "category": 7 - }, - { - "id": "25", - "name": "Thenardier", - "symbolSize": 30.095235333333335, - "x": 82.80825, - "y": -203.1144, - "value": 45.142853, - "category": 7 - }, - { - "id": "26", - "name": "Cosette", - "symbolSize": 20.95238266666667, - "x": 78.64646, - "y": -31.512747, - "value": 31.428574, - "category": 6 - }, - { - "id": "27", - "name": "Javert", - "symbolSize": 31.923806666666668, - "x": -81.46074, - "y": -204.20204, - "value": 47.88571, - "category": 7 - }, - { - "id": "28", - "name": "Fauchelevent", - "symbolSize": 8.152382000000001, - "x": -225.73984, - "y": 82.41631, - "value": 12.228573, - "category": 4 - }, - { - "id": "29", - "name": "Bamatabois", - "symbolSize": 15.466666666666667, - "x": -385.6842, - "y": -20.206686, - "value": 23.2, - "category": 3 - }, - { - "id": "30", - "name": "Perpetue", - "symbolSize": 4.495239333333333, - "x": -403.92447, - "y": -197.69823, - "value": 6.742859, - "category": 2 - }, - { - "id": "31", - "name": "Simplice", - "symbolSize": 8.152382000000001, - "x": -281.4253, - "y": -158.45137, - "value": 12.228573, - "category": 2 - }, - { - "id": "32", - "name": "Scaufflaire", - "symbolSize": 2.6666666666666665, - "x": -122.41348, - "y": 210.37503, - "value": 4, - "category": 1 - }, - { - "id": "33", - "name": "Woman1", - "symbolSize": 4.495239333333333, - "x": -234.6001, - "y": -113.15067, - "value": 6.742859, - "category": 1 - }, - { - "id": "34", - "name": "Judge", - "symbolSize": 11.809524666666666, - "x": -387.84915, - "y": 58.7059, - "value": 17.714287, - "category": 3 - }, - { - "id": "35", - "name": "Champmathieu", - "symbolSize": 11.809524666666666, - "x": -338.2307, - "y": 87.48405, - "value": 17.714287, - "category": 3 - }, - { - "id": "36", - "name": "Brevet", - "symbolSize": 11.809524666666666, - "x": -453.26874, - "y": 58.94648, - "value": 17.714287, - "category": 3 - }, - { - "id": "37", - "name": "Chenildieu", - "symbolSize": 11.809524666666666, - "x": -386.44904, - "y": 140.05937, - "value": 17.714287, - "category": 3 - }, - { - "id": "38", - "name": "Cochepaille", - "symbolSize": 11.809524666666666, - "x": -446.7876, - "y": 123.38005, - "value": 17.714287, - "category": 3 - }, - { - "id": "39", - "name": "Pontmercy", - "symbolSize": 6.323809333333333, - "x": 336.49738, - "y": -269.55914, - "value": 9.485714, - "category": 6 - }, - { - "id": "40", - "name": "Boulatruelle", - "symbolSize": 2.6666666666666665, - "x": 29.187843, - "y": -460.13132, - "value": 4, - "category": 7 - }, - { - "id": "41", - "name": "Eponine", - "symbolSize": 20.95238266666667, - "x": 238.36697, - "y": -210.00926, - "value": 31.428574, - "category": 7 - }, - { - "id": "42", - "name": "Anzelma", - "symbolSize": 6.323809333333333, - "x": 189.69513, - "y": -346.50662, - "value": 9.485714, - "category": 7 - }, - { - "id": "43", - "name": "Woman2", - "symbolSize": 6.323809333333333, - "x": -187.00418, - "y": -145.02663, - "value": 9.485714, - "category": 6 - }, - { - "id": "44", - "name": "MotherInnocent", - "symbolSize": 4.495239333333333, - "x": -252.99521, - "y": 129.87549, - "value": 6.742859, - "category": 4 - }, - { - "id": "45", - "name": "Gribier", - "symbolSize": 2.6666666666666665, - "x": -296.07935, - "y": 163.11964, - "value": 4, - "category": 4 - }, - { - "id": "46", - "name": "Jondrette", - "symbolSize": 2.6666666666666665, - "x": 550.3201, - "y": 522.4031, - "value": 4, - "category": 5 - }, - { - "id": "47", - "name": "MmeBurgon", - "symbolSize": 4.495239333333333, - "x": 488.13535, - "y": 356.8573, - "value": 6.742859, - "category": 5 - }, - { - "id": "48", - "name": "Gavroche", - "symbolSize": 41.06667066666667, - "x": 387.89572, - "y": 110.462326, - "value": 61.600006, - "category": 8 - }, - { - "id": "49", - "name": "Gillenormand", - "symbolSize": 13.638097333333334, - "x": 126.4831, - "y": 68.10622, - "value": 20.457146, - "category": 6 - }, - { - "id": "50", - "name": "Magnon", - "symbolSize": 4.495239333333333, - "x": 127.07365, - "y": -113.05923, - "value": 6.742859, - "category": 6 - }, - { - "id": "51", - "name": "MlleGillenormand", - "symbolSize": 13.638097333333334, - "x": 162.63559, - "y": 117.6565, - "value": 20.457146, - "category": 6 - }, - { - "id": "52", - "name": "MmePontmercy", - "symbolSize": 4.495239333333333, - "x": 353.66415, - "y": -205.89165, - "value": 6.742859, - "category": 6 - }, - { - "id": "53", - "name": "MlleVaubois", - "symbolSize": 2.6666666666666665, - "x": 165.43939, - "y": 339.7736, - "value": 4, - "category": 6 - }, - { - "id": "54", - "name": "LtGillenormand", - "symbolSize": 8.152382000000001, - "x": 137.69348, - "y": 196.1069, - "value": 12.228573, - "category": 6 - }, - { - "id": "55", - "name": "Marius", - "symbolSize": 35.58095333333333, - "x": 206.44687, - "y": -13.805411, - "value": 53.37143, - "category": 6 - }, - { - "id": "56", - "name": "BaronessT", - "symbolSize": 4.495239333333333, - "x": 194.82993, - "y": 224.78036, - "value": 6.742859, - "category": 6 - }, - { - "id": "57", - "name": "Mabeuf", - "symbolSize": 20.95238266666667, - "x": 597.6618, - "y": 135.18481, - "value": 31.428574, - "category": 8 - }, - { - "id": "58", - "name": "Enjolras", - "symbolSize": 28.266666666666666, - "x": 355.78366, - "y": -74.882454, - "value": 42.4, - "category": 8 - }, - { - "id": "59", - "name": "Combeferre", - "symbolSize": 20.95238266666667, - "x": 515.2961, - "y": -46.167564, - "value": 31.428574, - "category": 8 - }, - { - "id": "60", - "name": "Prouvaire", - "symbolSize": 17.295237333333333, - "x": 614.29285, - "y": -69.3104, - "value": 25.942856, - "category": 8 - }, - { - "id": "61", - "name": "Feuilly", - "symbolSize": 20.95238266666667, - "x": 550.1917, - "y": -128.17537, - "value": 31.428574, - "category": 8 - }, - { - "id": "62", - "name": "Courfeyrac", - "symbolSize": 24.609526666666667, - "x": 436.17184, - "y": -12.7286825, - "value": 36.91429, - "category": 8 - }, - { - "id": "63", - "name": "Bahorel", - "symbolSize": 22.780953333333333, - "x": 602.55225, - "y": 16.421427, - "value": 34.17143, - "category": 8 - }, - { - "id": "64", - "name": "Bossuet", - "symbolSize": 24.609526666666667, - "x": 455.81955, - "y": -115.45826, - "value": 36.91429, - "category": 8 - }, - { - "id": "65", - "name": "Joly", - "symbolSize": 22.780953333333333, - "x": 516.40784, - "y": 47.242233, - "value": 34.17143, - "category": 8 - }, - { - "id": "66", - "name": "Grantaire", - "symbolSize": 19.12381, - "x": 646.4313, - "y": -151.06331, - "value": 28.685715, - "category": 8 - }, - { - "id": "67", - "name": "MotherPlutarch", - "symbolSize": 2.6666666666666665, - "x": 668.9568, - "y": 204.65488, - "value": 4, - "category": 8 - }, - { - "id": "68", - "name": "Gueulemer", - "symbolSize": 19.12381, - "x": 78.4799, - "y": -347.15146, - "value": 28.685715, - "category": 7 - }, - { - "id": "69", - "name": "Babet", - "symbolSize": 19.12381, - "x": 150.35959, - "y": -298.50797, - "value": 28.685715, - "category": 7 - }, - { - "id": "70", - "name": "Claquesous", - "symbolSize": 19.12381, - "x": 137.3717, - "y": -410.2809, - "value": 28.685715, - "category": 7 - }, - { - "id": "71", - "name": "Montparnasse", - "symbolSize": 17.295237333333333, - "x": 234.87747, - "y": -400.85983, - "value": 25.942856, - "category": 7 - }, - { - "id": "72", - "name": "Toussaint", - "symbolSize": 6.323809333333333, - "x": 40.942253, - "y": 113.78272, - "value": 9.485714, - "category": 1 - }, - { - "id": "73", - "name": "Child1", - "symbolSize": 4.495239333333333, - "x": 437.939, - "y": 291.58234, - "value": 6.742859, - "category": 8 - }, - { - "id": "74", - "name": "Child2", - "symbolSize": 4.495239333333333, - "x": 466.04922, - "y": 283.3606, - "value": 6.742859, - "category": 8 - }, - { - "id": "75", - "name": "Brujon", - "symbolSize": 13.638097333333334, - "x": 238.79364, - "y": -314.06345, - "value": 20.457146, - "category": 7 - }, - { - "id": "76", - "name": "MmeHucheloup", - "symbolSize": 13.638097333333334, - "x": 712.18353, - "y": 4.8131495, - "value": 20.457146, - "category": 8 - } + "name": "kmh_dut", + "children": [ + { + "name": "frontend", + "children": [ + { + "name": "bpu", + "children": [ + { + "name": "ftb", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu/ftb", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "uftb", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu/uftb", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "ittage", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu/ittage", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "tagesc", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu/tagesc", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "ras", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu/ras", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/bpu", + "value": 6, + "light": false + }, + "value": 6 + }, + { + "priority": 0, + "name": "ftq", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/ftq", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "ibuffer", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/ibuffer", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "icache", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/icache", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "ifu", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/ifu", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "instr_uncache", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/instr_uncache", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "itlb", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/itlb", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "pmp", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend/pmp", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/frontend", + "value": 14, + "light": false + }, + "value": 14 + }, + { + "name": "backend", + "children": [ + { + "name": "ctrl_block", + "children": [ + { + "name": "decode", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/decode", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "rename", + "children": [ + { + "name": "rename_table", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename/rename_table", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "freelist", + "children": [ + { + "name": "int", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename/freelist/int", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename/freelist/float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "vtype", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename/freelist/vtype", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename/freelist", + "value": 4, + "light": false + }, + "value": 4 + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rename", + "value": 6, + "light": false + }, + "value": 6 + }, + { + "name": "dispatch", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "dispatch_queue", + "children": [ + { + "name": "int", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch_queue/int", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch_queue/float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "mem", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch_queue/mem", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "vector_float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch_queue/vector_float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/dispatch_queue", + "value": 5, + "light": false + }, + "value": 5 + }, + { + "name": "mem_ctrl", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/mem_ctrl", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "redirect_gen", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/redirect_gen", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 0, + "name": "rob", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/rob", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "pc_gpa_mem", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block/pc_gpa_mem", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/ctrl_block", + "value": 18, + "light": false + }, + "value": 18 + }, + { + "priority": 1, + "name": "data_path", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/data_path", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "scheduler", + "children": [ + { + "name": "int", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/scheduler/int", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/scheduler/float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "mem", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/scheduler/mem", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "vector_float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/scheduler/vector_float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/scheduler", + "value": 5, + "light": false + }, + "value": 5 + }, + { + "name": "exu_block", + "children": [ + { + "name": "float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block/float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "int", + "children": [ + { + "priority": 0, + "name": "csr", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block/int/csr", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "other", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block/int/other", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block/int", + "value": 3, + "light": false + }, + "value": 3 + }, + { + "priority": 0, + "name": "vector_float", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block/vector_float", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/exu_block", + "value": 6, + "light": false + }, + "value": 6 + }, + { + "priority": 0, + "name": "og2_for_vector", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/og2_for_vector", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "pc_target_mem", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/pc_target_mem", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "wb_data_path", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/wb_data_path", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "wb_fu_busy_table", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/wb_fu_busy_table", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "bypass_network", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend/bypass_network", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/backend", + "value": 36, + "light": false + }, + "value": 36 + }, + { + "name": "mem_block", + "children": [ + { + "name": "lsq", + "children": [ + { + "priority": 0, + "name": "load_queue", + "children": [ + { + "name": "virtual_load_queue", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/load_queue/virtual_load_queue", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "raw_rar_queue", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/load_queue/raw_rar_queue", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "uncache_queue", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/load_queue/uncache_queue", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "exception_queue", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/load_queue/exception_queue", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/load_queue", + "value": 5, + "light": false + }, + "value": 5 + }, + { + "name": "store_queue", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq/store_queue", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/lsq", + "value": 7, + "light": false + }, + "value": 7 + }, + { + "priority": 0, + "name": "dtlb", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/dtlb", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 0, + "name": "load_store_unit", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/load_store_unit", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 0, + "name": "dcache", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/dcache", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "pmp", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/pmp", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "prefetcher", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/prefetcher", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "v_mem", + "priority": 0, + "children": [ + { + "name": "vl_split", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/v_mem/vl_split", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "v_segment_unit", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/v_mem/v_segment_unit", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "vl_merger_buffer", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/v_mem/vl_merger_buffer", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "vs_merge_buffer", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/v_mem/vs_merge_buffer", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/v_mem", + "value": 5, + "light": false + }, + "value": 5 + }, + { + "name": "ptw", + "meta": { + "cases": { + "total": 10, + "pass": 6, + "fail": 2, + "skip": 2 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/ptw", + "value": 1, + "light": true + }, + "value": 1, + "itemStyle": { + "colorAlpha": 1.0 + } + }, + { + "name": "uncache", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/uncache", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "name": "sbuffer", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block/sbuffer", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + } + ], + "meta": { + "cases": { + "total": 10, + "pass": 6, + "fail": 2, + "skip": 2 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/mem_block", + "value": 21, + "light": false + }, + "value": 21 + }, + { + "name": "misc", + "children": [ + { + "priority": 0, + "name": "l2_cache", + "meta": { + "cases": { + "total": 0, + "pass": 0, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/misc/l2_cache", + "value": 1, + "light": false + }, + "value": 1, + "itemStyle": { + "colorAlpha": 0.1 + } + }, + { + "priority": 1, + "name": "mmio", + "meta": { + "cases": { + "total": 10, + "pass": 12, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/misc/mmio", + "value": 1, + "light": true + }, + "value": 1, + "itemStyle": { + "colorAlpha": 1.0 + } + } + ], + "meta": { + "cases": { + "total": 10, + "pass": 12, + "fail": 0, + "skip": 0 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut/misc", + "value": 3, + "light": false + }, + "value": 3 + } ], - "links": [ - { - "source": "1", - "target": "0" - }, - { - "source": "2", - "target": "0" - }, - { - "source": "3", - "target": "0" - }, - { - "source": "3", - "target": "2" - }, - { - "source": "4", - "target": "0" - }, - { - "source": "5", - "target": "0" - }, - { - "source": "6", - "target": "0" - }, - { - "source": "7", - "target": "0" - }, - { - "source": "8", - "target": "0" - }, - { - "source": "9", - "target": "0" - }, - { - "source": "11", - "target": "0" - }, - { - "source": "11", - "target": "2" - }, - { - "source": "11", - "target": "3" - }, - { - "source": "11", - "target": "10" - }, - { - "source": "12", - "target": "11" - }, - { - "source": "13", - "target": "11" - }, - { - "source": "14", - "target": "11" - }, - { - "source": "15", - "target": "11" - }, - { - "source": "17", - "target": "16" - }, - { - "source": "18", - "target": "16" - }, - { - "source": "18", - "target": "17" - }, - { - "source": "19", - "target": "16" - }, - { - "source": "19", - "target": "17" - }, - { - "source": "19", - "target": "18" - }, - { - "source": "20", - "target": "16" - }, - { - "source": "20", - "target": "17" - }, - { - "source": "20", - "target": "18" - }, - { - "source": "20", - "target": "19" - }, - { - "source": "21", - "target": "16" - }, - { - "source": "21", - "target": "17" - }, - { - "source": "21", - "target": "18" - }, - { - "source": "21", - "target": "19" - }, - { - "source": "21", - "target": "20" - }, - { - "source": "22", - "target": "16" - }, - { - "source": "22", - "target": "17" - }, - { - "source": "22", - "target": "18" - }, - { - "source": "22", - "target": "19" - }, - { - "source": "22", - "target": "20" - }, - { - "source": "22", - "target": "21" - }, - { - "source": "23", - "target": "11" - }, - { - "source": "23", - "target": "12" - }, - { - "source": "23", - "target": "16" - }, - { - "source": "23", - "target": "17" - }, - { - "source": "23", - "target": "18" - }, - { - "source": "23", - "target": "19" - }, - { - "source": "23", - "target": "20" - }, - { - "source": "23", - "target": "21" - }, - { - "source": "23", - "target": "22" - }, - { - "source": "24", - "target": "11" - }, - { - "source": "24", - "target": "23" - }, - { - "source": "25", - "target": "11" - }, - { - "source": "25", - "target": "23" - }, - { - "source": "25", - "target": "24" - }, - { - "source": "26", - "target": "11" - }, - { - "source": "26", - "target": "16" - }, - { - "source": "26", - "target": "24" - }, - { - "source": "26", - "target": "25" - }, - { - "source": "27", - "target": "11" - }, - { - "source": "27", - "target": "23" - }, - { - "source": "27", - "target": "24" - }, - { - "source": "27", - "target": "25" - }, - { - "source": "27", - "target": "26" - }, - { - "source": "28", - "target": "11" - }, - { - "source": "28", - "target": "27" - }, - { - "source": "29", - "target": "11" - }, - { - "source": "29", - "target": "23" - }, - { - "source": "29", - "target": "27" - }, - { - "source": "30", - "target": "23" - }, - { - "source": "31", - "target": "11" - }, - { - "source": "31", - "target": "23" - }, - { - "source": "31", - "target": "27" - }, - { - "source": "31", - "target": "30" - }, - { - "source": "32", - "target": "11" - }, - { - "source": "33", - "target": "11" - }, - { - "source": "33", - "target": "27" - }, - { - "source": "34", - "target": "11" - }, - { - "source": "34", - "target": "29" - }, - { - "source": "35", - "target": "11" - }, - { - "source": "35", - "target": "29" - }, - { - "source": "35", - "target": "34" - }, - { - "source": "36", - "target": "11" - }, - { - "source": "36", - "target": "29" - }, - { - "source": "36", - "target": "34" - }, - { - "source": "36", - "target": "35" - }, - { - "source": "37", - "target": "11" - }, - { - "source": "37", - "target": "29" - }, - { - "source": "37", - "target": "34" - }, - { - "source": "37", - "target": "35" - }, - { - "source": "37", - "target": "36" - }, - { - "source": "38", - "target": "11" - }, - { - "source": "38", - "target": "29" - }, - { - "source": "38", - "target": "34" - }, - { - "source": "38", - "target": "35" - }, - { - "source": "38", - "target": "36" - }, - { - "source": "38", - "target": "37" - }, - { - "source": "39", - "target": "25" - }, - { - "source": "40", - "target": "25" - }, - { - "source": "41", - "target": "24" - }, - { - "source": "41", - "target": "25" - }, - { - "source": "42", - "target": "24" - }, - { - "source": "42", - "target": "25" - }, - { - "source": "42", - "target": "41" - }, - { - "source": "43", - "target": "11" - }, - { - "source": "43", - "target": "26" - }, - { - "source": "43", - "target": "27" - }, - { - "source": "44", - "target": "11" - }, - { - "source": "44", - "target": "28" - }, - { - "source": "45", - "target": "28" - }, - { - "source": "47", - "target": "46" - }, - { - "source": "48", - "target": "11" - }, - { - "source": "48", - "target": "25" - }, - { - "source": "48", - "target": "27" - }, - { - "source": "48", - "target": "47" - }, - { - "source": "49", - "target": "11" - }, - { - "source": "49", - "target": "26" - }, - { - "source": "50", - "target": "24" - }, - { - "source": "50", - "target": "49" - }, - { - "source": "51", - "target": "11" - }, - { - "source": "51", - "target": "26" - }, - { - "source": "51", - "target": "49" - }, - { - "source": "52", - "target": "39" - }, - { - "source": "52", - "target": "51" - }, - { - "source": "53", - "target": "51" - }, - { - "source": "54", - "target": "26" - }, - { - "source": "54", - "target": "49" - }, - { - "source": "54", - "target": "51" - }, - { - "source": "55", - "target": "11" - }, - { - "source": "55", - "target": "16" - }, - { - "source": "55", - "target": "25" - }, - { - "source": "55", - "target": "26" - }, - { - "source": "55", - "target": "39" - }, - { - "source": "55", - "target": "41" - }, - { - "source": "55", - "target": "48" - }, - { - "source": "55", - "target": "49" - }, - { - "source": "55", - "target": "51" - }, - { - "source": "55", - "target": "54" - }, - { - "source": "56", - "target": "49" - }, - { - "source": "56", - "target": "55" - }, - { - "source": "57", - "target": "41" - }, - { - "source": "57", - "target": "48" - }, - { - "source": "57", - "target": "55" - }, - { - "source": "58", - "target": "11" - }, - { - "source": "58", - "target": "27" - }, - { - "source": "58", - "target": "48" - }, - { - "source": "58", - "target": "55" - }, - { - "source": "58", - "target": "57" - }, - { - "source": "59", - "target": "48" - }, - { - "source": "59", - "target": "55" - }, - { - "source": "59", - "target": "57" - }, - { - "source": "59", - "target": "58" - }, - { - "source": "60", - "target": "48" - }, - { - "source": "60", - "target": "58" - }, - { - "source": "60", - "target": "59" - }, - { - "source": "61", - "target": "48" - }, - { - "source": "61", - "target": "55" - }, - { - "source": "61", - "target": "57" - }, - { - "source": "61", - "target": "58" - }, - { - "source": "61", - "target": "59" - }, - { - "source": "61", - "target": "60" - }, - { - "source": "62", - "target": "41" - }, - { - "source": "62", - "target": "48" - }, - { - "source": "62", - "target": "55" - }, - { - "source": "62", - "target": "57" - }, - { - "source": "62", - "target": "58" - }, - { - "source": "62", - "target": "59" - }, - { - "source": "62", - "target": "60" - }, - { - "source": "62", - "target": "61" - }, - { - "source": "63", - "target": "48" - }, - { - "source": "63", - "target": "55" - }, - { - "source": "63", - "target": "57" - }, - { - "source": "63", - "target": "58" - }, - { - "source": "63", - "target": "59" - }, - { - "source": "63", - "target": "60" - }, - { - "source": "63", - "target": "61" - }, - { - "source": "63", - "target": "62" - }, - { - "source": "64", - "target": "11" - }, - { - "source": "64", - "target": "48" - }, - { - "source": "64", - "target": "55" - }, - { - "source": "64", - "target": "57" - }, - { - "source": "64", - "target": "58" - }, - { - "source": "64", - "target": "59" - }, - { - "source": "64", - "target": "60" - }, - { - "source": "64", - "target": "61" - }, - { - "source": "64", - "target": "62" - }, - { - "source": "64", - "target": "63" - }, - { - "source": "65", - "target": "48" - }, - { - "source": "65", - "target": "55" - }, - { - "source": "65", - "target": "57" - }, - { - "source": "65", - "target": "58" - }, - { - "source": "65", - "target": "59" - }, - { - "source": "65", - "target": "60" - }, - { - "source": "65", - "target": "61" - }, - { - "source": "65", - "target": "62" - }, - { - "source": "65", - "target": "63" - }, - { - "source": "65", - "target": "64" - }, - { - "source": "66", - "target": "48" - }, - { - "source": "66", - "target": "58" - }, - { - "source": "66", - "target": "59" - }, - { - "source": "66", - "target": "60" - }, - { - "source": "66", - "target": "61" - }, - { - "source": "66", - "target": "62" - }, - { - "source": "66", - "target": "63" - }, - { - "source": "66", - "target": "64" - }, - { - "source": "66", - "target": "65" - }, - { - "source": "67", - "target": "57" - }, - { - "source": "68", - "target": "11" - }, - { - "source": "68", - "target": "24" - }, - { - "source": "68", - "target": "25" - }, - { - "source": "68", - "target": "27" - }, - { - "source": "68", - "target": "41" - }, - { - "source": "68", - "target": "48" - }, - { - "source": "69", - "target": "11" - }, - { - "source": "69", - "target": "24" - }, - { - "source": "69", - "target": "25" - }, - { - "source": "69", - "target": "27" - }, - { - "source": "69", - "target": "41" - }, - { - "source": "69", - "target": "48" - }, - { - "source": "69", - "target": "68" - }, - { - "source": "70", - "target": "11" - }, - { - "source": "70", - "target": "24" - }, - { - "source": "70", - "target": "25" - }, - { - "source": "70", - "target": "27" - }, - { - "source": "70", - "target": "41" - }, - { - "source": "70", - "target": "58" - }, - { - "source": "70", - "target": "68" - }, - { - "source": "70", - "target": "69" - }, - { - "source": "71", - "target": "11" - }, - { - "source": "71", - "target": "25" - }, - { - "source": "71", - "target": "27" - }, - { - "source": "71", - "target": "41" - }, - { - "source": "71", - "target": "48" - }, - { - "source": "71", - "target": "68" - }, - { - "source": "71", - "target": "69" - }, - { - "source": "71", - "target": "70" - }, - { - "source": "72", - "target": "11" - }, - { - "source": "72", - "target": "26" - }, - { - "source": "72", - "target": "27" - }, - { - "source": "73", - "target": "48" - }, - { - "source": "74", - "target": "48" - }, - { - "source": "74", - "target": "73" - }, - { - "source": "75", - "target": "25" - }, - { - "source": "75", - "target": "41" - }, - { - "source": "75", - "target": "48" - }, - { - "source": "75", - "target": "68" - }, - { - "source": "75", - "target": "69" - }, - { - "source": "75", - "target": "70" - }, - { - "source": "75", - "target": "71" - }, - { - "source": "76", - "target": "48" - }, - { - "source": "76", - "target": "58" - }, - { - "source": "76", - "target": "62" - }, - { - "source": "76", - "target": "63" - }, - { - "source": "76", - "target": "64" - }, - { - "source": "76", - "target": "65" - }, - { - "source": "76", - "target": "66" - } - ], - "categories": [ - { - "name": "BPU (100%)" - }, - { - "name": "Front (40%)" - }, - { - "name": "Backend" - }, - { - "name": "Storage" - }, - { - "name": "Cache" - }, - { - "name": "ICache" - }, - { - "name": "L2Cache" - }, - { - "name": "CtrlBlock" - }, - { - "name": "Vector" - } - ] - } \ No newline at end of file + "meta": { + "cases": { + "total": 20, + "pass": 18, + "fail": 2, + "skip": 2 + }, + "functions": { + "total": 0, + "cover": 0 + }, + "lines": { + "total": 0, + "cover": 0 + }, + "paths": "/kmh_dut", + "value": 75, + "light": false + }, + "value": 75 +} diff --git a/docs/js/chart_progress.js b/docs/js/chart_progress.js index de1b712..55d85e3 100644 --- a/docs/js/chart_progress.js +++ b/docs/js/chart_progress.js @@ -1,56 +1,146 @@ // UTs Progress Chart -function show_progress_chart(chart_id, data_url){ +function show_progress_chart(chart_id, data_url) { var chartDom = document.getElementById(chart_id); var utChart = echarts.init(chartDom); var option; utChart.showLoading(); - $.getJSON(data_url, function (graph) { + $.getJSON(data_url, function (graph_data) { utChart.hideLoading(); - option = { - tooltip: {}, - legend: [ + const formatUtil = echarts.format; + function getLevelOption() { + return [ { - data: graph.categories.map(function (a) { - return a.name; - }) + itemStyle: { + borderColor: '#777', + borderWidth: 0, + gapWidth: 1 + }, + upperLabel: { + show: false + } + }, + { + itemStyle: { + borderColor: '#555', + borderWidth: 5, + gapWidth: 1 + }, + emphasis: { + itemStyle: { + borderColor: '#ddd' + } + } + }, + { + colorSaturation: [0.35, 0.5], + itemStyle: { + borderWidth: 5, + gapWidth: 1, + borderColorSaturation: 0.6 + } } - ], + ]; + } + option = { + title: { + text: 'XiangShan-KMH Unit Verifaction Flatten Map', + left: 'center' + }, + tooltip: { + formatter: function (info) { + var meta = info.data.meta; + var treePathInfo = info.treePathInfo; + var treePath = []; + for (var i = 1; i < treePathInfo.length; i++) { + treePath.push(treePathInfo[i].name); + } + return [ + '
' + + formatUtil.encodeHTML(treePath.join('/')) + + '
', + 'Test Cases: ' + formatUtil.addCommas(meta.cases.pass) + '/' + + formatUtil.addCommas(meta.cases.total) + ' (' + + formatUtil.addCommas(meta.cases.skip) + ' skiped,  ' + + formatUtil.addCommas(meta.cases.fail) + ' fail )
', + 'Line coverage: ' + formatUtil.addCommas(meta.cases.pass) + '
', + 'Func coverage: ' + formatUtil.addCommas(meta.cases.pass) + '
', + ].join(''); + } + }, series: [ { - name: 'XiangShan UTs', - type: 'graph', - layout: 'force', - data: graph.nodes, - links: graph.links, - categories: graph.categories, - roam: true, - force: { - repulsion: 300 - }, + name: graph_data["name"], + type: 'treemap', // sunburst treemap + visibleMin: 300, label: { show: true, - position: 'right', - formatter: '{b}' + position: 'insideTopLeft', + formatter: function (params) { //formatter: '{b}' + if (params.data.children) { + return params.name; + } + let arr = [ + '{name|' + params.name + '}' + ] + if (params.data.meta.cases.fail > 0) { + arr.push( + '{fail|' + echarts.format.addCommas(params.data.meta.cases.fail) + '} {label|fail}' + ); + } + if (params.data.meta.cases.pass > 0) { + let font_type = "pass"; + if (params.data.meta.cases.pass >= params.data.meta.cases.total) { + font_type = "complete"; + } + arr.push( + '{'+ font_type + '|' + echarts.format.addCommas(params.data.meta.cases.pass) + '/'+ + echarts.format.addCommas(params.data.meta.cases.total) + '} {label|pass}' + ) + } + return arr.join('\n'); + }, + rich: { + fail: { + fontSize: 22, + lineHeight: 30, + color: 'yellow' + }, + complete: { + fontSize: 15, + color: 'green', + }, + label: { + fontSize: 9, + backgroundColor: 'rgba(0,0,0,0.3)', + color: '#fff', + borderRadius: 2, + padding: [2, 4], + lineHeight: 25, + align: 'right' + }, + name: { + fontSize: 12, + color: '#fff' + } + } }, - labelLayout: { - hideOverlap: true + upperLabel: { + show: true, + height: 30 }, - scaleLimit: { - min: 0.4, - max: 2 + itemStyle: { + borderColor: '#fff' }, - lineStyle: { - color: 'source', - curveness: 0.3 - } + levels: getLevelOption(), + data: graph_data["children"], } ] }; utChart.setOption(option); window.addEventListener('resize', function () { utChart.resize(); - }); + }); }); option && utChart.setOption(option); } diff --git a/tools/dut_tree.py b/tools/dut_tree.py new file mode 100644 index 0000000..e1327d0 --- /dev/null +++ b/tools/dut_tree.py @@ -0,0 +1,122 @@ +#coding=utf8 +#*************************************************************************************** +# This project is licensed under Mulan PSL v2. +# You can use this software according to the terms and conditions of the Mulan PSL v2. +# You may obtain a copy of Mulan PSL v2 at: +# http://license.coscl.org.cn/MulanPSL2 +# +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# +# See the Mulan PSL v2 for more details. +#**************************************************************************************/ + +import json +import copy + +node_default_meta_data = { + "cases": {"total": 0, "pass": 0, "fail": 0, "skip": 0}, + "functions": {"total": 0, "cover": 0}, + "lines": {"total": 0, "cover": 0}, + "paths": "", + "value": 1, + "light": False, +} + +node_defaut_extern = { + "itemStyle": { + "colorAlpha": 0.1, + } +} + +priority_critical = 0 +priority_high = 1 +priority_low = 2 + +dut_priority_low = { + "priority": priority_low +} + +dut_priority_high = { + "priority": priority_high +} + +dut_priority_critical = { + "priority": priority_critical +} + +def update_dut_tree_node_meta(tree_data): + def _update_node_meta(node, parent_name): + if "children" in node: + meta = copy.deepcopy(node_default_meta_data) + meta["paths"] = parent_name + "/" + node["name"] + for child in node["children"]: + child_meta = _update_node_meta(child, meta["paths"]) + meta["cases"]["total"] += child_meta["cases"]["total"] + meta["cases"]["pass"] += child_meta["cases"]["pass"] + meta["cases"]["fail"] += child_meta["cases"]["fail"] + meta["cases"]["skip"] += child_meta["cases"]["skip"] + meta["functions"]["total"] += child_meta["functions"]["total"] + meta["functions"]["cover"] += child_meta["functions"]["cover"] + meta["lines"]["total"] += child_meta["lines"]["total"] + meta["lines"]["cover"] += child_meta["lines"]["cover"] + meta["value"] += child_meta["value"] + node["meta"] = meta + node["value"] = node["meta"]["value"] + else: + node["meta"]["paths"] = parent_name + "/" + node["name"] + return node["meta"] + _update_node_meta(tree_data, "") + return tree_data + + +def init_dut_tree(tree_data): + def _append_meta_to_leaf(node): + if "children" not in node: + node["meta"] = copy.deepcopy(node_default_meta_data) + node["value"] = node["meta"]["value"] + node.update(copy.deepcopy(node_defaut_extern)) + else: + for child in node["children"]: + _append_meta_to_leaf(child) + _append_meta_to_leaf(tree_data) + return tree_data + + +class DutTree(object): + def __init__(self, tree): + self.tree = init_dut_tree(copy.deepcopy(tree)) + + def as_json(self): + update_dut_tree_node_meta(self.tree) + return json.dumps(self.tree, indent=4) + + def as_dict(self): + update_dut_tree_node_meta(self.tree) + return self.tree + + def from_json(self, json_str): + self.tree = json.loads(json_str) + + def update_leaf_meta(self, meta_path_values: dict): + # get all nodes mapping to meta_path_values + update_dut_tree_node_meta(self.tree) + leaf_map = {} + def seek_leaf_node(node): + if "children" not in node: + key = node["meta"]["paths"] + assert key not in leaf_map, "Duplicate key: %s" % key + leaf_map[key] = node + else: + for child in node["children"]: + seek_leaf_node(child) + seek_leaf_node(self.tree) + for path, meta in meta_path_values.items(): + assert path in leaf_map, "Path not found: %s" % path + leaf_map[path]["meta"] = {**leaf_map[path]["meta"], **meta} + leaf_map[path]["value"] = leaf_map[path]["meta"]["value"] + total = leaf_map[path]["meta"]["cases"]["total"] + if total > 0: + leaf_map[path]["itemStyle"]["colorAlpha"] = min(1.0, float(total)/10.0) + leaf_map[path]["meta"]["light"] = total >= 10 diff --git a/tools/kmu_dut_tree.py b/tools/kmu_dut_tree.py new file mode 100644 index 0000000..b3aafac --- /dev/null +++ b/tools/kmu_dut_tree.py @@ -0,0 +1,301 @@ +#coding=utf8 +#*************************************************************************************** +# This project is licensed under Mulan PSL v2. +# You can use this software according to the terms and conditions of the Mulan PSL v2. +# You may obtain a copy of Mulan PSL v2 at: +# http://license.coscl.org.cn/MulanPSL2 +# +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# +# See the Mulan PSL v2 for more details. +#**************************************************************************************/ + +from dut_tree import * + +kmh_dut_heriarchy = { + "name": "kmh_dut", + "children": [ + { + "name": "frontend", + "children": [ + { + "name": "bpu", + "children": [ + { + "name": "ftb" + }, + { + "name": "uftb" + }, + { + "name": "ittage" + }, + { + "name": "tagesc" + }, + { + "name": "ras" + } + ] + }, + { + **dut_priority_critical, + "name": "ftq", + }, + { + **dut_priority_high, + "name": "ibuffer", + }, + { + **dut_priority_high, + "name": "icache", + }, + { + "name": "ifu", + }, + { + **dut_priority_high, + "name": "instr_uncache", + }, + { + "name": "itlb", + }, + { + "name": "pmp", + } + ] + }, + { + "name": "backend", + "children": [ + { + "name": "ctrl_block", + "children": [ + { + "name": "decode" + }, + { + "name": "rename", + "children": [ + { + "name": "rename_table" + }, + { + "name": "freelist", + "children": [ + { + "name": "int" + }, + { + "name": "float" + }, + { + "name": "vtype" + } + ] + } + ] + }, + { + "name": "dispatch" + }, + { + "name": "dispatch_queue", + "children": [ + { + "name": "int" + }, + { + "name": "float" + }, + { + "name": "mem" + }, + { + "name": "vector_float" + } + ] + }, + { + "name": "mem_ctrl" + }, + { + **dut_priority_high, + "name": "redirect_gen" + }, + { + **dut_priority_critical, + "name": "rob" + }, + { + "name": "pc_gpa_mem" + } + ] + }, + { + **dut_priority_high, + "name": "data_path" + }, + { + **dut_priority_high, + "name": "scheduler", + "children": [ + { + "name": "int" + }, + { + "name": "float" + }, + { + "name": "mem" + }, + { + "name": "vector_float" + } + ] + }, + { + "name": "exu_block", + "children": [ + { + "name": "float" + }, + { + "name": "int", + "children": [ + { + **dut_priority_critical, + "name": "csr" + }, + { + "name": "other" + } + ] + }, + { + **dut_priority_critical, + "name": "vector_float" + } + ] + }, + { + **dut_priority_critical, + "name": "og2_for_vector" + }, + { + "name": "pc_target_mem" + }, + { + **dut_priority_high, + "name": "wb_data_path" + }, + { + **dut_priority_high, + "name": "wb_fu_busy_table" + }, + { + **dut_priority_high, + "name": "bypass_network" + } + ] + }, + { + "name": "mem_block", + "children": [ + { + "name": "lsq", + "children": [ + { + **dut_priority_critical, + "name": "load_queue", + "children": [ + { + "name": "virtual_load_queue", + }, + { + "name": "raw_rar_queue", + }, + { + "name": "uncache_queue", + }, + { + "name": "exception_queue", + } + ] + }, + { + "name": "store_queue" + } + ] + }, + { + **dut_priority_critical, + "name": "dtlb" + }, + { + **dut_priority_critical, + "name": "load_store_unit" + }, + { + **dut_priority_critical, + "name": "dcache" + }, + { + "name": "pmp" + }, + { + "name": "prefetcher" + }, + { + "name": "v_mem", + **dut_priority_critical, + "children": [ + { + "name": "vl_split" + }, + { + "name": "v_segment_unit" + }, + { + "name": "vl_merger_buffer" + }, + { + "name": "vs_merge_buffer" + } + ] + }, + { + "name": "ptw" + }, + { + "name": "uncache" + }, + { + "name": "sbuffer" + } + ] + }, + { + "name": "misc", + "children": [ + { + **dut_priority_critical, + "name": "l2_cache", + }, + { + **dut_priority_high, + "name": "mmio" + } + ] + } + ] +} + +if __name__ == "__main__": + dut_tree = DutTree(kmh_dut_heriarchy) + dut_tree.update_leaf_meta({"/kmh_dut/misc/mmio": {"cases": {"total": 10, "pass": 12, "fail": 0, "skip": 0}}, + "/kmh_dut/mem_block/ptw": {"cases": {"total": 10, "pass": 6, "fail": 2, "skip": 2}}, + }) + print(dut_tree.as_json())