Jump to content

tjd

Members
  • Content Count

    6
  • Joined

  • Last visited

Posts posted by tjd

  1. Hate to bump an old, resolved thread, but I'm running into a linker issue using this work-around (systemc-2.3.1)

    The simple version is that I'm getting an error message of an "undefined reference to "tlm::tlm_nonblocking_peek_if<CustomType *>::nb_peek(CustomType *&) const" when using the implementation as suggested by Philipp for the port interface and Roman in the call.

    Any thoughts as to what might be causing this?  I have included tlm.h, is that sufficient?  Is there another library that needs linked in?

     

  2. From spending a few minutes with the LRM, it looks like that could be a possible solution.  As I am pretty ignorant regarding TLM, I might need some extra assistance.

     

    My first question would be how to use/structure the payload and transaction type?  For my current needs, I would just need an integer to identify which of the incoming ports my data packet was coming in on (we are using a custom packet structure).  Is this doable, and if so, how would one acutally implement it?

     

    To develop the idea further, it seems like I would replace the event_lists.notify(t) with m_peq.notify(in_port, t).  Then, the SC_METHOD(writer) would become a SC_THREAD(writer) with a clk.pos sensitivity and the writer function would handle event checking (m_peq.get_event()) and read the transaction type (from m_peq.get_next_transaction()) to know which incoming ports have a valid message at the current clock.  Is this a resonable starting point or am I way off base?

     

    Thanks,

    Tim

  3. 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

×
×
  • Create New...