Networks of spiking neurons and plastic synapses: implementation and control