-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
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? |
But this is exactly what ' tracer(std::string const&& name, file_type
tx_type, file_type sig_type, sc_core::sc_object* top = nullptr)' is
doing: you provide a name for the trace files and a type for the
transaction trace (tx_type) and for the type of the signal trace
(sig_type). Moreover you can change these setting alter on by setting
the cci parameter tx_trace_type and sig_trace_type.
How is this different from what you propose?
Best
…-Eyck
Am 07.08.2024 um 07:32 schrieb rockindy:
How about to add two functions to set |tx_type| and |sig_type|?
In the constructor of |tracer|, we can set default values for
|tx_type| and |sig_type|(e.g., |TEXT| and |FST|).
If users want to change the output format, they can use additional
functions.
For example:
tracer(std::stringconst&& name,bool enable_tx,bool enable_sig, sc_core::sc_object* top, sc_core::sc_module_nameconst& nm);
set_tx_type(file_type tx_type);
set_sig_type(file_type sig_type);
—
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADKYF3GBH6YHSAHFLFP6V3ZQGWONAVCNFSM6AAAAABMDQA32WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGY2TCMZUHA>.
You are receiving this because you commented.Message ID:
***@***.***>
|
There was a problem hiding this 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.
src/sysc/scc/tracer.cpp
Outdated
@@ -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) { |
There was a problem hiding this comment.
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.
Sorry, the first commit was my fault. 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 |
No description provided.