Jump to content

scottf

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by scottf

  1. I am fairly new to SystemC and am looking for a better way to solve my problem. In my simulation, I have a set of "resources". I also have a process that accepts requests (using a sc_fifo) and if there is an available resource, farms it out to that resource. The resource "works" on the request for a set of time, then gives it back to the dispatcher. The thing is, for the simulation, the "resource" doesn't actually have to do any work, I just need it to delay for a set amount of time (the time can be different per request). A way to do this is have each resource be a process. The dispatcher would send the request to the resource, which would wait the required time, then send the request back. In this way the dispatcher would do nb_read on each response sc_fifo and could do a wait on all sc_fifo written events. The problem is this seems like a lot of overhead just to have something delay and then tell the dispatcher the delay is done. I was looking at the sc_event, and have each resource just be an event. However, you can't determine which event triggered. So, is there a lightweight way to have my "resources" just wait and then notify my dispatcher when the time has expired, and allow my dispatcher to have multiple of these outstanding and know which one triggered, without making each resource a process? Thanks.
×
×
  • Create New...