Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by bennygato

  1. There are no built-in ways of connecting to a semaphore (no ports or built-in channels).


    The easiest solution would probably be to pass a reference to the semaphore into each module via a constructor argument,





    thank you very much!!! I did that and it works!

  2. Hi all, 

     I was asked to "Write five SystemC SC_MODULE master modules that connect to an sc_semaphore." in my project yet I found no example of doing such things. All the examples are about using sc_semaphore inside a single module, in which we can have several processes to share that semaphore.

     I checked asic-world instruction and example, by definition, "SystemC provides Channels for communication between two modules. "  But I just don't know how. :)


     I would really appreciate it if you could share any thoughts about this.


    Thank you!



  3. Please note that threads in any module can always share a member

    variable in that module. If you want a full-blown set up, that is threads

    in different modules accessing a common resource, why not take a

    look at the consumer - producer model, and the built-in classes as

    sc_mutex, sc_semaphore ? Hope that helps.


    I have a similar question... I was asked to "Write five SystemC SC_MODULE master modules that connect to an sc_semaphore." 

    but I totally got no idea how to use sc_semaphore to connect modules. do you have any advice?

    I read the instruction by accellera but it didn't provide such example.


  4. thx Rahul , I appreciate that 



    But one more question how should I link the ports :


    I mean if I have N ports and want to link them to this FIFO

    suppose we have:




    sc_out<bool> exit;









    in my main:

    sc_fifo<int> my_fifo(N);


    module M1;//suppose have N object type module


    how to link the ports of the N modules to my_fifo ?


    thx in advance


    I also have the same question. have you figure out how to do it? thanks.

  • Create New...