Dave provided a link to code.
You'll find the simulation code for the Spartan-6 version here: https://github.com/xesscorp/FpgasNowWhat/tree/master/Chapters/Verilog/FPGA/XuLA2/SdramSPInst