FPGA-based Low-cost System for Automatic Tests on Digital Circuits