Jump to content

ankitks

Members
  • Content count

    22
  • Joined

  • Last visited

  1. customizing sockets

    ping
  2. Folks, I have requirement to calculate bandwidth per socket. This means I need to count how many transactions were sent on a given socket, and also pass clock information. Are there any example of customizing socket where I can calculate these things and print of at the end of the simulations.
  3. I create and use lot of instance/tlm specific extensions in my code. I frequently do new/delete on them. Thinking of adding allocator and free method so that I don't have to do frequent delete/new on these objects. My only confusion is that, if I look at code for instance specific extension, it already has pool class called 'instance_specific_extension_container_pool'. Is this class their to manager different extensions and not specific extension that I need to manage? Thanks
  4. seeing this crazy behavior that when I add a 'double m_temp' variable to my class, I end up getting very different behavior where my sc_assert fires. This only happens when I set my optimization flag -O3 with g++. If I remove -O3 and add -g (for debug) to my g++ flag, I go back to my original behavior and everything passes. This doesn't look random, as I can reproduce it. I ran it with valgrind and I don't see any memory leak. ==23030== LEAK SUMMARY: ==23030== definitely lost: 0 bytes in 0 blocks ==23030== indirectly lost: 0 bytes in 0 blocks ==23030== possibly lost: 177,955 bytes in 592 blocks ==23030== still reachable: 3,585,485 bytes in 2,563 blocks ==23030== suppressed: 0 bytes in 0 blocks ==23030== ==23030== For counts of detected and suppressed errors, rerun with: -v ==23030== Use --track-origins=yes to see where uninitialised values come from ==23030== ERROR SUMMARY: 25300 errors from 286 contexts (suppressed: 6 from 6) Not sure what's going on. Any suggestions. Can't seem to run gdb/ddd since adding -g to g++ doesn't reproduce the behavior.
  5. Priority and PEQ

    It's in Regression library (separate download) at systemc-regressions-2.3.1a/tests/tlm/multi_sockets/MultiSocketSimpleSwitchAT.h:
  6. Ah..that make sense. Missed out on that one. Thanks!
  7. Priority and PEQ

    pinging again. Any suggestions?
  8. Priority and PEQ

    Any help?
  9. I have a function (nb_trasport_fw) that is been called few times in same cycle ...nb_transport_fw(...) { ... queue.push_back(trans); e.notify() } I also have a thread that's waiting on event 'e'. arbitrate() { wait(e); //do I have all the transactions in my queue. //arbitrate among trasactions in queue. } Basically I need a point where I collect all the transactions and arbitrate among them. I can't really look at single transaction and make a decision. Challenging part is I don't know if function will be called 0,1 or N times. Thanks
  10. Looks like I can just use tlm_extention and add static counter there. That will work, right?
  11. I am looking at MultiSocketSimpleSwitchAT example, and I can't seem to figure out how to implement priority based request selection. For example, in this simple switch, if we get multiple request on a given time, I need a stage where after collecting all the requests I can arbitrate between request in Round Robin manner. In this example, it is just selecting first request that happens to execute. Any suggestion on how can I implement that. Thanks
  12. I couldn't find a fifo that I can attached to socket. Are there any fifo available or do we have to create our own fifo? Thanks
  13. So for my understanding, there are two type of extension. 1. TLM extension: This will be only one type of extension, and extension will be static in the sense that it will be there till we delete the payload. 2. Instance specific extensions: There can be many time of extension, and we are allowed to attach and detach them as we like. Correct?
×