Sundance SMT300Q v.1.6 User Manual
Page 36

Page 36 of 61
SMT300Q SMT300Q User Guide V1.65
Figure 8 : DSP Transfer via the Local Aperture 0
13.3.1 Global bus access protocol
In Figure 8, the WriteCompactPCIApperture function calls a function
C6xGlobalWriteClockMB().
This function enables the DSP’s global bus to transfer Length words from the DSP’s
internal memory map pointed to by buffer. The function puts the Global bust into burst
Receive Target address via Com-Port
Link
i.e. 0xFE12 3000
Unlock the system register in PCI bridge
#define LB_CFG_SYSTEM
(0x78>>2)
(divide by 4 to word align offset address of PCI
bridge register)
WritePCIRegisters((unsigned int)LB_CFG_SYSTEM,0xA05F);
// Unlock Code
WritePCIRegisters((unsigned int)LB_CFG_SYSTEM,0x22008800);
// Restore Value
Write Lower 24 bits of byte TargetAddress to the LB_MAP0_RES register
#define
LB_MAP0_RES
(0x5C>>2)
#define LB_MAP0_MEMORY_RW 0x00060000
#define LB_MAP0_ADDRESS_MASK 0xFF000000
WritePCIRegisters((unsigned int)LB_MAP0_RES,(unsigned int)(TargetAddress &
LB_MAP0_ADDRESS_MASK ) | LB_MAP0_MEMORY_RW);
// The LB_MAP0_MEMORY_RW must be Or’ed with the data to ensure the other register in
// the 32-bit word has its correct value.
Write WORD Aligned data to Local Aperture space 0.
WritePCIApperture0((ByteToWord32(((TargetAddress) & ~LB_MAP0_ADDRESS_MASK))),Length,buffer);
Where
void WritePCIApperture0(unsigned int address,unsigned long Length,unsigned int *buffer)
{
unsigned int Index;
globalbuswriteClockMB(0x18000000 + address , Length , buffer);
}