DDR3 memory controller and supporting IP. simulation runs but is functionally incorrect due to code issues