added error check to memory initialization
added error check to memory initialization

nvandervoort/PyRTL,UCSBarchlab/PyRTL,deekshadangwal/PyRTL,UCSBarchlab/PyRTL,deekshadangwal/PyRTL,nvandervoort/PyRTL