Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

sc_vector and sc_event_queue

$
0
0

Hello,

 

I am trying to use the following structure to set up a set of event queues:

sc_vector<sc_event_queue> event_lists;

and then have the following structure within my module

SC_METHOD(writer);
for (int i=1; i <= NMAX; ++i)
  sensitive << event_lists[i];

to define the sensivity list for my writer method (yes, I know I indexed from 1...index 0 is used in a different method).

 

With this in mind, some questions:

Is there any way in "writer" to identify which list item (or items) in the sc_vector triggered the execution of the process?

 

Assuming multiple items in event lists may be triggered to occur in a given delta cycle (e.g, both event_lists[2] and event_lists[5] should trigger the method in cycle t), is this an appropriate method of handling them or would they occur in cycles t and t+1?  If not, what is the proper/best approach for handling this?

 

As a bit of further background, I am essentially trying to create an NxN crossbar network where when a packet arrives on input X, I put an event on the queue (via notify) to write a packet to output Y after some delay.  My main goal is to have N be parameterizable as I will want/need to check different values of N.

 

Thanks,

Tim


Viewing all articles
Browse latest Browse all 595