Non-Volatile and 3D stacking memory simulator, using Pin binary recompilation tool