Jump to content

Search the Community

Showing results for tags 'sc_simcontext'.

  • 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 2.0 Public Review Feedback
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • SystemRDL
    • SystemRDL 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


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 2 results

  1. 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
  2. Hello, I have issues understanding sc_simcontext::next_time. The easiest way to describe what does not make sense for me is to give an example: #include <systemc> using namespace sc_core; SC_MODULE(A) { sc_out<bool> out; SC_CTOR(A) { SC_THREAD(t); } void t() { bool c = false; while (1) { wait(sc_time(1, SC_NS)); c = !c; out.write(c); } } }; SC_MODULE(B) { sc_in<bool> in; SC_CTOR(B) { SC_THREAD(t) } void t() { while (1) { wait(in.value_changed_event()); std::cout << "got: " << in.read() << std::endl; } } }; int sc_main(int argc, char** argv) { A a("a"); B b("b"); sc_signal<bool> s; a.out.bind(s); b.in.bind(s); while (1) { sc_time t; std::cout << sc_get_curr_simcontext()->next_time(t) << ": " << t << std::endl; sc_start(sc_time(1, SC_NS)); sleep(1); } } In this example, I would expect, that the output within the while loop of sc_main always prints 1 and the time until the next event happens (which should be 1 ns). However, when I run this program I get the following output: 0: 0 s 0: 0 s got: 1 0: 0 s got: 0 0: 0 s got: 1 0: 0 s got: 0 0: 0 s got: 1 0: 0 s got: 0 ^C Why do I always get "false" as the result for next_time? Did I misunderstand the what next_time does? Currently I'm using SystemC 2.3.1a. Thank you for your answers in advance!
×
×
  • Create New...