One the most exciting, fun, and terrifying stages of engineering is when the first prototype or engineering model arrives in the lab and is ready for testing. You have been planning for this event for a long time (hopefully), because the cost of identifying and correcting errors later in the production process increases dramatically.
Planning for this day should have commenced right at the concept stage as you considered how you would test the functionality being designed into the hardware in the form of FPGAs, processors, etc. For example, you need to ensure you have provided test points in sufficient quantity and protected them appropriately. You would hate to short out a rail as you try to measure a voltage. Also, you need to consider the accessibility of your test points and debug headers to ensure you can actually access them. Another thing to consider is how to test the board on its own. Will you need any special test equipment? When will it become available to you?
You will also need to compile a test plan detailing what you intend to test and the expected results. How else can you be expected to know whether the design performs as required?
Once you get the prototype hardware in the lab, the testing is generally split into two main sections. Verifying basic hardware integrity is followed by a suite of increasingly sophisticated functional tests.
Verifying basic hardware integrity starts by determining if the prototype can be powered up safely and is suitable for further testing. You will check that the board has been manufactured and populated correctly, and that the voltage rails are safe to turn on. Eventually, you will arrive at the moment of truth and apply power to the board for the first time. This is always a nerve-wracking moment. Your senses are alert for wisps of smoke, noxious fumes, or snap-crackle-pop sounds.
Assuming these things don't happen after you apply power, you almost immediately start to perform basic checks. You observe the current being drawn and compare it against your projections. You verify that the clocks are all running at the correct frequencies, and that the protection circuitry (overvoltage/undervoltage) functions as desired. You make sure things like resets and power sequencing perform as expected.
These basic engineering tests will be your first priority, but soon you will want to test more complex aspects of the prototype, including interfaces to the outside world and overall system performance. Some of the system's capabilities may be amenable to testing via JTAG/Boundary Scan, but it is only after testing at speed that you can begin to relax a little. (You can never truly relax, even after all the qualification testing has been performed.) Thus, it is a great idea to have developed some simple test code for your FPGAs and/or MPUs/MCUs to keep you from having to debug both the FPGA/processor portions and the board portion of the design simultaneously. I am sure we have all spent many hours debugging some problem trying to determine if the issue was with the board, an FPGA, a processor, or -- even worse -- an ASIC.
Once you have completed any basic integrity checks, you can test higher-level functionality and work out what changes (if any) you will need to make to the next iteration.
At some point, of course, I am sure you will encounter problems. The most important thing to remember is not to panic. Take a deep breath, and then quietly and calmly set about determining the root cause, even if there is nothing you can do about it on this iteration of the prototype.
I will be discussing these and other concepts in future columns. In the meantime, what is your experience in this area?