Skip to content

Commit

Permalink
Gather digital tests & report fix:
Browse files Browse the repository at this point in the history
- batch -> digital/batch
- generic_sar -> digital/generic_sar
- fix erroneous sim time in "others"
  • Loading branch information
LudwigCRON committed Apr 12, 2020
1 parent 44e712c commit d1c10e1
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 20 deletions.
1 change: 1 addition & 0 deletions default.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DIG_SYNTHESIS_TOOL = yosys
DIG_SIMULATOR_TOOL = iverilog
DIG_LINTER_TOOL = iverilog
DIG_COVERAGE_TOOL = covered
DIG_WAVEFORM_VIEWER = gtkwave
ANA_SIMULATOR_TOOL = ltspice
Expand Down
32 changes: 16 additions & 16 deletions envs/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ if __name__ == "__main__":
relog.error("cannot lint mixed signal or analog simulations")
exit(0)
# load the simulator script
tool_path = utils.find_tool(config["DIG_SIMULATOR_TOOL"])
tool_path = utils.find_tool(config["DIG_LINTER_TOOL"])
sys.path.append(os.path.dirname(tool_path))
linter = import_module(config["DIG_SIMULATOR_TOOL"])
linter = import_module(config["DIG_LINTER_TOOL"])
# execute
t_start = time.time() * 1000.0
stats = linter.main(files, params, lint=True)
Expand Down Expand Up @@ -325,23 +325,23 @@ if __name__ == "__main__":
# read other sims
db_batch = {"sims": [], "lints": [], "covs": []}
for stats_path in Path(CURRENT_DIR).rglob("**/*.stats"):
if stats_path in read_stat_done:
continue
type, db_sim = read_sim_stat(stats_path)
# aggregate
for k, v in db_sim.items():
tmp = db_batch[k] if k in db_batch else 0
if k != "name":
try:
db_batch[k] = float(v) + tmp
except ValueError:
relog.error("%s values should be number" % stats_path)
read_stat_done.append(stats_path)
if type != "batch":
db_batch["%ss" % type].append(db_sim)
if stats_path not in read_stat_done and "batch.stats" not in str(stats_path):
type, db_sim = read_sim_stat(stats_path)
# aggregate
for k, v in db_sim.items():
tmp = db_batch[k] if k in db_batch else 0
if k != "name":
try:
db_batch[k] = float(v) + tmp
except ValueError:
relog.error("%s values should be number" % stats_path)
read_stat_done.append(stats_path)
if type != "batch":
db_batch["%ss" % type].append(db_sim)
# add some stats to the db
add_extra_stats(db_batch)
db_batch["name"] = "others"
print(db_batch)
db["blocks"].append(db_batch)
# read the html template
t = Template(
Expand Down
4 changes: 1 addition & 3 deletions tests/Batch.list
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
generic_sar
analog
digital/cov/simple
batch
digital
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/digital/Batch.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
batch
cov/simple
generic_sar
151 changes: 151 additions & 0 deletions tests/digital/batch/.tmp_report/report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

<!DOCTYPE html>
<html>

<head>
<style>
:root,
html {
font-family: Lato, Arial, Helvetica;
}

summary {
margin: 0;
padding: 0.125rem 1rem;
background: #65BBA9;
color: #FFF;
font-size: 1.125rem;
text-transform: uppercase;
}

details {
margin: 1rem 0;
padding: 0;
}

details h3 {
padding: 0.125rem;
background: #CCC;
font-size: 1rem;
}

details h3~* {
margin-bottom: 1rem;
}

details h3:not(:first-child) {
margin: 0;
}

table {
border-collapse: collapse;
width: 100%
}

thead,
th {
background: #CCC;
border: 0;
}

tr:nth-child(2n+1) {
background: #EEE;
}

td:first-child {
text-align: left;
padding-left: 1em;
}

td {
text-align: center;
}
</style>
</head>

<body>
<h1>Saturday, 11. April 2020 20:36</h1>
<table>
<thead>
<th>name</th>
<th>lint</th>
<th>simulation</th>
<th>coverage</th>
<th>total time</th>
</thead>
<tbody>
<tr>
<td>
<a href="#batch">
batch
</a>
</td>
<td>0/0</td>
<td>6/6</td>
<td>0/0</td>
<td>0.507s</td>
</tr>
</tbody>
</table>

<details id="batch" open>
<summary>
batch
</summary>
<h3>Lint</h3>
<div class="warnings">No lints</div>

<h3>Simulation</h3>
<table>
<thead>
<th>id</th>
<th>warnings</th>
<th>errors</th>
<th>total time</th>
</thead>
<tbody>
<tr>
<td>s2</td>
<td>0</td>
<td>0</td>
<td>0.10s</td>
</tr>
<tr>
<td>tb</td>
<td>0</td>
<td>0</td>
<td>0.10s</td>
</tr>
<tr>
<td>youpi</td>
<td>0</td>
<td>0</td>
<td>0.9s</td>
</tr>
<tr>
<td>s</td>
<td>0</td>
<td>0</td>
<td>0.10s</td>
</tr>
<tr>
<td>fast_clock</td>
<td>0</td>
<td>0</td>
<td>0.10s</td>
</tr>
<tr>
<td>UFC</td>
<td>0</td>
<td>0</td>
<td>0.11s</td>
</tr>
</tbody>
</table>

<h3>Code coverage</h3>
<div class="warnings">No coverage simulations</div>
</details>
</body>

</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
DIG_SYNTHESIS_TOOL = yosys
DIG_SIMULATOR_TOOL = iverilog
DIG_LINTER_TOOL = iverilog
DIG_COVERAGE_TOOL = covered
WAVEFORM_VIEWER = gtkwave
PLATFORM = Ganymede
PLATFORM = reflow
PROJECT_FLOW = digital
TECH_LIB = $(CADTOOLS)/yosys/examples/cmos/cmos_cells.lib
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d1c10e1

Please sign in to comment.