thanks to daveshah, added simulation of dram