Jump to content

Search the Community

Showing results for tags 'thread'.



More search options

  • 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)
    • SystemC CCI Public Review
  • UVM (Universal Verification Methodology)
    • Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM 1.2 Public Review
  • Portable Stimulus
    • Portable Stimulus Discussion
  • IP-XACT
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • OCP (Open Core Protocol)
  • UCIS (Unified Coverage Interoperability Standard)
  • Commercial Announcements
    • Announcements

Categories

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

Calendars

  • Community Calendar

Found 2 results

  1. I had modeled a spi module in which i have a thread for the module, and a testbench thread to test the module. I am using MOSI and MISO lines for data transfer. I have a CLK line, which will be zero if slave is reading or writing data. And 1 when master is writing or reading data. Master have the control over CLK. So slave has to wait for master to make CLK line zero and suspend itself. After reading and writing on the line, Slave now suspend itself to give master control again. But the problem is master is not suspending. It will just execute wait(); and go for the next line. I am including the lines of code where the error is occurring. Sensitivity has anything to do with wait() statement? Module Code: if (rd_buf == 0) { DRIVE.write(false); // Here, clock is made zero, and waiting for slave to write on MISO pin... wait(); // Not suspending and jumping to testbench... for (char i = 7; i >= 0; i--) { DRIVE.write(true); rd_buf|= MISO.read()<<i; cout << "MISO in spi " << MISO.read() << endl; DRIVE.write(false); wait(); } } Test Bench: for (i = 7; i >= 0; i--) { if (clock.read ()== 0) { cout << "write_buff contents " << ((write_buff >> i) & 1) << endl; miso.write(write_buff >> i & 1); wait(); } } Thank you
  2. Hi All: I got a given SystemC code running without end_of_simulation called. And I know "end_of_simulation" won't be called if sc_stop is not called. I debug into the code and see following situation. Code looks like void thread_a() //it is a sc thread { while(xxx) { wait(sc_time(x,SC_NS)); break 1 cout<<"xxxxx"<<endl; break 2 ---logics---- } sc_stop; } The last time I was stopped at breakpoint 1, then I did step next. Then instead of stopping at breakpoint 2 , I stopped at sc_main after sc_start. So it looks like the entire thread is stopped by others? What else than "sc_stop" can terminate the thread? Since my code in "end_of_simulation" is not triggered, I am sure that there is no other sc_stop in my programme that calling sc_stop. So what can be the backend hand doing that? Thanks a lot for all your help
×