Jump to content

Search the Community

Showing results for tags 'wait'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • 1800.2-2017 Early Adopter Release
    • UVM Commercial Announcements
    • UVM 1.2 Public Review
  • Portable Stimulus
    • Portable Stimulus Discussion
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • OCP (Open Core Protocol)
  • UCIS (Unified Coverage Interoperability Standard)
  • Commercial Announcements
    • Announcements


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL












Found 7 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. Hello, I was doing a simulation and I keep getting a runtime error exception (MSVC). I traced the error to a wait() statement. What could be the cause? Thank you,
  3. Good day, I have a question regarding how to determine the appropriate delay value for the wait( ) function call. In the target b_transport callback, we can add delay to the simulation time by passing delay amount to the wait( ) function. In simulation that uses quantum and temporal decoupling that targets super fast instruction accurate simulation, the timing does not have to be very detail (loosely timed). With or without delay in the target callback function will not cause any functional inaccuracy and still we could produce the platform that can support firmware/software development. Still if we want to put a delay to the wait( ), how can we determine the appropriate delay value for the function parameter? Thank you. Regards, Arya.
  4. Hallo, I have a SC_THREAD which has a dynamic synchronization. I use a sc_event_or_list as the wait-function argument. void notifyForGeneratedOutPix(void) { using namespace std; while (true) { sc_core::wait( m_outPixEvOrList ); //I'd like to do something like this: for(auto event : m_outPixEvOrList) { if(event.isNotified()) { cout << "@ " << setw(5) << sc_core::sc_time_stamp(); cout << " | delta cycle: " << setw(5) << sc_core::sc_delta_count(); cout << "Written values from "; this->dump(cout); cout << endl; cout << "value: "; dumpOutPixel(event); //map access with event as key } else continue; } } The events synchronize a method where I need to know which event is notified and has resumed the thread process. I haven't found a method or function to check an event if it is notified or not. The event class have this enumaration enum notify_t { NONE, DELTA, TIMED }; but I haven't found something to check that flag. Is their any way to find out if a event is notified or not? Thx *andre*
  5. I happened across the following code. @(m_vif.smp_cb iff (m_vif.smp_cb.xyz_enable) ); To get to the crux of my question, let's consider it to be the below code. I don't think I've dropped anything relevant with this change (but I post both, b/c I have dropped important info with my edits in the past). @(posedge clk iff (xyz_enable) ); Q) How should the above line behave? How would you read that line aloud? 1) "Wait for a posedge of clk, if and only if xyz_enable is true." //That's how I read it, but that is incorrect. 2) "Wait for posedges of clk until xyz_enable is true." //This is correct. My thought was that when xyz_enable==0, it would just 'fall through' and there would be no wait for a posedge of clk. i.e. if(xyz_enable) @(posedge clk); Can someone help me read that line as a descriptive sentence? Here is some test code: module top; logic clk; int count=0; initial clk=0; always #1 clk = ~clk; initial begin $display($time," ************* START"); repeat (10) @(posedge clk); fork begin repeat(33) begin $display($time," Tine1: waiting for posedge clk. count=%0d",count); @(posedge clk); count++; end end begin $display($time," Tine2: waiting for count=10"); @(posedge clk iff (count==10)); $display($time," Tine2: waited for count=10. count=%0d",count); end join_any $display($time," ************* END"); $finish; end endmodule Results: 0 ************* START 19 Tine1: waiting for posedge clk. count=0 19 Tine2: waiting for count=10 21 Tine1: waiting for posedge clk. count=1 23 Tine1: waiting for posedge clk. count=2 25 Tine1: waiting for posedge clk. count=3 27 Tine1: waiting for posedge clk. count=4 29 Tine1: waiting for posedge clk. count=5 31 Tine1: waiting for posedge clk. count=6 33 Tine1: waiting for posedge clk. count=7 35 Tine1: waiting for posedge clk. count=8 37 Tine1: waiting for posedge clk. count=9 39 Tine1: waiting for posedge clk. count=10 39 Tine2: waited for count=10. count=10 39 ************* END Thanks, for any feedback.
  6. *, Is one of these ways to have a sequence wait on an event preferred? If so, why? The following are code snippets from inside a sequence. 1) Create transaction and engage w/ driver, then wait for event. `uvm_create(req) start_item(req); m_state.wait_on_smthg(); // <--- wait here 2) Wait for event, then proceed m_state.wait_on_smthg(); // <--- wait here `uvm_create(req) start_item(req); In this case, the event being waited for is that data of a certain type is available.
  7. rahuljn

    SystemC wait statement

    Hi Guys If I use wait(e1 | e2) in my thread(where e1 and e2 are sc_event), on the next line after this wait, is there a way to know whether it is an event on e1 or e2 which force the thread to come out of wait. Thanks RahulJn