lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.44k stars 730 forks source link

[coverage] Coverage Measurements #16761

Open alphan opened 1 year ago

alphan commented 1 year ago

Creating this issue to capture the plan for coverage measurements. This will be a long journey, so we are taking a pragmatic approach by limiting the scope and intentionally including some temporary workarounds to unblock the functionality we need sooner. After this we can think about additional enhancements such as differential coverage for PRs and local changes, dashboard, and other quality of life enhancements.

cc @cfrantz @arunthomas @milesdai @drewmacrae @dmcardle

alphan commented 1 year ago

llvm-size output for ROM (local/fork 2163b7436 on tree 706863347)

Without instrumentation:

/tools/riscv/bin/llvm-size -A bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/silicon_creator/rom/rom_with_fake_keys_fpga_cw310.elf 
bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/silicon_creator/rom/rom_with_fake_keys_fpga_cw310.elf  :
section                size        addr
.vectors                384       32768
.crt                   1664       33152
.init_array               4       34816
.text                 25348       34820
.shutdown               132       60168
.rodata                4944       60320
.static_critical       8132   268435456
.bss                  43208   268443592
.logs.fields             80           0
.riscv.attributes        38           0
.debug_info           87908           0
.debug_abbrev         19600           0
.debug_aranges          168           0
.debug_line           59215           0
.debug_loc            51588           0
.debug_ranges          5032           0
.debug_str            34447           0
.debug_frame           6100           0
Total                347992