Chapter 6: SDRAM Memory Controller
TX7901 User’s Manual (Rev. 6.30T – Nov, 2001)
6-25
6.8 SDRAM
Initialization
Following below is an example of the code used during SDRAM initialization.
/* SDRAMC register definition */
#define SDRAMC 0xbe00_0000 /* SDRAMC base address(virtual) */
#define D0PR 0x0000 /* DIMM0 Parameter Register */
#define D1PR 0x0010 /* DIMM1 Parameter Register */
#define D2PR 0x0020 /* DIMM2 Parameter Register */
#define D3PR 0x0030 /* DIMM3 Parameter Register */
#define DOMR 0x0040 /* Operation Mode Register */
#define DOMR_NORMAL 0 /* Normal Operation Mode */
#define DOMR_NOP 1 /* NOP mode */
#define DOMR_PRECHARGE 2 /* Precharge All Banks */
#define DOMR_WR_MODEREG 3 /* Write SDRAM mode register*/
#define DOMR_REFRESH 4 /* Force a Refresh Cycle */
#define DEMR 0x0050 /* ECC Mode Register */
#define DEESR 0x0060 /* ECC Error Status Register */
#define DEEAR 0x0070 /* ECC Error Address Register */
#define DREFRESH 0x0090 /* Refresh Register */
#define DDRIVE 0x00a0 /* Output Driver Strength */
#define D0LOW 0x0100 /* DIMM0 LOW address */
#define D0HIGH 0x0110 /* DIMM0 HIGH address */
#define D1LOW 0x0120 /* DIMM1 LOW address */
#define D1HIGH 0x0130 /* DIMM1 HIGH address */
#define D2LOW 0x0140 /* DIMM2 LOW address */
#define D2HIGH 0x0150 /* DIMM2 HIGH address */
#define D3LOW 0x0160 /* DIMM3 LOW address */
#define D3HIGH 0x0170 /* DIMM3 HIGH address */
/* configuration for single 32MB DIMM on DIMM0
* consist of five 64Mbit chips with ECC check bit
* start end size
* DIMM0 0x0000_0000 0x01ff_ffff 32MB
* DIMM1 0x0200_0000 0x01ff_ffff 0MB
* DIMM2 0x0400_0000 0x03ff_ffff 0MB
* DIMM3 0x0600_0000 0x05ff_ffff 0MB
*/
#define RAMBASE 0x0000_0000 /* start physical address */
#define RAM32MB 0x0200_0000 /* size of 32MB memory */
#define DIMM0ADDR 0xa000_000 /* dummy write address(virtual) for DIMM0 */
#define DPR_CL3 \
1 /* 1:0 DSL 64/128Mb */\
| 3 << 16 /* 17:16 CAL CL=3 cycle */\
| 3 << 18 /* 20:18 A2RWI Active to Write = 3 cycle */\
| 3 << 21 /* 23:21 P2AI Precharge to active = 3 cycle */\
| 2 << 24 /* 25:24 WRT Write recovery = 2 cycle */\
| 6 << 26 /* 28:26 RRT Refresh Recovery = 10 cycle */\
| 1 << 29 /* 29 A2P Active to Precharge = 6 cycle */
#define SDRM_CL3 /* RA Paddr description */\
1 << 12 /* 2:0 14:12 Burst Length = 2 */\
Summary of Contents for TMPR7901
Page 1: ...TX System RISC TX79 Family TMPR7901 Symmetric 2 way superscalar 64 bit CPU ...
Page 14: ...Handling Precautions ...
Page 15: ......
Page 17: ...1 Using Toshiba Semiconductors Safely 1 2 ...
Page 41: ...4 Precautions and Usage Considerations 4 2 ...
Page 42: ...TX7901 User s Manual Rev 6 30T November 2001 DOCUMENT NUMBER M 99 00004 07 ...
Page 43: ......
Page 259: ...Chapter 13 Removed TX7901 User s Manual Rev 6 30T Nov 2001 13 1 13 Removed ...
Page 260: ...Chapter 13 Removed TX7901 User s Manual Rev 6 30T Nov 2001 13 2 ...