memc040.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:4k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* memc040.h - Memory Controller ASIC for the MC68040-type bus */
  2. /* Copyright 1991-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01e,29sep98,fle  doc : made it refgen parsable
  7. 01d,22sep92,rrr  added support for c++
  8. 01c,26may92,rrr  the tree shuffle
  9. 01b,04oct91,rrr  passed through the ansification filter
  10.   -fixed #else and #endif
  11.   -changed ASMLANGUAGE to _ASMLANGUAGE
  12.   -changed copyright notice
  13. 01a,18jun91,ccc  written.
  14. */
  15. #ifdef DOC
  16. #define INCmemc040h
  17. #endif /* DOC */
  18. #ifndef __INCmemc040h
  19. #define __INCmemc040h
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*
  24.  * This file contains constants for Motorola's Memory Controller ASIC.
  25.  * The macro MEMC_BASE_ADRS must be defined when including this header.
  26.  */
  27. #ifdef _ASMLANGUAGE
  28. #define CAST
  29. #else
  30. #define CAST (char *)
  31. #endif /* _ASMLANGUAGE */
  32. /* on-board access, register definitions */
  33. #define MEMC_REG_INTERVAL 1
  34. #ifndef MEMC_ADRS /* to permit alternative board addressing */
  35. #define MEMC_ADRS(reg)   (CAST (MEMC_BASE_ADRS + (reg * MEMC_REG_INTERVAL)))
  36. #endif /* MEMC_ADRS */
  37. #define MEMC_ID MEMC_ADRS(0x00) /* Chip ID  */
  38. #define MEMC_REVISION MEMC_ADRS(0x04) /* Chip Revision Register */
  39. #define MEMC_MCR MEMC_ADRS(0x08) /* Memory Configuration Register*/
  40. #define MEMC_ASR MEMC_ADRS(0x0c) /* Alternate Status Register */
  41. #define MEMC_ACR MEMC_ADRS(0x10) /* Alternate Control Register */
  42. #define MEMC_BAR MEMC_ADRS(0x14) /* Base Address Register */
  43. #define MEMC_RCR MEMC_ADRS(0x18) /* RAM Control Register */
  44. #define MEMC_BCR MEMC_ADRS(0x1c) /* Bus Clock Register */
  45. /* MEMC_ID 0x00 Chip ID */
  46. #define MEMC_ID_RESET 0x0f /* software reset of chip */
  47. /* MEMC_REVISION 0x04 Chip Revision Register */
  48. /* NONE */
  49. /* MEMC_MCR 0x08 Memory Configuration Register */
  50. #define MEMC_MCR_4MB 0x00 /* 4 Meg of Memory 2-0 */
  51. #define MEMC_MCR_8MB 0x01 /* 8 Meg of Memory 2-0 */
  52. #define MEMC_MCR_16MB 0x02 /* 16 Meg of Memory 2-0 */
  53. #define MEMC_MCR_32MB 0x03 /* 32 Meg of Memory 2-0 */
  54. #define MEMC_MCR_64MB 0x04 /* 64 Meg of Memory 2-0 */
  55. #define MEMC_MCR_128MB 0x05 /* 128 Meg of Memory 2-0 */
  56. #define MEMC_MCR_WPB 0x08 /* Write-Per-Bit mode 3 */
  57. #define MEMC_MCR_EXTPEN 0x10 /* Enternal Parity Enable 4 */
  58. #define MEMC_MCR_FSTRD 0x20 /* Fast Read 5 */
  59. /* MEMC_ASR 0x0c Alternate Status Register */
  60. #define MEMC_ASR_APD 0xf0 /* State of the APD3-APD0 pins 7-4 */
  61. #define MEMC_ASR_BPD 0x0f /* State of the BPD3-BPD0 pins 3-0 */
  62. /* MEMC_ACR 0x10 Alternate Control Register */
  63. #define MEMC_ACR_DPD0 0x01 /* DPD0 output pin 0 */
  64. #define MEMC_ACR_DPD1 0x02 /* DPD1 output pin 1 */
  65. #define MEMC_ACR_DPD2 0x04 /* DPD2 output pin 2 */
  66. #define MEMC_ACR_DPD3 0x08 /* DPD3 output pin 3 */
  67. #define MEMC_ACR_CPD0 0x10 /* CPD0 output pin 4 */
  68. #define MEMC_ACR_CPD1 0x20 /* CPD1 output pin 5 */
  69. #define MEMC_ACR_CPD2 0x40 /* CPD2 output pin 6 */
  70. #define MEMC_ACR_CPD3 0x80 /* CPD3 output pin 7 */
  71. /* MEMC_BAR 0x14 Base Address Register */
  72. /* NONE */
  73. /* MEMC_RCR 0x18 RAM Control Register */
  74. #define MEMC_RCR_RAMEN 0x01 /* RAM Enable 0 */
  75. #define MEMC_RCR_PAREN 0x02 /* Parity Enable 1 */
  76. #define MEMC_RCR_PARINT 0x04 /* Parity Interrupt Enable 2 */
  77. #define MEMC_RCR_WWP 0x08 /* Write Wrong Parity 3 */
  78. #define MEMC_RCR_SWAIT 0x10 /* Snoop Wait 4 */
  79. #define MEMC_RCR_DMCTL 0x20 /* Data Mux Control 5 */
  80. /* MEMC_BCR 0x1c Bus Clock Register */
  81. #define MEMC_BCR_16MHZ 16 /* 16 MHz clock */
  82. #define MEMC_BCR_25MHZ 25 /* 25 MHz clock */
  83. #define MEMC_BCR_33MHZ 33 /* 33 MHz clock */
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* __INCmemc040h */