This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于Cache_inv()的理解,请TI员工指正

在阅读demo里面的image_processing_evmc6678l_slave里面,有以下代码:


if (MultiProc_self() != 0) {
Cache_inv(p_msg->info.rgb_in,
(p_msg->info.height * p_msg->info.width * (p_msg->info.bitspp / 8)), Cache_Type_ALL, FALSE);
if (p_msg->info.p_color_table) {
Cache_inv(p_msg->info.p_color_table, (sizeof(color_table_t) * 256), Cache_Type_ALL, FALSE);
}
}

process_rgb(&(p_msg->info));

在使用MessageQ获取到info结构体的数据之后,进行了cache_inv操作。然后调用处理函数进行rgb处理操作。

我想请问,这上面两个Cache_inv()函数是不是将参数中指针指向的一个跨度区域内的空间(应该是L2SRAM里面的空间)所对应的缓存Cache(LID)的cache line的有效标志位无效化?这样处理有何目的?希望能帮忙理清下,谢谢! 

  • 6678 L2 RAM的cache一致性是由硬件维护,只需软件维护SL2及DDR的cache一致性。在使用共享数据前,首先对共享memory cache invalid,是为了保证后续处理可以读到最新的数据。