Jump to content

Search the Community

Showing results for tags 'sc_trace'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV, CRAVE, FC4SC)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM (IEEE 1800.2) - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
  • Portable Stimulus
    • Portable Stimulus Discussion
    • Portable Stimulus 3.0 Public Review Feedback
  • SystemVerilog-AMS
    • Verilog-AMS 2023 Public Review
  • IP-XACT
    • IP-XACT Discussion
  • SystemRDL
    • SystemRDL Discussion
  • Clock Domain Crossing (CDC)
    • CDC Draft LRM Release Discussion
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Jabber


Skype


AIM


Yahoo


ICQ


Website URL


MSN


Interests


Location


Biography


Location


Interests


Occupation


Company

Found 7 results

  1. Hello Forum, I want to have std::list<int> as type for a sc_port and sc_signal. In the e-book "SystemC : From The Ground Up" and "IEEE Std 1666™-2011" I found the necessary information. So I created a wrapper class that implements the necessary overloaded operators, and the sc_trace function that are needed for this purpose. // List that is traceable by sc_trace class TraceList { private: std::list<int> lst; public: // Methods for accessing list std::list<int>& read() { return lst; } void write(std::list<int> var) { lst = var; } // CTOR TraceList() { } // CTOR for init values TraceList(std::list<int> var) { lst = var; } // Required by sc_signal<> and sc_fifo<> TraceList& operator= (const TraceList& var) { lst = var.lst; return *this; } // Required by sc_signal<> bool operator== (const TraceList& var) const { return lst == var.lst; } // Required functions by SystemC friend ostream& operator<< (ostream& os, const TraceList& var) { os << "{"; auto it = var.lst.begin(); while (it != var.lst.end()) { os << *it; it = std::next(it); } os << "}"; return os; } void sc_trace(sc_trace_file* tf, const TraceList& var, const std::string& nm) { int pos = 0; auto it = var.lst.begin(); while (it != var.lst.end()) { // use namespace, compiler otherwise chooses wrong function sc_core::sc_trace(tf, *it, nm + std::to_string(pos++)); it = std::next(it); } } }; I get these kind of errors: Severity Code Description Project File Line Suppression State Error C2665 'sc_core::sc_trace': none of the 60 overloads could convert all the argument types MILBUS_CoSimulator c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\communication\sc_signal_ports.h 307 Error C2665 'sc_core::sc_trace': none of the 60 overloads could convert all the argument types MILBUS_CoSimulator c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\communication\sc_signal_ports.h 1144 Error C2665 'sc_core::sc_trace': none of the 60 overloads could convert all the argument types MILBUS_CoSimulator c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h 279 Reading the output of the compiler gives me the hint that this errors are caused by a non matching overload of sc_trace. 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\communication\sc_signal_ports.h(307): error C2665: 'sc_core::sc_trace': none of the 60 overloads could convert all the argument types 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(324): note: could be 'void sc_core::sc_trace(sc_core::sc_trace_file *,const void *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(249): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxnum_fast *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(249): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxnum_fast &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(248): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxnum *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(248): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxnum &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(247): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxval_fast *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(247): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxval_fast &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(246): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxval *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(246): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_fxval &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(244): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_lv_base *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(244): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_lv_base &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(243): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_bv_base *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(243): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_bv_base &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(241): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_unsigned *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(241): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_unsigned &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(240): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_signed *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(240): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_signed &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(239): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_uint_base *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(239): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_uint_base &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(238): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_int_base *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(238): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_int_base &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(236): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_logic *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(236): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_logic &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(235): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_bit *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(235): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::sc_bit &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(232): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::uint64 *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(232): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::uint64 &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(231): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::int64 *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(231): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_dt::int64 &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(230): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const long *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(230): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const long &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(229): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const int *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(229): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const int &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(228): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const short *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(228): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const short &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(227): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const char *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(227): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const char &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(226): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned long *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(226): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned long &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(225): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned int *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(225): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned int &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(224): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned short *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(224): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned short &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(223): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned char *,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(223): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const unsigned char &,const std::string &,int)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(221): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const double *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(221): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const double &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(220): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const float *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(220): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const float &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(219): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const bool *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(219): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const bool &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(217): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_core::sc_time *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(217): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_core::sc_time &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(216): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_core::sc_event *,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\tracing\sc_trace.h(216): note: or 'void sc_core::sc_trace(sc_core::sc_trace_file *,const sc_core::sc_event &,const std::string &)' 1>c:\users\xx\xx\xx\systemc-2.3.3\src\sysc\communication\sc_signal_ports.h(307): note: while trying to match the argument list '(sc_core::sc_trace_file *, const T, std::string)' 1> with 1> [ 1> T=TraceList 1> ] Why is the overloading of sc_trace not working? What am I doing wrong? Is my approach a bad choice and should I solve it in a different way? If yes, which one?
  2. Hi, I wish to perform a trace for all the signals in my design. Since I didn't find a reference how to do this, I tried to implement it by myself. The main concept I used is to run recursively on all child objects of sc_module objects (using the get_child_objects() method). If a child object is sc_signal, the sc_trace method is performed. I created a test-case and ran it with Accellera compiler 2.3. However, I'm getting the following warning: Warning: (W710) object cannot not be traced: system.sig In file: ..\..\src\sysc\tracing\sc_trace.cpp:145 Could you please help me to fix the code? Regards, Ness case_system.h case_walker.h case_system.cpp case_walker.cpp sc_main.cpp
  3. Hi, I have a query regarding sc_trace. Is it possible to have directly get all the signals and ports dumped into the VCD file. I am trying something like this in sc_main: Top top1("top1"); sc_trace_file *tf = sc_create_vcd_trace_file("waveforms"); sc_simcontext *context = sc_get_curr_simcontext(); sc_object *optr = context->first_object(); while(optr) { if (std::string(optr->kind()) == "sc_signal") optr->trace(tf); optr = context->next_object(); } With this I am not getting anything into the waveforms.vcd. Could anyone please suggest the correct way to do the above. Thanks for the help. -- Samyak Jaroli Student, India
  4. Hello All, I wrote a class as follows: # ifndef ALLESGUTE_H_ # define ALLESGUTE_H_ # include <cstdint> # include <systemc> template < typename T > class allesGute final : public sc_core::sc_object { private : T vData ; T someOtherVData ; public : explicit allesGute(const char* name_) : sc_core::sc_object { name_ } , vData { 0 } {} const char* kind() const override { return "allesGute" ; } // Helpers : T read() const { return vData ; } void write(const T& var_) { vData = var_ ; } ~allesGute() final = default ; allesGute(const allesGute& other) = delete ; allesGute& operator=(const allesGute& other) = delete ; allesGute(allesGute&& other) = delete ; allesGute&& operator=(allesGute&& other) = delete ; }; # endif How shall I register vData with tracing system ? Thanks in advance, Regards, Sumit
  5. Dear all, is it possible to apply standard SystemC tracing to tlm_extensions? I defined my own tlm extension to add a reset and a value fields to the standard payload: class reg_extension : public tlm::tlm_extension<reg_extension>{ public: reg_extension(); tlm::tlm_extension_base* clone() const ; void copy_from(tlm::tlm_extension_base const &); bool reset; sc_bv<16> value; }; Then, my testbench declares and uses it to carry data to/from the target: class testbench : public sc_module , public virtual tlm::tlm_bw_transport_if<> { public: tlm::tlm_initiator_socket<> initiator_socket; reg_extension * payload_data; ... } void testbench::run() { tlm::tlm_generic_payload * trans; sc_time time; mem = new mem_manager(); trans = mem->allocate(); payload_data = new reg_extension; payload_data->value = sc_bv<16>("00001111"); payload_data->reset = 1; trans->set_data_length(sizeof(register_data_t)); trans->set_auto_extension(payload_data); trans->set_address(0); trans->set_write(); initiator_socket->b_transport(*trans, time); ... } In my main, I try to apply standard tracing: int main(int argc, char* argv[]) { toplevel top("top"); sc_trace_file* fp = sc_create_vcd_trace_file("wave"); fp->set_time_unit(1, SC_NS); sc_trace(fp, top.tb.payload_data->reset, "reset" ); sc_trace(fp, top.tb.payload_data->value, "value" ); sc_start(); sc_close_vcd_trace_file(fp); return 0; } The code compiles correctly, but: with SystemC 2.2.0, the generated trace is weird (see attached - I truncated the value as it had far too many digits) things get worse when compiling with SystemC 2.3.0, as the execution returns this error: My impression is that memory is somehow not managed - this would explain the wrong size for the value field, the huge correponding value, and the bad_alloc. Please note that I forced some wait invocations to advance simulation time, so that write operations onto the extension fields occur at different simulation times. Thank you in advance, Regards, S. wave.vcd
  6. Hello, Can I close sc_trace_file dynamically? Can I use sc_close_vcd_trace_file(wf) at any time after sc_trace and sc_create_vcd_trace_file(); I believe so but there is no error in compile time, but it make a Segmentation fault. //constructor . . SC_THREAD ( vcd_ctrl); . . // void vcd_ctrl() { while(1) { getcmd(command); if(command=="off") { sc_close_vcd_trace_file(g_sc_wf); } else if(command=="on") { wf = sc_create_vcd_trace_file("wave"); mod_a->trace(); mod_b->trace(); } } } >> Program received signal SIGSEGV, Segmentation fault. 0x00000019 in sc_get_curr_simcontext (this=0x84a7658, value_=...) at '/systemc/include/sysc/kernel/sc_simcontext.h:379 379 if( sc_curr_simcontext == 0 ) { Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.i686 libgcc-4.4.6-4.el6.i686 libstdc++-4.4.6-4.el6.i686 (gdb) (gdb) where #0 0x00000019 in sc_get_curr_simcontext (this=0x84a7658, value_=...) at '/systemc/include/sysc/kernel/sc_simcontext.h:379 #1 sc_core::sc_signal<sc_dt::sc_logic>::write (this=0x84a7658, value_=...) at '/systemc/include/sysc/communication/sc_signal.h:690 #2 0x0835a73f in sc_core::sc_simcontext::simulate(sc_core::sc_time const&) () #3 0x0835b4e0 in sc_core::sc_start() () #4 0x08106454 in sc_main (argc=6, argv=0xffffbb14) at ./tb/sc_plamo.cpp:81 #5 0x0834d4b3 in sc_elab_and_sim () #6 0x0834d3c2 in main ()
  7. How to output "float (double)" from sc_fixed type class using sc_trace? I have an existing model (all in floating point design, using "sc_signal<double>"), and am trying to convert it to its fixed point one (i.e. using sc_signal<sc_fixed< ,,,, > >"). sc_signal<double> ch_a; sc_signal<sc_fixed<16,8, SC_RND, SC_SAT> > ch_a_fix; sc_trace(tf, ch_a, "ch_a" ); // floating point channel tracing, it traces signal in "double". sc_trace(tf, ch_a_fix, "ch_a_fix ); // fixed point channel tracing: it traces signal in "integer numbers". The question is, how can I trace the sc_fixed type class (sc_signal<sc_fixed<...:> >) in floating point numbers? For waveform viewer-wise, I'm using gtkwave for now. I have found one posting that has the same question that I have now. But it doesn't have any replies there. http://www.accellera.org/Discussion_Forums/helpforum/archive/msg/msg?list_name=help_forum&monthdir=200802&msg=msg00035.html Many thanks in advance.
×
×
  • Create New...