On-wafer analog pulse generator for fast characterization and parametric test of resistive switching memories