8000 Add `--trace-saif` for SAIF power traces by magancarz · Pull Request #5812 · verilator/verilator · GitHub
[go: up one dir, main page]

Skip to content

Add --trace-saif for SAIF power traces #5812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 175 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
5ea2cf2
SAIF support
kbieganski Jan 28, 2025
deb08a6
Apply 'make format'
Jan 28, 2025
088f21f
[#72179] some notes from reading specification and code
magancarz Feb 7, 2025
85b018b
[#72179] add handling SAIF trace in driver.py
magancarz Feb 10, 2025
7100827
[#72179] remove std::abort calls and add bits > activity.width warnin…
magancarz Feb 10, 2025
a563497
[#72179] add wip test for SAIF trace
magancarz Feb 10, 2025
5ee6fc8
[#72179] add more SAIF trace debug prints
magancarz Feb 10, 2025
51af6ed
[#72179] fix implementation of emitting words
magancarz Feb 10, 2025
e49c06c
[#72179] add test for word emitting
magancarz Feb 10, 2025
9878587
[#72179] add more notes
magancarz Feb 10, 2025
5b126f3
[#72179] add SAIF trace class for SystemC
magancarz Feb 11, 2025
cc5a744
[#72179] remove unused code
magancarz Feb 11, 2025
e7e9f9c
[#72179] fix declaring activity duplicates
magancarz Feb 11, 2025
c2a5e16
[#72179] add saving TZ, TX, TB values as 0
magancarz Feb 11, 2025
a2fc700
[#72179] add counter test for SAIF trace
magancarz Feb 11, 2025
fd7288f
[#72179] add SAIF trace test for do while jumps
magancarz Feb 11, 2025
3e926ef
[#72179] change license of t_trace_array_saif test
magancarz Feb 11, 2025
a8cecfc
[#72179] change license of t_trace_saif test
magancarz Feb 11, 2025
648ca98
[#72179] add debug printing of signal direction/kind/type
magancarz Feb 11, 2025
431a6de
[#72179] change emitting of event and double to noop
magancarz Feb 11, 2025
767ee6b
[#72179] wip: adding tests similar to those for FST
magancarz Feb 12, 2025
0e9d72a
[#72179] move all SAIF tests to separate directory for now
magancarz Feb 12, 2025
c8a2349
[#72179] bring back t_trace_counter_saif test with correct SAIF outpu…
magancarz Feb 12, 2025
7ea3f83
[#72179] fix bug with array variables empty names
magancarz Feb 13, 2025
a970059
[#72179] add t_trace_saif test
magancarz Feb 13, 2025
95f4355
[#72179] add wip example for SAIF trace
magancarz Feb 13, 2025
de7d9e3
[#72179] add info about SAIF trace to help
magancarz Feb 13, 2025
8b3ebdd
[#72179] add saif_example design files
magancarz Feb 13, 2025
ebf2e9c
[#72179] add t_trace_abort test for SAIF
magancarz Feb 13, 2025
73725e7
[#72179] change SAIF example to gcd
magancarz Feb 14, 2025
eb638d1
[#72947] add README to SAIF example
magancarz Feb 14, 2025
2c5b8cd
add OpenSTA commands collected in one file
magancarz Feb 14, 2025
78103bb
[#72179] add t_trace_array_saif test
magancarz Feb 14, 2025
51edcdf
[#72179] wip: add t_trace_complex_saif test
magancarz Feb 14, 2025
0d07c94
[#72179] wip: add t_hier_block_trace_saif test
magancarz Feb 17, 2025
2812f33
[#72179] wip: add t_interface_ref_trace_saif test
magancarz Feb 17, 2025
e68bb48
[#72179] add t_timing_trace_saif test
magancarz Feb 17, 2025
7e3346c
[#72179] add t_trace_array_saif_portable test
magancarz Feb 17, 2025
3c99e02
[#72179] add t_trace_array_saif_threads_1 test
magancarz Feb 17, 2025
65874d3
[#72179] fix indexing of bits in emitting words to SAIF trace
magancarz Feb 17, 2025
5d86c87
[#72179] wip: backend for automatic testing of SAIF tests output
magancarz Feb 17, 2025
1f6796a
[#72179] wip: add SAIF file parser for testing backend
magancarz Feb 17, 2025
94de419
[#72179] wip: compare outputs of VCD to SAIF converter and SAIF parser
magancarz Feb 17, 2025
0e2cf72
[#72179] move SAIF parsing code to driver.py and add it to SAIF testi…
magancarz Feb 18, 2025
ab9ee43
[#73220] add handling scopes to SAIF trace
magancarz Feb 19, 2025
05fdfca
[#73220] fix writing out empty net groups
magancarz Feb 20, 2025
a45f521
[#73220] add signals duplicates in child scopes
magancarz Feb 20, 2025
0c0d98d
[#73220] remove name variable from ActivityVar
magancarz Feb 20, 2025
40f182a
[#73220] add parsing and comparing SAIF instance tree data to driver.py
magancarz Feb 20, 2025
089ce14
[#73220] add golden file to t_trace_counter_saif test
magancarz Feb 20, 2025
760d444
[#73220] fix wrong boolean causing NET not being written
magancarz Feb 20, 2025
1b6f8b7
[#73220] fix signal regex by including escape character
magancarz Feb 20, 2025
379e91c
[#73220] add comparing SAIF signal parameters
magancarz Feb 20, 2025
5c3e3a3
[#73220] change signal name to its final name
magancarz Feb 20, 2025
b3da0df
[#73220] add escape characters to signal bit index
magancarz Feb 20, 2025
d8867d1
[#73220] handle array scopes properly
magancarz Feb 20, 2025
3c35285
[#73220] remove adding lsb to the signal bit index for now
magancarz Feb 20, 2025
dacad79
[#73220] add t_trace_complex_saif test with golden file
magancarz Feb 20, 2025
3ffee61
[#73220] add support for multiple top scopes
magancarz Feb 21, 2025
dd78eda
[#73220] add better logging in SAIF objects comparison
8000 magancarz Feb 21, 2025
005a5d0
[#73220] add dot character to the valid instance name characters
magancarz Feb 21, 2025
a09ec8a
[#73220] add t_hier_block_trace_saif test with golden file
magancarz Feb 21, 2025
99ed52b
[#73220] add support for multiple top instances in tests backend
magancarz Feb 21, 2025
98a6e9b
[#73220] add better condition for checking top instance status
magancarz Feb 21, 2025
249d8da
[#73220] fix handling closing brackets in SAIF parsing
magancarz Feb 21, 2025
8e74766
[#73220] add t_trace_saif test with golden file
magancarz Feb 21, 2025
f77dd16
[#73220] add t_trace_array_saif test with golden file
magancarz Feb 21, 2025
536c5fe
[#73220] add t_interface_ref_trace_saif test with golden file
magancarz Feb 21, 2025
8347aca
[#73220] add checking for duration and divider mismatches
magancarz Feb 25, 2025
4c39153
[#73220] adjust t_trace_counter_saif test golden file
magancarz Feb 25, 2025
08f6f36
[#73220] change divider to / from .
magancarz Feb 25, 2025
cf838ae
[#73220] add timescale comparison
magancarz Feb 25, 2025
f39e5e7
[#73220] add clearing data after dumping it to output file
magancarz Feb 25, 2025
dc383eb
[#73220] add properly extracting name for scope
magancarz Feb 25, 2025
b875ed0
[#73220] change top scope index type to int32_t and fix errors with e…
magancarz Feb 25, 2025
224367d
[#73220] add . and $ to possible names characters
magancarz Feb 25, 2025
d3f8f34
[#73220] add t_trace_primitive_saif test
magancarz Feb 25, 2025
99b5c5f
[#73220] add t_trace_param_saif test
magancarz Feb 25, 2025
84950e5
[#73220] add t_trace_packed_struct_saif test
magancarz Feb 25, 2025
26cd1e5
[#73220] add t_trace_no_top_name2_saif test
magancarz Feb 25, 2025
5d06f7d
[#73220] add t_trace_jumps_do_while_saif test
magancarz Feb 25, 2025
39791e0
[#73220] add t_trace_enum_saif test
magancarz Feb 25, 2025
380d4a5
[#73220] add t_trace_dumpvards_dyn_saif test
magancarz Feb 25, 2025
5af1456
[#73220] add t_trace_complex_struct_saif test
magancarz Feb 25, 2025
0ee40fe
[#73220] add t_trace_complex_saif tests
magancarz Feb 25, 2025
50ebb34
[#73220] add t_trace_complex_params_saif tests
magancarz Feb 25, 2025
ff3727e
[#73220] add t_trace_cat_saif test
magancarz Feb 25, 2025
127fe1f
[#73220] add t_trace_ascendingrange_saif test
magancarz Feb 25, 2025
d61e88b
[#73220] add t_trace_array_saif tests
magancarz Feb 25, 2025
8dcbb52
[#73220] add t_trace_abort_saif test
magancarz Feb 25, 2025
7227544
[#73220] update incorrect SAIF golden files
magancarz Feb 25, 2025
a0d574e
[#73220] remove processed tests
magancarz Feb 25, 2025
0e4e616
[#73220] remove t_trace_counter_saif test
magancarz Feb 25, 2025
1d1abd6
[#72179] add Mateusz Gancarz to CONTRIBUTORS
magancarz Feb 26, 2025
47eb7e0
[#73220] clean up driver.py script according to lint
magancarz Feb 26, 2025
589b462
[#73220] remove unnecessary test files
magancarz Feb 26, 2025
e670583
[#73220] make sure every SAIF test passes
magancarz Feb 26, 2025
967532b
[#73220] fix typo in SAIF systemc file
magancarz Feb 26, 2025
7b8eb3e
[#73220] remove debug prints
magancarz Feb 26, 2025
4b91c58
[#73220] fix tests compilation warnings
magancarz Feb 26, 2025
ddb1a72
[#73220] clean up and resolve threads
magancarz Feb 26, 2025
8000
162980d
[#73220] remove SAIF code related to buffers
magancarz Feb 26, 2025
14c65b0
[#73220] replace auto with concrete types
magancarz Feb 26, 2025
f25492d
[#73220] add t_trace_saif_sc_unsup test
magancarz Feb 26, 2025
9febcbb
[#73220] update t_trace_saif test
magancarz Feb 26, 2025
3b0b1c4
[#73220] update SAIF tests licenses
magancarz Feb 26, 2025
cf130e9
[#73220] remove outdated test files
magancarz Feb 26, 2025
5c5d0d4
[#73220] fix t_trace_saif_sc_unsup test
magancarz Feb 26, 2025
d40d944
[#73220] add proper t_trace_saif_sc_unsup test
magancarz Feb 26, 2025
8cfa430
[#73220] remove unused code
magancarz Feb 27, 2025
8878197
[#73220] move activities code to classes
magancarz Feb 27, 2025
40bfe54
[#73220] clean up SAIF content printing code
magancarz Feb 27, 2025
6ebc4fa
[#73220] move emitting functions to ActivityVar and remove duplicate …
magancarz Feb 27, 2025
d54ebaa
[#73220] remove saif trace example
magancarz Feb 27, 2025
6ff8c23
[#73220] add checking for test correctness in t_trace_param_saif and …
magancarz Feb 27, 2025
bcc2d8d
[#73220] improve SAIF tests framework with removing need for second r…
magancarz Feb 27, 2025
290d230
Apply 'make format'
Feb 27, 2025
795bb86
[#73220] fix V3Options compilation error
magancarz Feb 27, 2025
5bd9aab
[#73220] fix lint errors in driver.py
magancarz Feb 27, 2025
074349b
[#73220] remove unnecessary assert
magancarz Feb 27, 2025
300b623
[#73220] fix static_assert clang compilation error
magancarz Feb 27, 2025
ef01003
[#73220] change extension of t_trace_cat_saif test golden files
magancarz Feb 27, 2025
999de10
[#73220] remove unused variable
magancarz Feb 28, 2025
17f2c7e
Apply 'make format'
Feb 28, 2025
70238bb
[#73220] fix order of member variables initialization
magancarz Feb 28, 2025
ca06d3d
[#73220] fix portability issues with const char*
magancarz Feb 28, 2025
28db592
[#73220] add final keyword to Activity* classes
magancarz Feb 28, 2025
8b63444
[#73220] add note to docs/guide about SAIF trace
magancarz Feb 28, 2025
239c264
[#73220] add time offset when opening new files during SAIF trace
magancarz Feb 28, 2025
ce2a35c
[#73220] fix for t_verilated_all test
magancarz Feb 28, 2025
77b617a
Apply 'make format'
Feb 28, 2025
87ea573
[#73220] remove DESIGN and VERSION from SAIF headers
magancarz Feb 28, 2025
812fe0e
[#73912] implement more robust SAIF parser
magancarz Feb 28, 2025
78e0cd5
[#73912] fix incorrect nesting of scopes in case of empty top name
magancarz Mar 3, 2025
c935aee
[#73912] fix t_hier_block_trace_saif and t_trace_ascendingrange_saif …
magancarz Mar 3, 2025
88a202f
[#73912] fix t_timing_trace_saif golden file
magancarz Mar 4, 2025
50d1a2f
Apply 'make format'
Mar 4, 2025
b0d9947
[#74021] place --trace-saif flag info in alphabetical order
magancarz Mar 4, 2025
fef5acf
[#74021] add reference to IEEE document specyfing SAIF format
magancarz Mar 4, 2025
738d7ff
[#73912] add support for CMake
magancarz Mar 4, 2025
59a9197
[#74021] add relocating nodist directory
magancarz Mar 4, 2025
9a3c6fd
[#74021] wip: SystemC support
magancarz Mar 4, 2025
29b341a
[#74021] add source comment at the beginning of the SAIF file
magancarz Mar 4, 2025
8fffad5
[#74021] remove unnecessary whitespaces from nodist/verilator_saif_diff
magancarz Mar 4, 2025
dc94cb2
[#74021] add nodist/verilator_saif_diff to exceptions in t_dist_copyr…
magancarz Mar 4, 2025
7278732
[#74021] add VerilatedSaif prefix to helper classes
magancarz Mar 4, 2025
fe7a666
[#74021] remove get from getters names
magancarz Mar 4, 2025
0838170
Apply 'make format'
Mar 4, 2025
121e84e
[#74021] move member variables to the top and add comments
magancarz Mar 4, 2025
46b6390
[#74021] add missing const declarations
magancarz Mar 4, 2025
b426a71
[#74021] clean up empty spaces and one line if statements
magancarz Mar 4, 2025
c024ff0
[#74021] remove code related to SAIF file rollover
magancarz Mar 4, 2025
5901b82
Apply 'make format'
Mar 4, 2025
2c677d9
[#74021] add reference to IEEE document specyfing SAIF format
magancarz Mar 4, 2025
2499c71
[#74021] simplify file IO logic
magancarz Mar 5, 2025
88f6463
Apply 'make format'
Mar 5, 2025
b383f64
[#74021] remove unnecessary whitespace
magancarz Mar 5, 2025
c71f5b4
[#74021] move activity accumulating code to its own class
magancarz Mar 5, 2025
e296d90
Apply 'make format'
Mar 5, 2025
bdb7050
[#74021] format verilator_saif_diff script
magancarz Mar 5, 2025
4027cde
[#74021] add final keyword to VerilatedSaifActivityAccumulator class
magancarz Mar 5, 2025
38e4834
[#74021] add t_trace_saif_sc test
magancarz Mar 5, 2025
5a72dda
[#74021] clean up code
magancarz Mar 5, 2025
de25b70
Apply 'make format'
Mar 5, 2025
93cc24b
[#74021] add assert and fix comment
magancarz Mar 5, 2025
3f829e1
[#74021] change link to IEEE spec
magancarz Mar 6, 2025
86871a4
[#74021] drop verilated_saif_sc.cpp file
magancarz Mar 6, 2025
38f87e5
[#74021] update SAIF tests golden files
magancarz Mar 6, 2025
6a4390e
[#74021] correct comments
magancarz Mar 6, 2025
6339df5
[#74021] drop reduntant saif tests verilog files
magancarz Mar 6, 2025
915d734
[#74021] apply review suggestions
magancarz Mar 6, 2025
8d12756
Apply 'make format'
Mar 6, 2025
85ce345
[#74021] update comments in verilated_saif_c
magancarz Mar 6, 2025
a90e36f
[#74021] add license to nodist/verilator_saif_diff
magancarz Mar 6, 2025
f7c2431
[#74021] update implementation comments
magancarz Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/verilator
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ detailed descriptions of these arguments.
--trace-max-array <depth> Maximum array depth for tracing
--trace-max-width <width> Maximum bit width for tracing
--trace-params Enable tracing of parameters
--trace-saif Enable SAIF file creation
--trace-structs Enable tracing structure names
--trace-threads <threads> Enable FST waveform creation on separate threads
--no-trace-top Do not emit traces for signals in the top module generated by verilator
Expand Down
2 changes: 2 additions & 0 deletions ci/ci-script.bash
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
TEST_REGRESS="$RELOC_DIR/test_regress"
mv test_regress "$TEST_REGRESS"
NODIST="$RELOC_DIR/nodist"
mv nodist "$NODIST"
# Feeling brave?
find . -delete
ls -la .
Expand Down
1 change: 1 addition & 0 deletions docs/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Marlon James
Marshal Qiao
Martin Schmidt
Martin Stadler
Mateusz Gancarz
Matthew Ballance
Michael Bikovitsky
Michael Killough
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/exe_verilator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,11 @@ Summary:

Disable tracing of parameters.

.. option:: --trace-saif

Enable SAIF tracing in the model. This overrides :vlopt:`--trace`.
Specification of this format can be found in `IEEE 1801-2018<https://ieeexplore.ieee.org/document/8686430>`_ (see Annex I).

.. option:: --trace-structs

Enable tracing to show the name of packed structure, union, and packed
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/verilating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ SystemC include directories and link to the SystemC libraries.
Optional. Enables FST tracing if present, equivalent to "VERILATOR_ARGS
--trace-fst".

.. describe:: TRACE_SAIF

Optional. Enables SAIF tracing if present, equivalent to "VERILATOR_ARGS
--trace-saif".

.. describe:: VERILATOR_ARGS

Optional. Extra arguments to Verilator. Do not specify :vlopt:`--Mdir`
Expand Down
1 change: 1 addition & 0 deletions include/verilated.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ VK_CPPFLAGS_ALWAYS += \
-DVM_TRACE=$(VM_TRACE) \
-DVM_TRACE_FST=$(VM_TRACE_FST) \
-DVM_TRACE_VCD=$(VM_TRACE_VCD) \
-DVM_TRACE_SAIF=$(VM_TRACE_SAIF) \
$(CFG_CXXFLAGS_NO_UNUSED) \

ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
Expand Down
Loading
Loading
0