toplevel: fix symtab for small memories
waveform_memory: use new memory API