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.

各个核上读取数据不不一样



如图,我定义了一个标志位pseudo_finish_flag来进行各个核的同步,放在SL2上

但是在测试的过程中发现核读出来的值与我赋值不一样:

如我在核2上把pseudo_finish_flag[2]赋为0,并write back,但是在核1上invL2后读出来的值总是为1;

而且同一时刻各个核查看memory发现这个值不一样,求解答。

如图:

Core2:

 

Core3:

  • Mao,

                 SL2的数据在多核间共享,除了考虑cache一致性操作外,还需考虑prefetch特性。 请把SL2的preftech关掉再试一下。

                核间同步的方法建议用IPC, 或者用non-cachable 的DDR变量更合适一些。