CHAPTER 5 APPLICATION EXAMPLES
Application Note U17121EJ1V1AN
73
5.5.3 V850E/ME2 PCI host bridge macro initialization sample program list
/////////////////////////////////////////////////////////////////
// V850E/ME2 - PCI Host Bridge Macro initialization sample //
// Overview: Initializes PCI Host Bridge Macro by setting //
// PCI Bridge IO area register group. //
// Specific initialization is described in //
// function PCI_HBM_Init(). //
// //
// PCI_HBM_Init() is called after functions required for //
// accessing Host Bridge Macro, such as CPU and peripheral //
// I/O, are initialized. //
// //
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Defines base address of PCI area and SDRAM area. //
// Start address of PCI area is 0C80_0000H, and start address //
// of SDRAM area is 0400_0000H in this application. //
/////////////////////////////////////////////////////////////////
#define BASE_ADDRESS_ME2PCIIF
(0x0C800000)
#define BASE_ADDRESS_PCI_IO
(BASE_ADDRESS_ME2PCIIF)
#define BASE_ADDRESS_PCI_BRIDGE_IO
(BASE_ADDRESS_ME 0x00200000)
#define BASE_ADDRESS_PCI_MEM
(BASE_ADDRESS_ME 0x00400000)
#define
BASE_ADDRESS_SDRAM
(0x04000000)
#define RANGE_SDRAM
(0x03FFFFFF) // 64MB
////////////////////////////////////////////////////////
// PCI Host Bridge Macro register address definition //
////////////////////////////////////////////////////////
#define PHBMR_PCI_CONFIG_DATA
(BASE_ADDRESS_PCI_BR0x00)
#define PHBMR_PCI_CONFIG_ADD
(BASE_ADDRESS_PCI_BR0x04)
#define
PHBMR_PCI_CONTROL
(BASE_ADDRESS_PCI_BR0x08)
#define
PHBMR_PCI_IO_BASE
(BASE_ADDRESS_PCI_BR0x10)
#define
PHBMR_PCI_MEM_BASE
(BASE_ADDRESS_PCI_BR0x14)
#define
PHBMR_PCI_INT_CTL
(BASE_ADDRESS_PCI_BR0x18)
#define
PHBMR_PCI_ERR_ADD
(BASE_ADDRESS_PCI_BR0x1C)
#define PHBMR_SYSTEM_MEM_BASE
(BASE_ADDRESS_PCI_BR0x40)
#define PHBMR_SYSTEM_MEM_RANGE
(BASE_ADDRESS_PCI_BR0x44)
#define
PHBMR_SDRAM_CTL
(BASE_ADDRESS_PCI_BR0x48)
///////////////////////////////////////////
// Macro definition for register access //
///////////////////////////////////////////
#define V850EME2_REGW(x) *((volatile unsigned int *)((int)x))
Содержание V850E/MA1
Страница 2: ...Application Note U17121EJ1V1AN 2 MEMO ...