A general purpose digital architecture for neural network simulations