(hls backend) add ram and corresponding write and read indexes