
C
URTISS
-W
RIGHT
C
ONTROLS
E
MBEDDED
C
OMPUTING
S
YSTEM
I
NTEGRATION
809524 R
EVISION
D F
EBRUARY
2009
4-9
Configure Master’s
Primary BARs
To configure the Master’s primary BARs, use the CSS function PciConfigWrite(). The
parameters to access a PMC-605 on an SBC are as follows:
busNo = 0;
deviceNo = 0xB;
functionNo = 0;
RegNo =
/*Register’s Secondary Configuration Space offset*/
/*Set Base address for Master SBC’s RAM using Downstream I/O or Memory 1 BAR*/
PciConfigWrite(busNo, deviceNo,functionNo,0x58,0x0,sizeof(uint32));
/*Set Base address for Master’s PMC605 CSRs in PCI-P0 memory space*/
PciConfigWrite(busNo, deviceNo,functionNo,0x50,0x300000,sizeof(uint32));
/*Set Base address for Masters’s PMC605 CSRs in PCI-P0 I/O space*/
PciConfigWrite(busNo, deviceNo,functionNo,0x54,0x00000001,sizeof(uint32));
/*Enable the Master PMC605 to respond to PCI cycles and ability to act as master on the PCI-P0 bus*/
PciConfigWrite(busNo, deviceNo,functionNo,0x44,0x0007,sizeof(uint16));
Configure Slave’s
Primary BARs
Now the Primary BARS on the slave PMC-605 have to be set using the
PMC-605 service Pmc605_pciP0ConfigWrite(). The parameters to access a PMC-605’s
configuration registers in slot 2 of the P0 bus are as follows:
busNo = 0;
deviceNo = 1;
functionNo = 0;
RegNo =
/*Register’s Primary Configuration Space offset*/
/*Set Base address for Slave SBC’s RAM using Downstream I/O or Memory 1 BAR*/
Pmc605_pciP0ConfigWrite(busNo, deviceNo,functionNo,0x18,0x100000,sizeof(uint32));
/*Set Base address for Slaves’s PMC605 CSRs in PCI-P0 memory space*/
Pmc605_pciP0ConfigWrite (busNo, deviceNo,functionNo,0x10,0x301000,sizeof(uint32));
/*Set Base address for Masters’s PMC605 CSRs in PCI-P0 I/O space*/
Pmc605_pciP0ConfigWrite (busNo, deviceNo,functionNo,0x14,0x00000101,sizeof(uint32));
/*Enable the Slave PMC605 to respond to PCI cycles and ability to act as master on the PCI-P0 bus*/
Pmc605_pciP0ConfigWrite (busNo, deviceNo,functionNo,0x04,0x0007,sizeof(uint16));
T
RANSLATED
B
ASE
R
EGISTER
C
ONFIGURATION
Finally, before any memory transactions are forwarded across the 21554, the translated
base registers must be configured.
The translation registers define how the 21554 translates addresses decoded by the 21554’s
Primary BARs to somewhere pertinent on the secondary side (in this case SBC’s RAM) and
similarly how the 21554 translates addresses decoded by the 21554’s secondary side to a
pertinent address on the PCI-P0 bus (Primary side).
In this example each SBC is responsible for configuring its own PMC-605 Translated Base
Registers via the secondary interface but this could equally be done by any PCI-P0 bus
master via the Primary interface.
Artisan Scientific - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisan-scientific.com