major fixes to fpga code + arb waveform buffer