mohitnegi Posted June 4, 2014 Report Share Posted June 4, 2014 hello , i have a case where i have to multiple memory which i am accessing using DMI ptr on some particular condtion .. i have something as below but not sure whether this will work or not ... bool ufs_model<DATA_TYPE,BUS_WIDTH>::get_direct_mem_ptr(tlm::tlm_generic_payload& trans,tlm::tlm_dmi& dmi_data){ wait(e_UTRLDBR | e_UTMRLDBR); dmi_data.allow_read_write(); dmi_data.set_dmi_ptr(reinterpret_cast<unsigned char*>((wait(e_UTRLDBR))?(&utrd_mem[0][0])&utmrd_mem[0][0])); dmi_data.set_start_address(0); dmi_data.set_end_address(4*sizeof((wait(e_UTRLDBR))?(utrd_mem)-1):(utmrd_mem-1)); return true; } this event is notified from some registers .... Quote Link to comment Share on other sites More sharing options...
apfitch Posted June 4, 2014 Report Share Posted June 4, 2014 See the 1666-20011 LRM, in particular "o) The implementation of get_direct_mem_ptr shall not call wait, directly or indirectly." So your code is not good :-( regards Alan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.