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

VxWorks

开发平台:

C/C++

  1. /* fga002.h - Force Computers FGA-002 gate array */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01i,22sep92,rrr  added support for c++
  7. 01h,06aug92,ccc  added DMA definitions.
  8. 01g,13jul92,caf  added function declarations.
  9. 01f,26may92,rrr  the tree shuffle
  10. 01e,04oct91,rrr  passed through the ansification filter
  11.   -changed ASMLANGUAGE to _ASMLANGUAGE
  12.   -changed copyright notice
  13. 01d,24oct90,yao  added missing register definitions.allow for ASM & reg offset.
  14. 01c,05oct90,shl  added copyright notice.
  15.  made #endif ANSI style.
  16. 01b,06sep89,jcf  fixed CTRL15 definitions.
  17. 01a,14feb89,jcf  written.
  18. */
  19. #ifndef __INCfga002h
  20. #define __INCfga002h
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #ifdef  _ASMLANGUAGE
  25. #define CAST
  26. #define CAST_INT
  27. #else
  28. #define CAST (char *)
  29. #define CAST_INT (int *)
  30. #endif /* _ASMLANGUAGE */
  31. #define FGA_ADRS(reg) (CAST (FGA_BASE_ADRS + (reg * FGA_REG_INTERVAL)))
  32. #define FGA_ADRS_INT(reg) (CAST_INT (FGA_BASE_ADRS + (reg * FGA_REG_INTERVAL)))
  33. /* register definitions */
  34.     /* interrupt control registers */
  35. #define FGA_ICRMBOX0 FGA_ADRS(0x000)   /* mailbox 0 */
  36. #define FGA_ICRMBOX1 FGA_ADRS(0x004)   /* mailbox 1 */
  37. #define FGA_ICRMBOX2 FGA_ADRS(0x008)   /* mailbox 2 */
  38. #define FGA_ICRMBOX3 FGA_ADRS(0x00C)   /* mailbox 3 */
  39. #define FGA_ICRMBOX4 FGA_ADRS(0x010)   /* mailbox 4 */
  40. #define FGA_ICRMBOX5 FGA_ADRS(0x014)   /* mailbox 5 */
  41. #define FGA_ICRMBOX6 FGA_ADRS(0x018)   /* mailbox 6 */
  42. #define FGA_ICRMBOX7 FGA_ADRS(0x01C)   /* mailbox 7 */
  43. #define FGA_ICRTIM0 FGA_ADRS(0x220)   /* timer */
  44. #define FGA_ICRFMB0REF FGA_ADRS(0x240)   /* FMB0 refused */
  45. #define FGA_ICRFMB1REF FGA_ADRS(0x244)   /* FMB1 refused */
  46. #define FGA_ICRFMB0MES FGA_ADRS(0x248)   /* FMB0 message */
  47. #define FGA_ICRFMB1MES FGA_ADRS(0x24C)   /* FMB1 message */
  48. #define FGA_ICRDMANORM FGA_ADRS(0x230)   /* DMA normal */
  49. #define FGA_ICRDMAERR FGA_ADRS(0x234)   /* DMA error */
  50. #define FGA_ICRPARITY FGA_ADRS(0x258)   /* parity */
  51. #define FGA_ICRVME1 FGA_ADRS(0x204)   /* VMEIRQ 1 */
  52. #define FGA_ICRVME2 FGA_ADRS(0x208)   /* VMEIRQ 2 */
  53. #define FGA_ICRVME3 FGA_ADRS(0x20C)   /* VMEIRQ 3 */
  54. #define FGA_ICRVME4 FGA_ADRS(0x210)   /* VMEIRQ 4 */
  55. #define FGA_ICRVME5 FGA_ADRS(0x214)   /* VMEIRQ 5 */
  56. #define FGA_ICRVME6 FGA_ADRS(0x218)   /* VMEIRQ 6 */
  57. #define FGA_ICRVME7 FGA_ADRS(0x21C)   /* VMEIRQ 7 */
  58.     /* extended interrupt control registers */
  59. #define FGA_ICRABORT FGA_ADRS(0x280)   /* abort */
  60. #define FGA_ICRACFAIL FGA_ADRS(0x284)   /* acfail */
  61. #define FGA_ICRSYSFAIL FGA_ADRS(0x288)   /* sysfail */
  62. #define FGA_ICRLOCAL0 FGA_ADRS(0x28C)   /* local 0 */
  63. #define FGA_ICRLOCAL1 FGA_ADRS(0x290)   /* local 1 */
  64. #define FGA_ICRLOCAL2 FGA_ADRS(0x294)   /* local 2 */
  65. #define FGA_ICRLOCAL3 FGA_ADRS(0x298)   /* local 3 */
  66. #define FGA_ICRLOCAL4 FGA_ADRS(0x29C)   /* local 4 */
  67. #define FGA_ICRLOCAL5 FGA_ADRS(0x2A0)   /* local 5 */
  68. #define FGA_ICRLOCAL6 FGA_ADRS(0x2A4)   /* local 6 */
  69. #define FGA_ICRLOCAL7 FGA_ADRS(0x2A8)   /* local 7 */
  70.     /* control registers */
  71. #define FGA_CTL1 FGA_ADRS(0x238)   /* arbitration */
  72. #define FGA_CTL2 FGA_ADRS(0x23C)   /* parity */
  73. #define FGA_CTL3  FGA_ADRS(0x250)   /* bus width,vec */
  74. #define FGA_CTL4 FGA_ADRS(0x254)   /* boot decode,ack */
  75. #define FGA_CTL5 FGA_ADRS(0x264)   /* mbox VME acc */
  76. #define FGA_CTL6 FGA_ADRS(0x270)   /* local DSACK */
  77. #define FGA_CTL7 FGA_ADRS(0x274)   /* VME timeout */
  78. #define FGA_CTL8 FGA_ADRS(0x278)   /* arb, acfail */
  79. #define FGA_CTL9 FGA_ADRS(0x27C)   /* sysReset */
  80. #define FGA_CTL10 FGA_ADRS(0x2C0)   /* memory size */
  81. #define FGA_CTL11 FGA_ADRS(0x2C4)   /* memory decode */
  82. #define FGA_CTL12 FGA_ADRS(0x32C)   /* VME release */
  83. #define FGA_CTL13 FGA_ADRS(0x350)   /* TEST ONLY!!! */
  84. #define FGA_CTL14 FGA_ADRS(0x354)  /* EPROM access */
  85. #define FGA_CTL15 FGA_ADRS(0x358)  /* slave rmw */
  86. #define FGA_CTL16 FGA_ADRS(0x35C)  /* bus unaligned rmw */
  87. /* timeout,parity    */
  88. #define FGA_LOCALIACK FGA_ADRS(0x334) /* IACK for L5-L8 */
  89. #define FGA_ENAMCODE FGA_ADRS(0x2B4) /* dual port RAM */
  90. #define FGA_MAINUM FGA_ADRS(0x2C8) /* A23-A16 LOCAL */
  91. #define FGA_MAINUU FGA_ADRS(0x2CC) /* A31-A24 LOCAL */
  92. #define FGA_VMEPAGE FGA_ADRS(0x200) /* A31-A28 VME */
  93. #define FGA_BOTTOMPAGEU FGA_ADRS(0x2D0) /* A27-A20 VME */
  94. #define FGA_BOTTOMPAGEL FGA_ADRS(0x2D4) /* A19-A12 VME */
  95. #define FGA_TOPPAGEU FGA_ADRS(0x2D8) /* A27-A20 VME */
  96. #define FGA_TOPPAGEL FGA_ADRS(0x2DC) /* A19-A12 VME */
  97. #define FGA_MYVMEPAGE FGA_ADRS(0x2FC) /* A15-A8 VME */
  98. #define FGA_FMBCTL FGA_ADRS(0x338) /* FMB control */
  99. #define FGA_FMBAREA FGA_ADRS(0x33C) /* A31-A24 VME */
  100. #define FGA_ISABORT FGA_ADRS(0x4C8) /* abort status */
  101. #define FGA_ISACFAIL FGA_ADRS(0x4CC) /* acfail status */
  102. #define FGA_ISSYSFAIL FGA_ADRS(0x4D0) /* sysfail status */
  103. #define FGA_MBOX0 FGA_ADRS(0x80000) /* Mailbox 0 */
  104. #define FGA_MBOX1 FGA_ADRS(0x80004)   /* Mailbox 1 */
  105. #define FGA_MBOX2 FGA_ADRS(0x80008)   /* Mailbox 2 */
  106. #define FGA_MBOX3 FGA_ADRS(0x8000C)   /* Mailbox 3 */
  107. #define FGA_MBOX4 FGA_ADRS(0x80010)   /* Mailbox 4 */
  108. #define FGA_MBOX5 FGA_ADRS(0x80014)   /* Mailbox 5 */
  109. #define FGA_MBOX6 FGA_ADRS(0x80018)   /* Mailbox 6 */
  110. #define FGA_MBOX7 FGA_ADRS(0x8001C)   /* Mailbox 7 */
  111.     /* auxiliary registers */
  112. #define FGA_AUXPINCTL FGA_ADRS(0x260)  /* control */
  113. #define FGA_AUXFIFWEX FGA_ADRS(0x268)  /* fifo write time */
  114. #define FGA_AUXFIFREX FGA_ADRS(0x26C)  /* fifo read time */
  115. #define FGA_AUXSRCSTART FGA_ADRS(0x340)  /* src start */
  116. #define FGA_AUXDSTSTART FGA_ADRS(0x344)  /* dst start */
  117. #define FGA_AUXSRCTERM  FGA_ADRS(0x348)  /* src termination */
  118. #define FGA_AUXDSTTERM  FGA_ADRS(0x34C)  /* dst termination */
  119.     /* timer register */
  120. #define FGA_TIM0PRELOAD FGA_ADRS(0x300)  /* time preload */
  121. #define FGA_TIM0CTL FGA_ADRS(0x310)  /* time control */
  122. #define FGA_TIM0COUNT FGA_ADRS(0xC00)  /* timer0 counter */
  123.     /* DMA registers */
  124. #define FGA_DMASRCATT FGA_ADRS(0x320)  /* DMA src attr */
  125. #define FGA_DMADSTATT FGA_ADRS(0x324)  /* DMA dst attr */
  126. #define FGA_DMAGENERAL FGA_ADRS(0x328)  /* DMA general */
  127. #define FGA_DMASRCDST FGA_ADRS(0x4EC)  /* DMA mode */
  128. #define FGA_DMASRCADR FGA_ADRS_INT(0x500)  /* DMA src addr */
  129. #define FGA_DMADSTADR FGA_ADRS_INT(0x504)  /* DMA dst addr */
  130. #define FGA_DMATRFCNT FGA_ADRS_INT(0x508)  /* DMA trans count */
  131.     /* interrupt status register */
  132. #define FGA_ISLOCAL0 FGA_ADRS(0x480)
  133. #define FGA_ISLOCAL1 FGA_ADRS(0x484)
  134. #define FGA_ISLOCAL2 FGA_ADRS(0x488)
  135. #define FGA_ISLOCAL3 FGA_ADRS(0x48C)
  136. #define FGA_ISLOCAL4 FGA_ADRS(0x490)
  137. #define FGA_ISLOCAL5 FGA_ADRS(0x494)
  138. #define FGA_ISLOCAL6 FGA_ADRS(0x498)
  139. #define FGA_ISLOCAL7 FGA_ADRS(0x49C)
  140. #define FGA_ISTIM0 FGA_ADRS(0x4A0)  /* timer0 */
  141. #define FGA_ISDMANORM FGA_ADRS(0x4B0)  /* DMA termination */
  142. #define FGA_ISDMAERR FGA_ADRS(0x4B4)  /* DMA error */
  143. #define FGA_ISFB0REF FGA_ADRS(0x4B8)  /* FMB0 refused */
  144. #define FGA_ISFB1REF FGA_ADRS(0x4BC)  /* FMB1 refused */
  145. #define FGA_ISFB0MES FGA_ADRS(0x4E0)  /* FMB0 message */
  146. #define FGA_ISFB1MES FGA_ADRS(0x4E4)  /* FMB1 message */
  147. #define FGA_ISPARITY FGA_ADRS(0x4C0)
  148. #define FGA_DMARUNCTL FGA_ADRS(0x4C4)
  149. #define FGA_ABORTPIN FGA_ADRS(0x4D4)
  150. #define FGA_ACFAILPIN FGA_ADRS(0x4D8)
  151. #define FGA_SFAILPIN FGA_ADRS(0x4DC)
  152.     /* reset status register */
  153. #define FGA_RSVMECALL FGA_ADRS(0x4F0)  /* VME */
  154. #define FGA_RSKEYRES FGA_ADRS(0x4F4)  /* KEY */
  155. #define FGA_RSCPUCALL FGA_ADRS(0x4F8)  /* CPU */
  156. #define FGA_RSLOCSW FGA_ADRS(0x4FC)  /* local switch */
  157. #define FGA_SOFTRESCALL FGA_ADRS(0xE00)  /* software */
  158.     /* miscellanous registers */
  159. #define FGA_LIOTIMING FGA_ADRS(0x330)  /* local IO timing */
  160. #define FGA_PTYLL FGA_ADRS(0x400)  /* PERR address */
  161. #define FGA_PTYLM FGA_ADRS(0x404)  /* PERR address */
  162. #define FGA_PTYUM FGA_ADRS(0x408)  /* PERR address */
  163. #define FGA_PTYUU FGA_ADRS(0x40C)  /* PERR address */
  164. #define FGA_PTYATT FGA_ADRS(0x410)  /* access status */
  165. #define FGA_IDENT FGA_ADRS(0x41C)  /* rev/ident reg */
  166. #define FGA_SPECIAL FGA_ADRS(0x420)  /* SPECIAL reg */
  167. #define FGA_SPECIALENA  FGA_ADRS(0x424)  /* SPECIAL enable */
  168. #define FGA_FMBCH0 FGA_ADRS(0xC0000)  /* FMB0 channel */
  169. #define FGA_FMBCH1 FGA_ADRS(0xC0004)  /* FMB1 channel*/
  170. /* Interrupt Vector Offsets */
  171. #define FGA_INT_MBOX0 0x00
  172. #define FGA_INT_MBOX1 0x01
  173. #define FGA_INT_MBOX2 0x02
  174. #define FGA_INT_MBOX3 0x03
  175. #define FGA_INT_MBOX4 0x04
  176. #define FGA_INT_MBOX5 0x05
  177. #define FGA_INT_MBOX6 0x06
  178. #define FGA_INT_MBOX7 0x07
  179. #define FGA_INT_TIMER 0x20
  180. #define FGA_INT_FMB1REF 0x24
  181. #define FGA_INT_FMB0REF 0x25
  182. #define FGA_INT_FMB1 0x26
  183. #define FGA_INT_FMB0 0x27
  184. #define FGA_INT_ABORT 0x28
  185. #define FGA_INT_ACFAIL 0x29
  186. #define FGA_INT_SYSFAIL 0x2a
  187. #define FGA_INT_DMAERR 0x2b
  188. #define FGA_INT_DMANORM 0x2c
  189. #define FGA_INT_PARITY 0x2d
  190. #define FGA_INT_LOCAL0 0x30
  191. #define FGA_INT_LOCAL1 0x31
  192. #define FGA_INT_LOCAL2 0x32
  193. #define FGA_INT_LOCAL3 0x33
  194. #define FGA_INT_LOCAL4 0x34 /* or external */
  195. #define FGA_INT_LOCAL5 0x35 /* or external */
  196. #define FGA_INT_LOCAL6 0x36 /* or external */
  197. #define FGA_INT_LOCAL7 0x37 /* or external */
  198. /* Register Masks */
  199.     /* ICR */
  200. #define FGA_ICR_ENABLE 0x8 /* enable interrupt */
  201. #define FGA_ICR_LEVEL_MASK 0x7 /* interrupt level mask */
  202.     /* following defines are only for extended interrupt control registers */
  203. #define FGA_ICR_AUTOCLEAR 0x10 /* autoclear interrupt */
  204. #define FGA_ICR_ACTIVITY 0x20 /* active high = 1 */
  205. #define FGA_ICR_EDGE 0x40 /* 1 = edge sensitive */
  206.     /* CTL1 */
  207. #define FGA_CTL1_COPROC_ASYNC 0x0 /* asynchronous */
  208. #define FGA_CTL1_COPROC_0WAIT 0x1 /* zero wait states */
  209. #define FGA_CTL1_COPROC_1WAIT 0x2 /* one wait states */
  210. #define FGA_CTL1_COPROC_2WAIT 0x3 /* two wait states */
  211. #define FGA_CTL1_SCON 0x4 /* internal arbiter select */
  212. #define FGA_CTL1_SUPERVISOR 0x8 /* supervisor access only */
  213.     /* CTL2 */
  214. #define FGA_CTL2_BYTESTROBE 0x1 /* all bytestrobe lines asserted on R */
  215. #define FGA_CTL2_CSDROPTION 0x2 /* CSDRP active in R/W cycles */
  216. #define FGA_CTL2_VMERESCALLENA 0x4 /* VME ResetCall enable */
  217. #define FGA_CTL2_PARITYOUTENA 0x8 /* parity enable */
  218.     /* CTL3 */
  219. #define FGA_CTL3_VMEBUS16 0x1 /* VME bus 16 bit wide */
  220. #define FGA_CTL3_VSBENA 0x2 /* VSB bus decoding enable */
  221. #define FGA_CTL3_VEC_MASK 0xc /* bit 7,6 of interrupt vec number */
  222.     /* CTL5 */
  223. #define FGA_CTL5_AUXOPTIONA 0x1 /* AUXOPTIONA enabled */
  224. #define FGA_CTL5_AUXOPTIONB 0x2 /* AUXOPTIONB enabled */
  225. #define FGA_CTL5_VME_A16_USER 0x4 /* VME access for mailbox int. */
  226. #define FGA_CTL5_VME_A16_SUP 0x8 /* VME access for mailbox int. */
  227. #define FGA_CTL5_VME_A16_BOTH 0xc /* VME access for mailbox int. */
  228.     /* CTL7 */
  229. #define FGA_CTL7_RAT_1US 0x1 /* VME release timeout */
  230. #define FGA_CTL7_RAT_2US 0x2 /* VME release timeout */
  231. #define FGA_CTL7_RAT_4US 0x3 /* VME release timeout */
  232. #define FGA_CTL7_RAT_8US 0x4 /* VME release timeout */
  233. #define FGA_CTL7_RAT_16US 0x5 /* VME release timeout */
  234. #define FGA_CTL7_RAT_32US 0x6 /* VME release timeout */
  235. #define FGA_CTL7_RAT_64US 0x7 /* VME release timeout */
  236. #define FGA_CTL7_NO_RELEASE_ON_BCLR 0x8 /* don't release bus on BCLR* */
  237.     /* CTL 8 */
  238. #define FGA_CTL8_ACFAIL 0x1 /* ACFAIL handler */
  239. #define FGA_CTL8_FAIR_ARB 0x2 /* VME bus fair arbitration */
  240. #define FGA_CTL8_SOFTSYSFAILINIT 0x4 /* Asserts SYSFLTOVME-pin to 0 */
  241. #define FGA_CTL8_BOOTSYSFAILINIT 0x8 /* INACTIVE */
  242.     /* CTL 9 */
  243. #define FGA_CTL9_0WAIT 0x1 /* EPROM wait states */
  244. #define FGA_CTL9_1WAIT 0x2 /* EPROM wait states */
  245. #define FGA_CTL9_2WAIT 0x3 /* EPROM wait states */
  246. #define FGA_CTL9_3WAIT 0x4 /* EPROM wait states */
  247. #define FGA_CTL9_4WAIT 0x5 /* EPROM wait states */
  248. #define FGA_CTL9_5WAIT 0x6 /* EPROM wait states */
  249. #define FGA_CTL9_6WAIT 0x7 /* EPROM wait states */
  250. #define FGA_CTL9_RESET_BUS 0x8 /* SYSRESET propagates to VMEBUS */
  251.     /* CTL 15 */
  252. #define FGA_CTL15_SHAREDRMW 0x1 /* slave RMW cycles are supported */
  253. #define FGA_CTL15_CINHLIO 0x2 /* do cache 0xff800000 - 0xfff00000 */
  254. #define FGA_CTL15_CINH16 0x4 /* do cache 0xfcxxxxxx, 0xfexxxxxx */
  255. #define FGA_CTL15_CINHOFFBOARD 0x8 /* do cache off board */
  256. #define FGA_CTL15_BURST_1WAIT 0x10 /* one waitstate burst cycles */
  257. #define FGA_CTL15_BURST_TWO 0x20 /* two transfers per burst */
  258. #define FGA_CTL15_VSB_TOUT_DIS 0x60 /* VSB bus error timeout disabled */
  259. #define FGA_CTL15_VSB_TOUT_16 0x80 /* VSB bus error timeout : 16 us */
  260. #define FGA_CTL15_VSB_TOUT_1000 0x40 /* VSB bus error timeout : 1000 us */
  261. #define FGA_CTL15_VSB_TOUT_64000 0x00 /* VSB bus error timeout : 64000 us */
  262.     /* LOCALIACK */
  263. #define FGA_LOCALIACK_INTERNAL 0x00 /* FGA responds with internal vector */
  264. #define FGA_LOCALIACK_NONE 0x01 /* FGA ignores interrupt */
  265. #define FGA_LOCALIACK_EXT_1US 0x02 /* FGA passes ext. vec., 1us response */
  266. #define FGA_LOCALIACK_EXT_500NS 0x03 /* FGA passes ext. vec.,.5us response */
  267. #define FGA_LOCALIACK_LOCAL5 0x03 /* LOCAL 5 MASK */
  268. #define FGA_LOCALIACK_LOCAL6 0x0c /* LOCAL 6 MASK */
  269. #define FGA_LOCALIACK_LOCAL7 0x30 /* LOCAL 7 MASK */
  270. #define FGA_LOCALIACK_LOCAL8 0xc0 /* LOCAL 8 MASK */
  271.     /* DMA Source/Destination Attribute Register */
  272. #define FGA_DMA_MAIN_MEMORY 0xc0 /* MAIN MEMORY 32 bit */
  273. #define FGA_DMA_SECOND_BUS_32 0xe0 /* Secondary Bus 32 bit */
  274. #define FGA_DMA_SECOND_BUS_16 0xe8 /* Secondary Bus 16 bit */
  275. #define FGA_DMA_SECOND_BUS_8 0xf0 /* Secondary Bus  8 bit */
  276. #define FGA_DMA_VMEBUS_32 0x00 /* VMEbus 32 bit */
  277. #define FGA_DMA_VMEBUS_16 0x80 /* VMEbus 16 bit */
  278. #define FGA_DMA_VMEBUS_8 0x40 /* VMEbus  8 bit */
  279. #define FGA_DMA_AUX_BUS 0xc8 /* AUX bus  8 bit */
  280.     /* DMA General Control Register */
  281. #define FGA_DMA_SRC_NO_COUNT 0x80 /* Source register does not count */
  282. #define FGA_DMA_SRC_COUNTS 0x00 /* Source register counts up */
  283. #define FGA_DMA_DST_NO_COUNT 0x40 /* Destination reg does not count */
  284. #define FGA_DMA_DST_COUNTS 0x00 /* Destination register counts up */
  285. #define FGA_DMA_ENABLE 0x01 /* enable DMA controller */
  286.     /* DMA Run Control Register */
  287. #define FGA_DMA_START 0x01 /* start the DMA operation */
  288. #define FGA_DMA_STOP 0x00 /* stop the DMA operation */
  289.     /* AUX Source/Destination Start Register */
  290. #define FGA_ASSACK_1CLK 0x00 /* AUXACK pin asserted... 1 clock */
  291. #define FGA_ASSACK_2CLK 0x10 /*   2 clockcycles */
  292. #define FGA_ASSACK_3CLK 0x20 /*  3 clockcycles */
  293. #define FGA_ASSACK_4CLK 0x30 /*  4 clockcycles */
  294. #define FGA_ASSACK_5CLK 0x40 /*  5 clockcycles */
  295. #define FGA_ASSACK_6CLK 0x50 /*  6 clockcycles */
  296. #define FGA_ASSACK_7CLK 0x60 /*  7 clockcycles */
  297. #define FGA_ASSACK_8CLK 0x70 /*  8 clockcycles */
  298. #define FGA_ASSACK_9CLK 0x80 /*  9 clockcycles */
  299. #define FGA_ASSACK_10CLK 0x90 /* 10 clockcycles */
  300. #define FGA_ASSACK_11CLK 0xa0 /* 11 clockcycles */
  301. #define FGA_ASSACK_12CLK 0xb0 /* 12 clockcycles */
  302. #define FGA_ASSACK_AUXREQ 0xc0 /* AUXREQ pin asserted */
  303. #define FGA_ASSACK_NORDY 0xd0 /* AUXREQ asserted, AUXRDY released */
  304. #define FGA_ASSACK_DATARD 0xe0 /* data read into FIFO */
  305. #define FGA_ASSACK_AUXRDY 0xf0 /* AUXRDY pin asserted */
  306. #define FGA_RDY_1CLK 0x00 /* READY after... 1 clockcycle */
  307. #define FGA_RDY_2CLK 0x01 /*  2 clockcycles */
  308. #define FGA_RDY_3CLK 0x02 /*  3 clockcycles */
  309. #define FGA_RDY_4CLK 0x03 /*  4 clockcycles */
  310. #define FGA_RDY_5CLK 0x04 /*  5 clockcycles */
  311. #define FGA_RDY_6CLK 0x05 /*  6 clockcycles */
  312. #define FGA_RDY_7CLK 0x06 /*  7 clockcycles */
  313. #define FGA_RDY_8CLK 0x07 /*  8 clockcycles */
  314. #define FGA_RDY_9CLK 0x08 /*  9 clockcycles */
  315. #define FGA_RDY_10CLK 0x09 /* 10 clockcycles */
  316. #define FGA_RDY_11CLK 0x0a /* 11 clockcycles */
  317. #define FGA_RDY_12CLK 0x0b /* 12 clockcycles */
  318. #define FGA_RDY_AUXREQ 0x0c /* AUXREQ pin asserted */
  319. #define FGA_RDY_NORDY 0x0d /* AUXREQ asserted, AUXRDY released */
  320. #define FGA_RDY_DATARD 0x0e /* data read into FIFO */
  321. #define FGA_RDY_AUXRDY 0x0f /* AUXRDY pin asserted */
  322.     /* AUX Source/Destination Term Register */
  323. #define FGA_RELACK_1CLK 0x00 /* AUXACK pin released... 1 clock */
  324. #define FGA_RELACK_2CLK 0x10 /* (after READY) 2 clockcycles */
  325. #define FGA_RELACK_3CLK 0x20 /*  3 clockcycles */
  326. #define FGA_RELACK_4CLK 0x30 /*  4 clockcycles */
  327. #define FGA_RELACK_5CLK 0x40 /*  5 clockcycles */
  328. #define FGA_RELACK_6CLK 0x50 /*  6 clockcycles */
  329. #define FGA_RELACK_7CLK 0x60 /*  7 clockcycles */
  330. #define FGA_RELACK_8CLK 0x70 /*  8 clockcycles */
  331. #define FGA_RELACK_9CLK 0x80 /*  9 clockcycles */
  332. #define FGA_RELACK_10CLK 0x90 /* 10 clockcycles */
  333. #define FGA_RELACK_11CLK 0xa0 /* 11 clockcycles */
  334. #define FGA_RELACK_12CLK 0xb0 /* 12 clockcycles */
  335. #define FGA_RELACK_AUXRDY 0xc0 /* AUXRDY pin asserted */
  336. #define FGA_RELACK_NOTALLOWED 0xd0 /*  DO NOT USE */
  337. #define FGA_RELACK_DATARD 0xe0 /*  data read into FIFO */
  338. #define FGA_RELACK_VALIDRDY 0xf0 /*  valid READY */
  339. #define FGA_NEWCYC_1CLK 0x00 /* NEWCYCLE starts... 1 clockcycle */
  340. #define FGA_NEWCYC_2CLK 0x01 /* (after READY) 2 clockcycles */
  341. #define FGA_NEWCYC_3CLK 0x02 /*  3 clockcycles */
  342. #define FGA_NEWCYC_4CLK 0x03 /*  4 clockcycles */
  343. #define FGA_NEWCYC_5CLK 0x04 /*  5 clockcycles */
  344. #define FGA_NEWCYC_6CLK 0x05 /*  6 clockcycles */
  345. #define FGA_NEWCYC_7CLK 0x06 /*  7 clockcycles */
  346. #define FGA_NEWCYC_8CLK 0x07 /*  8 clockcycles */
  347. #define FGA_NEWCYC_9CLK 0x08 /*  9 clockcycles */
  348. #define FGA_NEWCYC_10CLK 0x09 /* 10 clockcycles */
  349. #define FGA_NEWCYC_11CLK 0x0a /* 11 clockcycles */
  350. #define FGA_NEWCYC_12CLK 0x0b /* 12 clockcycles */
  351. #define FGA_NEWCYC_AUXRDY 0x0c /* AUXRDY pin asserted */
  352. #define FGA_NEWCYC_AUXACK 0x0d /*  AUXACK pin asserted */
  353. #define FGA_NEWCYC_DATARD 0x0e /*  data read into FIFO */
  354. #define FGA_NEWCYC_VALIDRDY 0x0f /*  valid READY */
  355.     /* AUX Pin Control */
  356. #define FGA_AUXPIN_AUTOREQ 0x08 /* autorequest enabled */
  357. #define FGA_AUXPIN_NOAUTOREQ 0x00 /* autorequest disabled */
  358. #define FGA_AUXPIN_RDY_HIGH 0x04 /* AUXRDY active high */
  359. #define FGA_AUXPIN_RDY_LOW 0x00 /* AUXRDY active low */
  360. #define FGA_AUXPIN_ACK_HIGH 0x02 /* AUXACK active high */
  361. #define FGA_AUXPIN_ACK_LOW 0x00 /* AUXACK active low */
  362. #define FGA_AUXPIN_REQ_HIGH 0x01 /* AUXREQ active high */
  363. #define FGA_AUXPIN_REQ_LOW 0x00 /* AUXREQ active low */
  364.     /* AUX FIFO Write/Read Timing Register */
  365. #define FGA_AUXFIFO_TIMING0 0x00 /* AUXFIFO Wr/Rd Timing 0 */
  366. #define FGA_AUXFIFO_TIMING1 0x01 /* AUXFIFO Wr/Rd Timing 1 */
  367. #define FGA_AUXFIFO_TIMING2 0x02 /* AUXFIFO Wr/Rd Timing 2 */
  368. #define FGA_AUXFIFO_TIMING3 0x03 /* AUXFIFO Wr/Rd Timing 3 */
  369. #define FGA_AUXFIFO_TIMING4 0x04 /* AUXFIFO Wr/Rd Timing 4 */
  370. #define FGA_AUXFIFO_TIMING5 0x05 /* AUXFIFO Wr/Rd Timing 5 */
  371. #define FGA_AUXFIFO_TIMING6 0x06 /* AUXFIFO Wr/Rd Timing 6 */
  372. #define FGA_AUXFIFO_TIMING7 0x07 /* AUXFIFO Wr/Rd Timing 7 */
  373. #define FGA_AUXFIFO_TIMING8 0x08 /* AUXFIFO Wr/Rd Timing 8 */
  374. #define FGA_AUXFIFO_TIMING9 0x09 /* AUXFIFO Wr/Rd Timing 9 */
  375. #define FGA_AUXFIFO_TIMING10 0x0a /* AUXFIFO Wr/Rd Timing 10 */
  376. #define FGA_AUXFIFO_TIMING11 0x0b /* AUXFIFO Wr/Rd Timing 11 */
  377. #define FGA_AUXFIFO_TIMING12 0x0c /* AUXFIFO Wr/Rd Timing 12 */
  378. #define FGA_AUXFIFO_TIMING13 0x0d /* AUXFIFO Wr/Rd Timing 13 */
  379. #define FGA_AUXFIFO_TIMING14 0x0e /* AUXFIFO Wr/Rd Timing 14 */
  380. #define FGA_AUXFIFO_TIMING15 0x0f /* AUXFIFO Wr/Rd Timing 15 */
  381.     /* ENAMCODE */
  382. #define FGA_ENAMCODE_EXTUSRDAT_R 0x2 /* DPR R  access with AM 0x09 */
  383. #define FGA_ENAMCODE_EXTUSRDAT_RW 0x3 /* DPR RW access with AM 0x09 */
  384. #define FGA_ENAMCODE_EXTUSRPGM_R 0x8 /* DPR R  access with AM 0x0a */
  385. #define FGA_ENAMCODE_EXTUSRPGM_RW 0xc /* DPR RW access with AM 0x0a */
  386. #define FGA_ENAMCODE_EXTSUPDAT_R 0x20 /* DPR R  access with AM 0x0d */
  387. #define FGA_ENAMCODE_EXTSUPDAT_RW 0x30 /* DPR RW access with AM 0x0d */
  388. #define FGA_ENAMCODE_EXTSUPPGM_R 0x80 /* DPR R  access with AM 0x0e */
  389. #define FGA_ENAMCODE_EXTSUPPGM_RW 0xc0 /* DPR RW access with AM 0x0e */
  390.     /* FMBCTL */
  391. #define FGA_FMBCTL_SLOT_MASK 0x1f /* slot # mask */
  392. #define FGA_FMBCTL_CHANNEL0 0x20 /* channel 0 enabled */
  393. #define FGA_FMBCTL_CHANNEL1 0x40 /* channel 1 enabled */
  394. #define FGA_FMBCTL_BOTH 0x80 /* FMB access w/ AM 0x0d/0x09 */
  395. /* function declarations */
  396. #ifndef _ASMLANGUAGE
  397. #if defined(__STDC__) || defined(__cplusplus)
  398. #if CPU_FAMILY == I960
  399. IMPORT  STATUS  sysIntDisable ();
  400. IMPORT  STATUS  sysIntEnable ();
  401. IMPORT int sysBusIntAck ();
  402. IMPORT  STATUS  sysBusIntGen ();
  403. IMPORT  STATUS  sysMailboxEnable ();
  404. #else /* CPU_FAMILY == I960 */
  405. IMPORT  STATUS  sysIntDisable (int intLevel);
  406. IMPORT  STATUS  sysIntEnable (int intLevel);
  407. IMPORT  int sysBusIntAck (int intLevel);
  408. IMPORT  STATUS  sysBusIntGen (int level, int vector);
  409. IMPORT  STATUS  sysMailboxEnable (char *mailboxAdrs);
  410. #endif  /* CPU_FAMILY == I960 */
  411. IMPORT  STATUS  sysMailboxConnect (FUNCPTR routine, int arg);
  412. #else /* __STDC__ */
  413. IMPORT  STATUS  sysIntDisable ();
  414. IMPORT  STATUS  sysIntEnable ();
  415. IMPORT  int sysBusIntAck ();
  416. IMPORT  STATUS  sysBusIntGen ();
  417. IMPORT  STATUS  sysMailboxEnable ();
  418. IMPORT  STATUS  sysMailboxConnect ();
  419. #endif  /* __STDC__ */
  420. #endif  /* _ASMLANGUAGE */
  421. #ifdef __cplusplus
  422. }
  423. #endif
  424. #endif /* __INCfga002h */