Skip to content
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

Fix tracer file type which should be used to decide the output format. #55

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

rockindy
Copy link
Contributor

@rockindy rockindy commented Aug 7, 2024

No description provided.

@eyck
Copy link
Contributor

eyck commented Aug 7, 2024

That's a bit difficult as the tracer only take the stem of the file name. This is because the tracer generates 2 files in the standard configurtion: one for signals and one for transactions. Any ideas on how to handle this?

@eyck
Copy link
Contributor

eyck commented Aug 7, 2024 via email

Copy link
Contributor

@eyck eyck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see the current implementation in main & develop allow to select the output formats for signal tracing and transaction tracing independently. Therefore there need to be 2 of the file_type parameters.

@@ -55,7 +55,7 @@ tracer::tracer(std::string const&& name, file_type tx_type, file_type sig_type,
if(sig_type == ENABLE)
sig_type = static_cast<file_type>(sig_trace_type.get_value());
if(sig_type != NONE) {
switch(sig_type) {
switch(tx_type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is wrong as it effectively skips the signal trace type. This way it falls pacl to vcd if selected any of the tx trace type or it falls back to text type transaction trace if any of the signal trace types is selected.

@rockindy
Copy link
Contributor Author

rockindy commented Aug 7, 2024

Sorry, the first commit was my fault.
My original purpose is try to use configurable_tracer to output a vcd file.
So the correct way is to add a new constructor for configurable_tracer to pass tx_type and sig_type to tracer.

Please check my following commits, thank you.

Usage example:

    scc::configurable_tracer trace("axi4_tlm_pin_tlm",
                                   scc::tracer::file_type::FST,  // type of trace file for transactions
                                   scc::tracer::file_type::SC_VCD,  // type of trace file for signals
                                   true); // all units by default traced

@eyck eyck merged commit b33c1ac into Minres:main Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants