waveform_memory: remove use of variable