Jump to content
OMRON Forums

TurboPmac to PowerPmac Gate Array address translation


Recommended Posts

Posted
I have several M-variables pointing to Gate Array location from a Turbo Pmac application that I want to use in my PowerPmac application. How do i calculate the new addresses?
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted
[quote=brad] I have several M-variables pointing to Gate Array location from a Turbo Pmac application that I want to use in my PowerPmac application. How do i calculate the new addresses? [/quote] Power PMAC memory is arranged in sections of 64 addresses, 32 addresses for what was Turbo PMAC Y-memory then 32 addresses for what was Turbo PMAC X-memory. If the difference between the two Turbo PMAC addresses is less than 8 the conversion can be simplified to the following: OFFSET = (UMAC_Address – UMAC_Base) If converting an UMAC X-Memory location PPMAC Address = 32 + OFFSET*4 + PPMAC Base If converting an UMAC Y-Memory location PPMAC Address = OFFSET*4 + PPMAC Base These simplified equations will not work if OFFSET > 7. In this case the OFFSET must be recalculated as follows. OFFSET = INT((UMAC_Address – UMAC_Base)/8)*64 + ((UMAC_Address – UMAC_Base)%8)*4 Note that % represents the modulo operator. This is because when the OFFSET is greater than or equal to 8 you must find out how many times 8 will go into that number and add 64 (0x40) for each of these times. Then add this to four times remainder to get the OFFSET. In equation form one way to write this is Once the OFFSET is correctly found, apply one of the following equations If converting a Y Memory location PPMAC address = OFFSET + PPMAC Base If converting an X Memory location PPMAC address = 32 + OFFSET + PPMAC Base In this situation for ACC59E UMAC_Base is $79c00 PPMAC_Base is $A08000 Step 1: Calculate the OFFSET OFFSET = INT(($79c08 - $79c00)/8)*64 + (($79c08 - $79c00)%8)*4 OFFSET = 64 + 0 Step 2: Apply the equation for Y memory to get PPMAC Address = 64 + 0xA08000 PPMAC Address = 0xA08040 To find the address for Turbo PMAC suggested M-variable M114 on an ACC24E2A at the default address In Turbo PMAC this address is M114->X:$78205,14 UMAC_Base for CS2 $78200 PPMAC_Base for CS2 $600000 OFFSET = ($78205 - $78200) * 4 = 20 = $14 PPMAC Address = 32 + $14 + $600000 = $600034 In addition when translating bits you must add 8 to the bit value. The reason is bits 23 - 0 of the PMAC are always mapped as bits 31 - 8 on the Power PMAC. Bits 7 - 0 are meaningless So the address M114->X:$78205,14 becomes M114->u.io.$600034.22 on the Power PMAC. To find the address for Turbo PMAC suggested M-variable M205 on an ACC24E2A at the default address In Turbo PMAC this address is M205->Y:$7820D,8,16,S UMAC_Base for CS2 $78200 PPMAC_Base for CS2 $600000 OFFSET = ($7820D - $78200) = $D. This is greater than 7 so use full calculation OFFSET = INT(($7820D - $78200)/8)*64 + (($7820D - $78200)%8)*4 OFFSET = INT(13/8)*64 + (13%8)*4 OFFSET = 64 + 5*4 = 84 = $54 PPMAC Address = $54 + $600000 = $600054 In addition when translating bits you must add 8 to the bit value. The reason is bits 23 - 0 of the PMAC are always mapped as bits 31 - 8 on the Power PMAC. Bits 7 - 0 are meaningless So the address M205->X:$7820D,8,16,S becomes M205->s.io.$600054.16.16 on the Power PMAC. [attachment=1323:name]
Guest
This topic is now closed to further replies.

×
×
  • Create New...