Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:53

0001 /**
0002  *  @file
0003  *
0004  *  @ingroup shared_vmeamdefs
0005  *
0006  *  @brief vxworks compatible addressing modes
0007  */
0008 
0009 #ifndef VME_AM_DEFINITIONS_H
0010 #define VME_AM_DEFINITIONS_H
0011 
0012 /*
0013  * Authorship
0014  * ----------
0015  * This software was created by
0016  *     Till Straumann <strauman@slac.stanford.edu>, 2002-2007,
0017  *     Stanford Linear Accelerator Center, Stanford University.
0018  *
0019  * Acknowledgement of sponsorship
0020  * ------------------------------
0021  * This software was produced by
0022  *     the Stanford Linear Accelerator Center, Stanford University,
0023  *     under Contract DE-AC03-76SFO0515 with the Department of Energy.
0024  *
0025  * Government disclaimer of liability
0026  * ----------------------------------
0027  * Neither the United States nor the United States Department of Energy,
0028  * nor any of their employees, makes any warranty, express or implied, or
0029  * assumes any legal liability or responsibility for the accuracy,
0030  * completeness, or usefulness of any data, apparatus, product, or process
0031  * disclosed, or represents that its use would not infringe privately owned
0032  * rights.
0033  *
0034  * Stanford disclaimer of liability
0035  * --------------------------------
0036  * Stanford University makes no representations or warranties, express or
0037  * implied, nor assumes any liability for the use of this software.
0038  *
0039  * Stanford disclaimer of copyright
0040  * --------------------------------
0041  * Stanford University, owner of the copyright, hereby disclaims its
0042  * copyright and all other rights in this software.  Hence, anyone may
0043  * freely use it for any purpose without restriction.
0044  *
0045  * Maintenance of notices
0046  * ----------------------
0047  * In the interest of clarity regarding the origin and status of this
0048  * SLAC software, this and all the preceding Stanford University notices
0049  * are to remain affixed to any copy or derivative of this software made
0050  * or distributed by the recipient and are to be affixed to any copy of
0051  * software made or distributed by the recipient that contains a copy or
0052  * derivative of this software.
0053  *
0054  * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
0055  */
0056 
0057 /**
0058  *  @defgroup shared_vmeamdefs VME_AM_DEFS
0059  *
0060  *  @ingroup shared_vmeuniverse
0061  *
0062  *  @brief 64-bit *addresses* are not supported [data are].
0063  */
0064 
0065 #ifndef VME_AM_STD_SUP_BLT
0066 #define VME_AM_STD_SUP_BLT          0x3f
0067 #endif
0068 #ifndef VME_AM_STD_SUP_ASCENDING
0069 #define VME_AM_STD_SUP_ASCENDING    0x3f
0070 #endif
0071 #ifndef VME_AM_STD_SUP_PGM
0072 #define VME_AM_STD_SUP_PGM          0x3e
0073 #endif
0074 #ifndef VME_AM_STD_SUP_MBLT
0075 #define VME_AM_STD_SUP_MBLT         0x3c
0076 #endif
0077 #ifndef VME_AM_STD_USR_BLT
0078 #define VME_AM_STD_USR_BLT          0x3b
0079 #endif
0080 #ifndef VME_AM_STD_USR_ASCENDING
0081 #define VME_AM_STD_USR_ASCENDING    0x3b
0082 #endif
0083 #ifndef VME_AM_STD_USR_PGM
0084 #define VME_AM_STD_USR_PGM          0x3a
0085 #endif
0086 #ifndef VME_AM_STD_SUP_DATA
0087 #define VME_AM_STD_SUP_DATA         0x3d
0088 #endif
0089 #ifndef VME_AM_STD_USR_DATA
0090 #define VME_AM_STD_USR_DATA         0x39
0091 #endif
0092 #ifndef VME_AM_STD_USR_MBLT
0093 #define VME_AM_STD_USR_MBLT         0x38
0094 #endif
0095 #ifndef VME_AM_EXT_SUP_BLT
0096 #define VME_AM_EXT_SUP_BLT          0x0f
0097 #endif
0098 #ifndef VME_AM_EXT_SUP_ASCENDING
0099 #define VME_AM_EXT_SUP_ASCENDING    0x0f
0100 #endif
0101 #ifndef VME_AM_EXT_SUP_PGM
0102 #define VME_AM_EXT_SUP_PGM          0x0e
0103 #endif
0104 #ifndef VME_AM_EXT_SUP_DATA
0105 #define VME_AM_EXT_SUP_DATA         0x0d
0106 #endif
0107 #ifndef VME_AM_EXT_SUP_MBLT
0108 #define VME_AM_EXT_SUP_MBLT         0x0c
0109 #endif
0110 #ifndef VME_AM_EXT_USR_BLT
0111 #define VME_AM_EXT_USR_BLT          0x0b
0112 #endif
0113 #ifndef VME_AM_EXT_USR_ASCENDING
0114 #define VME_AM_EXT_USR_ASCENDING    0x0b
0115 #endif
0116 #ifndef VME_AM_EXT_USR_PGM
0117 #define VME_AM_EXT_USR_PGM          0x0a
0118 #endif
0119 #ifndef VME_AM_EXT_USR_DATA
0120 #define VME_AM_EXT_USR_DATA         0x09
0121 #endif
0122 #ifndef VME_AM_EXT_USR_MBLT
0123 #define VME_AM_EXT_USR_MBLT         0x08
0124 #endif
0125 #ifndef VME_AM_2eVME_6U
0126 #define VME_AM_2eVME_6U             0x20
0127 #endif
0128 #ifndef VME_AM_2eVME_3U
0129 #define VME_AM_2eVME_3U             0x21
0130 #endif
0131 #ifndef VME_AM_CSR
0132 #define VME_AM_CSR                  0x2f
0133 #endif
0134 #ifndef VME_AM_SUP_SHORT_IO
0135 #define VME_AM_SUP_SHORT_IO         0x2d
0136 #endif
0137 #ifndef VME_AM_USR_SHORT_IO
0138 #define VME_AM_USR_SHORT_IO         0x29
0139 #endif
0140 #ifndef VME_AM_IS_SHORT
0141 #define VME_AM_IS_SHORT(a)          (((a) & 0x30) == 0x20)
0142 #endif
0143 #ifndef VME_AM_IS_STD
0144 #define VME_AM_IS_STD(a)            (((a) & 0x30) == 0x30)
0145 #endif
0146 #ifndef VME_AM_IS_EXT
0147 #define VME_AM_IS_EXT(a)            (((a) & 0x30) == 0x00)
0148 #endif
0149 #ifndef VME_AM_IS_SUP
0150 #define VME_AM_IS_SUP(a)            ((a)  & 4)
0151 #endif
0152 
0153 /* Mask for standard address modifiers */
0154 
0155 #ifndef VME_AM_MASK
0156 #define VME_AM_MASK                 0x3f
0157 #endif
0158 
0159 /* Hint that a window is mapping memory; the
0160  * driver may assume it to be safe to enable decoupled
0161  * cycles, caching and the like...
0162  */
0163 #ifndef VME_AM_IS_MEMORY
0164 #define VME_AM_IS_MEMORY            (1<<8)
0165 #endif
0166 
0167 /* I don't know AMs for 2eSST so we use some extra bits;
0168  * HOWEVER: these are just qualifiers to the VME_AM_2eVME_xx modes
0169  *          i.e., if you want 2eSST you must also select 2eVME...
0170  */
0171 
0172 /* 2eSST broadcast; you still need to set one of the speed bits */
0173 #define VME_AM_2eSST_BCST           (1<<9)
0174 /* Low speed (driver specific) */
0175 #define VME_AM_2eSST_LO             (1<<10)
0176 /* Mid speed (driver specific) */
0177 #define VME_AM_2eSST_MID            (2<<10)
0178 /* High speed (driver specific) */
0179 #define VME_AM_2eSST_HI             (3<<10)
0180 
0181 #define VME_AM_IS_2eSST(am)         ((am) & (3<<10))
0182 
0183 /* Use 8/16/32-bit transfers for coupled- or BLT cycles
0184  * (MBLT, 2exxx are probably always 64-bit)
0185  */
0186 #define VME_MODE_DBW_MSK            (3<<12)
0187 #define VME_MODE_DBW8               (1<<12)
0188 #define VME_MODE_DBW16              (2<<12)
0189 #define VME_MODE_DBW32              (3<<12)
0190 
0191 /* Unused Flags 1<<14 .. 1<<23  are reserved
0192  *
0193  * (20-23 used by DMA API).
0194  * Flags 1<<24 .. 1<<31 are for driver specific options
0195  */
0196 
0197 
0198 #endif