Energy-Efficient Architecture And Dataflow Optimization For Spiking Neural Network Accelerators