Describe the difference between SYNC and SYNCI

Home Forums MIPS Insider MIPS FAQ Describe the difference between SYNC and SYNCI

This topic contains 1 reply, has 1 voice, and was last updated by  ChrisImgtec 4 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64639

    ChrisImgtec
    Moderator

    When a SYNC is executed you may see a number of write transactions as the internal CPU buffers are flushed. All loads and stores that come before the SYNC are guaranteed to be completed. If the SI_SyncTxEn pin is set high and CP0_Config7.ES is set to 1 you will also see a SYNC transaction appear on the bus.

    SYNCI is used when you are changing code on the fly (self modifying code). On a SYNCI the new instruction stream is written out from the Data cache to the OCP and if the line is in the Instruction cache it will be marked invalid so that later the new instructions will be fetched back into the the Instruction cache. Note YNCI has no affect on locked cache lines.

    When you write out the new instruction stream and want to execute the new
    instructions you should do something similar to the following:

    SYNCI
    SYNC
    JR.HB/JALR.HB/ERET
    NOP

    Before the existence of SYNCI you needed to issue a CACHE HitWriteback to flush the new instructions from the D$ to the system memory and also a CACHE HitInvalidate to clear the Instruction cache.

    SYNCI can be executed in all modes while CACHE can only be executed in kernel code so a Java JIT (for example) could now issue the SYNCIs directly instead of going through more costly system calls.

    #64640

    ChrisImgtec
    Moderator

    Imagination MIPS Support

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.