|
| 1 | +<!-- |
| 2 | +# Copyright lowRISC contributors (OpenTitan project). |
| 3 | +# Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +
|
| 6 | +--> |
| 7 | + |
| 8 | +{% set block = results.block %} |
| 9 | +{% set tool = results.tool %} |
| 10 | +{% set timestamp = results.timestamp %} |
| 11 | +{% set stages = results.stages %} |
| 12 | +{% set coverage = results.coverage %} |
| 13 | + |
| 14 | +<!doctype html> |
| 15 | +<html lang="en"> |
| 16 | +<head> |
| 17 | + <meta charset="utf-8"> |
| 18 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 19 | + <title>{{ block.name }} Simulation Results</title> |
| 20 | + <script src=" https://unpkg.com/[email protected]" ></script> |
| 21 | + <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" |
| 22 | + rel="stylesheet" |
| 23 | + integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" |
| 24 | + crossorigin="anonymous"> |
| 25 | + <style> |
| 26 | + td.c0 { color: #ffffff; background-color: #EF5757; } |
| 27 | + td.c1 { color: #ffffff; background-color: #EF6D57; } |
| 28 | + td.c2 { color: #000000; background-color: #EF8357; } |
| 29 | + td.c3 { color: #000000; background-color: #EF9957; } |
| 30 | + td.c4 { color: #000000; background-color: #EFAF57; } |
| 31 | + td.c5 { color: #000000; background-color: #EFC557; } |
| 32 | + td.c6 { color: #000000; background-color: #EFDB57; } |
| 33 | + td.c7 { color: #000000; background-color: #ECEF57; } |
| 34 | + td.c8 { color: #000000; background-color: #D6EF57; } |
| 35 | + td.c9 { color: #000000; background-color: #C0EF57; } |
| 36 | + td.c10 { color: #000000; background-color: #57EF57; } |
| 37 | + </style> |
| 38 | +</head> |
| 39 | +<body> |
| 40 | + |
| 41 | +<nav class="navbar navbar-expand-lg bg-body-tertiary"> |
| 42 | + <div class="container-fluid"> |
| 43 | + <a class="navbar-brand" href="#">Nightly Reports</a> |
| 44 | + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" |
| 45 | + data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" |
| 46 | + aria-expanded="false" aria-label="Toggle navigation"> |
| 47 | + <span class="navbar-toggler-icon"></span> |
| 48 | + </button> |
| 49 | + </div> |
| 50 | +</nav> |
| 51 | + |
| 52 | +<div class="container-md"> |
| 53 | + <div class="row"> |
| 54 | + <div class="col"> |
| 55 | + {% if breadcrumbs %} |
| 56 | + <nav aria-label="breadcrumb"> |
| 57 | + <ol class="breadcrumb"> |
| 58 | + {% for url, label in breadcrumbs[:-1] %} |
| 59 | + <li class="breadcrumb-item"><a href="{{ url }}">{{ label }}</a></li> |
| 60 | + {% endfor %} |
| 61 | + <li class="breadcrumb-item active" aria-current="page"> |
| 62 | + {{ breadcrumbs[-1][1] if breadcrumbs[-1] is iterable and breadcrumbs[-1]|length == 2 else breadcrumbs[-1] }} |
| 63 | + </li> |
| 64 | + </ol> |
| 65 | + </nav> |
| 66 | + {% endif %} |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + |
| 70 | + <div class="row py-3"> |
| 71 | + <div class="col"> |
| 72 | + <h2>Simulation Results: {{ block.name }}</h2> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + |
| 76 | + <div class="row"> |
| 77 | + <div class="col-4 col-md-3"> |
| 78 | + <div class="text-center mb-2"> </div> |
| 79 | + <span class="badge text-bg-secondary"> |
| 80 | + {{ timestamp.strftime("%d/%m/%Y %H:%M:%S") }} |
| 81 | + </span> |
| 82 | + <a class="badge text-bg-secondary link-underline link-underline-opacity-0" |
| 83 | + href="{{ block.url }}"> |
| 84 | + sha: {{ block.commit[:7] }} |
| 85 | + </a> |
| 86 | + <a class="badge text-bg-secondary link-underline link-underline-opacity-0" |
| 87 | + href="{{ block.name }}.json">json</a> |
| 88 | + <span class="badge text-bg-secondary">Branch: {{ block.branch }}</span> |
| 89 | + <span class="badge text-bg-secondary"> |
| 90 | + Tool: {{ tool.name }} [{{ tool.version }}] |
| 91 | + </span> |
| 92 | + </div> |
| 93 | + |
| 94 | + {% if coverage %} |
| 95 | + <div class="col-4 col-md-6"> |
| 96 | + <div class="text-center mb-2">Coverage statistics</div> |
| 97 | + <div class="container small"> |
| 98 | + <div class="row g-0 row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4"> |
| 99 | + {% for name, val in coverage.items() %} |
| 100 | + <div class="col"> |
| 101 | + <ul class="list-group list-group-horizontal"> |
| 102 | + <li class="list-group-item list-group-item-secondary px-2 py-1"> |
| 103 | + {{ name }} |
| 104 | + </li> |
| 105 | + <li class="list-group-item py-1">{{ val }}</li> |
| 106 | + </ul> |
| 107 | + </div> |
| 108 | + {% endfor %} |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + {% endif %} |
| 113 | + |
| 114 | + <div class="col-4 col-md-3"> |
| 115 | + <div class="text-center mb-2">Validation stages</div> |
| 116 | + <div class="card"> |
| 117 | + <table class="table table-sm table-borderless table-hover m-0 small"> |
| 118 | + <tbody> |
| 119 | + {% for s_name, stage in stages.items() %} |
| 120 | + <tr> |
| 121 | + <td class="c{{ (stage.percent / 10)|int }}"> |
| 122 | + {{ s_name }} |
| 123 | + </td> |
| 124 | + <td class="w-100"> |
| 125 | + <div class="progress" role="progressbar" |
| 126 | + aria-valuenow="{{ (stage.percent / 3)|int }}" |
| 127 | + aria-valuemin="0" aria-valuemax="100"> |
| 128 | + <div class="progress-bar" |
| 129 | + style="width: {{ stage.percent }}%"></div> |
| 130 | + </div> |
| 131 | + </td> |
| 132 | + <td>{{ "%.2f" | format(stage.percent) }}%</td> |
| 133 | + </tr> |
| 134 | + {% endfor %} |
| 135 | + </tbody> |
| 136 | + </table> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + |
| 141 | + <div class="row py-3"> |
| 142 | + <div class="col"> |
| 143 | + <div class="accordion accordion-flush" id="accordionStages"> |
| 144 | + {% for s_name, stage in stages.items() %} |
| 145 | + <div class="accordion-item"> |
| 146 | + <div class="accordion-header"> |
| 147 | + <button class="accordion-button w-100" type="button" |
| 148 | + data-bs-toggle="collapse" |
| 149 | + data-bs-target="#collapse{{ loop.index }}" |
| 150 | + aria-expanded="true" |
| 151 | + aria-controls="collapse{{ loop.index }}"> |
| 152 | + <div class="w-100 text-start">{{ s_name }}</div> |
| 153 | + <div class="w-100 text-center"> |
| 154 | + {{ stage.passed }}/{{ stage.total }} passed |
| 155 | + </div> |
| 156 | + <div class="w-100 text-end me-3"> |
| 157 | + {{ "%.2f" | format(stage.percent) }} % |
| 158 | + </div> |
| 159 | + </button> |
| 160 | + </div> |
| 161 | + <div id="collapse{{ loop.index }}" |
| 162 | + class="accordion-collapse collapse show" |
| 163 | + data-bs-parent="#accordionStages"> |
| 164 | + <div class="accordion-body table-responsive p-0"> |
| 165 | + <table class="table table-sm table-hover"> |
| 166 | + <thead> |
| 167 | + <tr> |
| 168 | + <th>Testpoint</th> |
| 169 | + <th>Test</th> |
| 170 | + <th>Max Runtime</th> |
| 171 | + <th>Sim Time</th> |
| 172 | + <th>Pass</th> |
| 173 | + <th>Total</th> |
| 174 | + <th>%</th> |
| 175 | + </tr> |
| 176 | + </thead> |
| 177 | + <tbody> |
| 178 | + {% for tp_name, tp in stage.testpoints.items() %} |
| 179 | + <tr class="table-secondary"> |
| 180 | + <td colspan="4">{{ tp_name }}</td> |
| 181 | + <td>{{ tp.passed }}</td> |
| 182 | + <td>{{ tp.total }}</td> |
| 183 | + <td>{{ "%.2f" | format(tp.percent) }}</td> |
| 184 | + </tr> |
| 185 | + {% for t_name, t in tp.tests.items() %} |
| 186 | + <tr> |
| 187 | + <td></td> |
| 188 | + <td>{{ t_name }}</td> |
| 189 | + <td>{{ "%.3f" | format(t.max_time) }}s</td> |
| 190 | + <td>{{ "%.3f" | format(t.sim_time) }}us</td> |
| 191 | + <td>{{ t.passed }}</td> |
| 192 | + <td>{{ t.total }}</td> |
| 193 | + <td class="c{{ (t.percent / 10)|int }}"> |
| 194 | + {{ "%.2f" | format(t.percent) }} |
| 195 | + </td> |
| 196 | + </tr> |
| 197 | + {% endfor %} |
| 198 | + {% endfor %} |
| 199 | + </tbody> |
| 200 | + </table> |
| 201 | + </div> |
| 202 | + </div> |
| 203 | + </div> |
| 204 | + {% endfor %} |
| 205 | + </div> |
| 206 | + </div> |
| 207 | + </div> |
| 208 | +</div> |
| 209 | + |
| 210 | +<script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" |
| 211 | + integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" |
| 212 | + crossorigin="anonymous"></script> |
| 213 | +</body> |
| 214 | +</html> |
0 commit comments