English subtitles

← TLM Analysis Port cs348 unit5new

Get Embed Code
1 Language

Showing Revision 1 created 04/13/2013 by Cogi-Admin.

  1. Let's first clarify some terminology for this exercise. We want to send a
  2. packet from the interface monitor to the data checker. In terms of transaction
  3. level modeling, the component which produces transaction is referred to as the
  4. Initiator. The Initiator creates a transaction, and then submits it or tran,
  5. transmits it using the Port Interface Method. The unit which consumes the, the
  6. transaction, is referred to as the Target. So in the Target, we actually need
  7. to implement the interface method, and thereby you decide what to do with your
  8. transaction. So, the Interface Port Instantiation is very similar to Normal
  9. Port Instantiation. You pick a name, a direction. Then you specify interface
  10. port of, then you specify your tml type. and then you have is instance. In our
  11. case, we want a tml_analysis port. So, the tml interface type is tml_analysis
  12. of. And then, you specify your transaction, which in our case would be the
  13. packet. For Initiators, you can basically submit a transaction by calling an
  14. access method. So, for the tlm_analysis port, the access method is called
  15. Write. So, in order to do this, you would say, my_port access modifier $.write,
  16. and then you pass in whatever you want to pass as a transaction. So in the
  17. exercise, I want you to instantiate a tlm_analysis port, I want you to call it
  18. packet received or pkt_received. And it needs to be a tlm_analysis port which
  19. can transmit elements of type packet_s. In the monitor, we have the
  20. watch_interface TCM, which continuously observes the interface and collects
  21. packets. When a packet is finished when we finished collecting a packet, we
  22. fill in all the data structures down here. And then, we emit a packet detected
  23. event for coverage collection. After this, I want you to also pass the current
  24. packet, or cur_pkt to the data checker. So down here, I want you to call the
  25. Interface Port you've instantiated, and pass cur_pkt as an argument.