modifying memwrite to try and diagnose bugs exposed by testnandsim.  unsuccessful

Change-Id: I6d9623849a6d972d649b0eaae120ec51d571d0c6