A system for implementing hardware-friendly artificial neural networks in FPGAs