Rev 19 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
19 | f9daq | 1 | #ifndef __PCIIF_H__ |
2 | //----------------------------------------------------------------------- |
||
3 | // Address definitions of PCI-VME interface designed by A.Rausch |
||
4 | // |
||
5 | // (c) 1999-2004 ARW Elektronik |
||
6 | // |
||
7 | // this source code is published under GPL (Open Source). You can use, redistrubute and |
||
8 | // modify it unless this header is not modified or deleted. No warranty is given that |
||
9 | // this software will work like expected. |
||
10 | // This product is not authorized for use as critical component in life support systems |
||
11 | // wihout the express written approval of ARW Elektronik Germany. |
||
12 | // |
||
13 | // Please announce changes and hints to ARW Elektronik |
||
14 | // |
||
15 | // $Log: pciif.h,v $ |
||
16 | // Revision 1.3 2004/07/24 07:07:26 klaus |
||
17 | // Update copyright to 2004 |
||
18 | // |
||
19 | // Revision 1.2 2003/11/15 19:12:26 klaus |
||
20 | // Update copyright to 2003 |
||
21 | // |
||
22 | // Revision 1.1.1.1 2003/11/14 23:16:33 klaus |
||
23 | // First put into repository |
||
24 | // |
||
25 | // Revision 1.3 2002/10/27 16:17:48 klaus |
||
26 | // Typing bug fixed caused at log addition |
||
27 | // |
||
28 | // Revision 1.2 2002/10/27 16:11:02 klaus |
||
29 | // Added CVS log into header |
||
30 | // |
||
31 | // what who when |
||
32 | // first parts AR 24.11.1997 |
||
33 | // converted to new address layout AR 18.05.1998 |
||
34 | // next address layout conversion AR 27.06.1998 |
||
35 | // no pointer usage at definitions AR 20.02.1999 |
||
36 | // first release AR 20.02.1999 |
||
37 | // corrected global and local reset AR 18.04.1999 |
||
38 | // |
||
39 | |||
40 | #include <vic.h> |
||
41 | |||
42 | /*-----------------------------------------------------------------------*/ |
||
43 | /* all addresses relative to PCI-Window */ |
||
44 | |||
45 | /*------------- addresses of vmemm local devices ------------------------*/ |
||
46 | #define CSR (DWORD)0x0000 /* control status register */ |
||
47 | #define VICRES (DWORD)0x0004 /* VIC reset register / interrupt status */ |
||
48 | #define ADRHL (DWORD)0x0008 /* AdrH and AdrL as long */ |
||
49 | #define VICBASE (DWORD)0x0400 /* base of VIC68A */ |
||
50 | #define VECBASE (DWORD)0x0800 /* base of vector registers */ |
||
51 | #define VMEBASE (DWORD)0x1000 /* base of 4k VME-BUS window */ |
||
52 | |||
53 | /*---------- parts of addresses derived from above ----------------------*/ |
||
54 | #define IVEC1 (DWORD)(VECBASE + 3) /* IACK 1 vector */ |
||
55 | #define IVEC2 (DWORD)(VECBASE + 5) /* IACK 2 vector */ |
||
56 | #define IVEC3 (DWORD)(VECBASE + 7) /* IACK 3 vector */ |
||
57 | #define IVEC4 (DWORD)(VECBASE + 9) /* IACK 4 vector */ |
||
58 | #define IVEC5 (DWORD)(VECBASE + b) /* IACK 5 vector */ |
||
59 | #define IVEC6 (DWORD)(VECBASE + d) /* IACK 6 vector */ |
||
60 | #define IVEC7 (DWORD)(VECBASE + f) /* IACK 7 vector */ |
||
61 | |||
62 | #define ADRL (DWORD)ADRHL /* word access addr. VME-addr */ |
||
63 | #define ADRH (DWORD)(ADRHL + 2) |
||
64 | |||
65 | /*--------- address mask ------------------------------------------------*/ |
||
66 | #define VME_ADR_MASK (DWORD)0x00000FFF /* masks lower part of address */ |
||
67 | |||
68 | /*--------- some masks in CSR -------------------------------------------*/ |
||
69 | #define FLAG_RMC (WORD)0x0001 /* set = next cycle is RMC */ |
||
70 | #define FLAG_BLT (WORD)0x0002 /* don't use it. must be 0 */ |
||
71 | #define FLAG_WORD (WORD)0x0004 /* it is a word wide interface */ |
||
72 | #define FLAG_SYSCTL (WORD)0x0008 /* the system contrl. is enabled */ |
||
73 | #define MASK_MODNR (WORD)0x00F0 /* the mask to get the module No */ |
||
74 | #define MASK_FPGA (WORD)0x0F00 /* the mask to get the FPGA rev. */ |
||
75 | #define MASK_MODTYPE (WORD)0xF000 /* the mask to get type of module*/ |
||
76 | |||
77 | /*---------- action commands in VICRES -----------------------------------*/ |
||
78 | #define GLOBAL_RESET (WORD)0x000A /* write this to reset the intrfc */ |
||
79 | #define LOCAL_RESET (WORD)0x0005 /* generate a local reset */ |
||
80 | |||
81 | /*---------- release und inhibit into 0x50 of PLX ------------------------*/ |
||
82 | #define RELEASE_VMEMM (WORD)0x4180 /* write this to release access ..*/ |
||
83 | #define INHIBIT_VMEMM (WORD)0x4080 /* write this to inhibit access ..*/ |
||
84 | #define ENABLE_PCIADA_IRQS (WORD)0x0049 /* enable PCIADA IRQs */ |
||
85 | #define DISABLE_PCIADA_IRQS (WORD)0x0009 /* disable PCIADA IRQs */ |
||
86 | |||
87 | #define __PCIIF_H__ |
||
88 | #endif |