What version of the tools and speeds (Avalon clock and sclk) are you using?
Enhancements to the SPI component have reduced the maximum speed of the SPI slave device (so don't run it at speeds up to half the Avalon clock rate anymore). I do not recommend exceeding 1/10th the Avalon speed.
Also I didn't look at the code but in case you were not aware, this is important: If the SPI slave is selected and it has not readied it's TX register, when data is recieved (via RX) it will be looped around and sent back through the TX signal (SPI is fully duplex so it has to send something back).