Jump to content

Search the Community

Showing results for tags 'Synch'.



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 (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM 2017 - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
    • UVM 1.2 Public Review
  • Portable Stimulus
    • Portable Stimulus 1.0
    • Portable Stimulus Pre-Release Discussion
  • IP Security
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

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

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 1 result

  1. Hi everybody! About my model: Here is two different initiators and one target. Initiators makes b_transport to different sockets. first b_transport of each initiator its "req to transition", second - data transition. Could anybody help me to write synch point? My target should will call some behavioral function when all initiators will make "req to transition". Could anybody helps me to change this code? Please, help me! #define SC_INCLUDE_DYNAMIC_PROCESSES #include <systemc.h> #include <tlm.h> #include <tlm_utils\simple_initiator_socket.h> #include <tlm_utils\simple_target_socket.h> SC_MODULE(Initiator) { tlm_utils::simple_initiator_socket<Initiator> socket; void process() { tlm::tlm_generic_payload *trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(10, SC_NS); for(int i =0 ; i < 100; i++) { cout << "Initiator1: send payload with req to target @ " << sc_time_stamp() << endl; socket->b_transport(*trans, delay); if(trans->is_response_ok()) { cout << "Initiator1: Start transaction. Send data @ " << sc_time_stamp() << endl; trans->set_data_ptr(reinterpret_cast<unsigned char*>(&i)); socket->b_transport(*trans, delay); } } } SC_CTOR(Initiator) { SC_THREAD(process); } }; SC_MODULE(Initiator2) { tlm_utils::simple_initiator_socket<Initiator2> socket; void process() { tlm::tlm_generic_payload *trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(0, SC_NS); for(int i =5 ; i < 100; i++) { cout << "Initiator2: send payload with req to target @ " << sc_time_stamp() << endl; socket->b_transport(*trans, delay); if(trans->is_response_ok()) { cout << "Initiator2: Start transaction. Send data @ " << sc_time_stamp() << endl; trans->set_data_ptr(reinterpret_cast<unsigned char*>(&i)); socket->b_transport(*trans, delay); } } } SC_CTOR(Initiator2) { SC_THREAD(process); } }; SC_MODULE(Target) { tlm_utils::simple_target_socket<Target> socket, socket2; bool dataRecievedI1, dataRecoevedI2; virtual void process1(tlm::tlm_generic_payload &tx, sc_time& dt) { if(!dataRecievedI1) { wait(socket->default_event()); } } virtual void process2(tlm::tlm_generic_payload &tx, sc_time& dt) { if(!dataRecoevedI2) { } } SC_CTOR(Target) { dataRecievedI1 = false; dataRecoevedI2 = false; socket.register_b_transport(this, &Target::process1); socket2.register_b_transport(this, &Target::process2); } }; SC_MODULE(Top) { Initiator *initiator; Initiator2 *initiator2; Target *target; SC_CTOR(Top) { initiator = new Initiator ("initiator"); target = new Target ("target"); initiator2 = new Initiator2("initiator2"); initiator->socket.bind(target->socket); initiator2->socket.bind(target->socket2); } }; int sc_main(int argc, char* argv[]) { Top top("top"); sc_start(); getchar(); return 0; }
×
×
  • Create New...