English subtitles

← Handle Output Packets cs348 unit5new2

Get Embed Code
1 Language

Showing Revision 2 created 04/19/2013 by Cogi-Admin.

  1. In the second exercise for the data checker, we will focus on packets delivered
  2. from the output monitor. We will implement the functionality for monitor zero.
  3. The other ones are all the same, so I will just copy them in. I've already
  4. added a new TLM analysis port, which will be connected to the monitor of out
  5. zero. You can see that the signature is different. And we're now using a
  6. prefix. The prefix enables us to distinguish the different right methods. So if
  7. you use prefix in_, the right method is called in_write. So this one is now
  8. responsible for the input port the for the TLM analysis port connected to the
  9. input monitor. In the same way, we will have an out zero, right? Which will be
  10. connected to the output zero monitor. Here is your exercise. You need to do two
  11. things. First, you need to add a check, to make sure that there is at least one
  12. packet in the output zero expected packets list. When we get packets on the
  13. input monitor, they will be added to this list. And they should be already
  14. there by the time we get a packet on the outward monitor. The check details are
  15. written here. The other thing you need to do is to call the compare packets
  16. method. We will implement this in the next exercise. Here, it just needs to be
  17. called. It has two parameters, the expected packet and the received packet. The
  18. expected packet is the first packet of the out0 expected packets list and the
  19. received packet is the packet we've just got from the output monitor. Also,
  20. when you get a packet from the expected packets list, make sure to delete it
  21. from the list. Such that, next time we call this function, we get, we compare
  22. with the next relative packet.