Jump to content


  • Posts

  • Joined

  • Last visited

tjd's Achievements


Member (1/2)



  1. Always fun for the lesser experienced C++ types (e.g., myself). Putting notes here in case anyone else runs into this: When declaring the port as a tlm_get_peek_if no workaround is necessary, thus, you can directly do target_port->nb_peek(x) .
  2. Just generated one. There is a tarball attached that contains a producer, consumer, and a main that connects the two. Also included is a simple bash script with my compilation commands and the log generated from running the script where I've also appended the G++ version to it. tlm_ex.tar
  3. 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?
  4. 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
  5. Thanks for the assist. I was assuming that I would need to track additional information, but given that I'm relatively new to SystemC, I was hoping I had missed a shortcut. Alas, no such luck. I shouldn't be dealing with any immediate notifications, so those won't be an issue.
  6. 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...