2

I am implementing a packet decoder on a micro-controller. The packets are of 32-bytes each, received through a UART, every 10 milliseconds. The UART ISR (Interrupt Service Routine) keeps the received bytes in a ring buffer, and a thread scheduled every 7.5ms decodes the packets from ring buffer. There are instrumentation routines implemented to report the number of times ring buffer was full, error count after decoding, dropped bytes count. The micro-controller can send these packets back to PC running my test case through a different UART.

How do I design a test case to check if the system is meeting my performance requirements. These are the test cases which I should take care of --

  1. The transmitter clock may run slightly faster (Sending a packet every 8ms, rather than the nominal 10ms).
  2. The channel may introduce errors to data bits. There are checksum fields included in packet to cope up with that. How to simulate the channel errors?
  3. The test case should be maintainable and extendable.

I already have a simulator through which I tested the decoder (implemented in micro-controller) for functional correctness. This simulator sends packets at programmable intervals, and the value of data fields can be changed through a UI. How can this simulator be modified to do this?

Are there standard practices/test cases to handle such throttling tests? Are there some edge cases I am missing? I need to make sure that the ring buffer has enough space to handle the higher rates of packets sent by the receiver.

ejderuby
  • 710
  • 5
  • 21
SRK
  • 308
  • 3
  • 16

0 Answers0