A general simulator from DMEM to multicore systems