A tool for teaching memory testing based on BIST