Jump to content

tyler

Members
  • Content Count

    7
  • Joined

  • Last visited

Everything posted by tyler

  1. Thank you Roman for helping! I am confused because TLM and systemc set lots of rules and standards, but it didn't say what can not be done by using c++. For example, can I inherit the payload interface and make my own payload class with stuffs I need and pass it through the nb_transport call. Would this make sense to you? Also, in the nb_transport, time is annotated by passing the delay with the trans object, how could I actually have a clock and have all the transactions follow the clock edge? I tried to use sc_method, but somewhere in the LRM says generic payload only works
  2. I tried to pass a 2d array of data through the generic payload. int a[10][10]; trans.set_data_ptr((unsigned char*) a); ... ... unsigned char* data = trans.get_data_ptr; Then if i get the data ptr at my target, I would have a 1d array. I guess this is not doable here. I wonder what if I use the tlm extension to add a customized extension to generic payload, and have a local 2d array there and I have access it through the generic payload instance? Can i write a method in extension class that takes a 2d array as a argument and then assign
  3. thank you sir for your help. I am trying to use tlm as not only just a bus simulator, i am trying to build systems upon it with systemc as well. What do you think tlm2.0 can achieve in such level? It works simple and easy with buses. But could be more complex with other things.
  4. This is interesting as I have written something to test it myself. The following is 1st transaction, and the 2nd transaction is similar except will have delay of 10ns and address = 2. After I parsed this to nb_transport, my address 1 is lost, and only address 2 remains, and as a matter of fact, anything from the later transaction but sent first would be overwritten by the 2nd one that ends early. I am using peq_with_cb_and_phase. I am not sure why, but i am writting my code based on the LRM address = 1; en = 1; rw = 0; wait(); sc_core::sc_time s
  5. Thanks Roman. I indeed thought of those cases. I currently saw the nonblocking interface uses a queue(fifo) to save the transactions which would make them execute in order in this case. Maybe I should explore more of how to do what you are saying using tlm2.0. That would be something really interesting to know, and it also makes tlm2.0 fancier.
  6. Thank you Eyck for the explanation. Lets take the 2 in parallel transaction for example. Say for nonblocking transport, both 1st and 2nd transactions can happen at 0ns, and each one takes 10ns(1cycle) to finish. So their end point would be 10ns and 20ns respectively. If i were to use blocking transport, I would sent 1st transaction at 0 and wait it finish,and send the 2nd one at 10ns, and wait it to finish at 20ns. This would appear more like a real world example to me since as I were thinking, no one would send two instructions in parallel over one port. A pipelined structure would
  7. Hi all, I recently start to study systemC TLM2.0 for AT modeling. As a major AT concept, the non-blocking interface is used. I am very confused in this non-blocking concept as the interface barely defines 4 enums as different phases. The LRM explains them in a very theoretical way but I am confused that why we need the four phases. What makes the four phases so important for modeling ? 0,1,2,3 can be states, handshakes, sync points, whatever, but it is not very clearly said to me. Sync points maybe, but why 4? no more wait() to advance the time, the time is advanced in different
×
×
  • Create New...