| commit | 70795a575c4d5cc0d17a9d9947f18d166313c8db | [log] [tgz] |
|---|---|---|
| author | Philipp Wagner <phw@lowrisc.org> | Mon May 17 20:46:30 2021 +0100 |
| committer | Philipp Wagner <mail@philipp-wagner.com> | Wed May 19 15:44:41 2021 +0100 |
| tree | b39a56147a2c740ca883872be65455fb99cbe770 | |
| parent | 824dfca301dd0449a189f01e32e25448e503f7df [diff] |
[otbnsim] Collect statistics about basic blocks
Calculate the length of basic blocks and extended basic blocks and
present the findings as histogram when asked to dump statistics about
the execution.
Also include unit tests to check the counting behavior on small
examples.
Example:
```
$ hw/ip/otbn/dv/otbnsim/standalone.py build-out/sw/otbn/rsa_1024_enc_test.elf --dump-stats=-
[some output omitted]
Basic block statistics
----------------------
Number of instructions within a basic block
# of instr. frequency
------------- -----------
1 3250
2 2367
3 6274
4 40
5 6720
6 1381
7 1362
8 3
9 84
10 2049
12 1
13 255
17 757
Number of instructions within an extended basic block
# of instr. frequency
------------- -----------
1 67
2 1090
3 6150
4 5
5 6150
6 1374
7 2
8 1028
9 18
10 1
11 1
12 2048
14 1
15 84
19 1
48 168
122 3
124 60
125 20
127 1
3354 1
```
Signed-off-by: Philipp Wagner <phw@lowrisc.org>

OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING and our documentation on project organization and processes for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).