Code to generate VLAVS+codebook