Change Log | |
April 29,2004 | Initial version Ron Fox fox@nscl.msu.edu |
This application note describes considerations you should take into account when assigning VME addresses to modules in the NSCL data acquisition system.
This section gives a simplified description of how addressing on the VME bus works. The VME bus actually supports a much richer set of addressing models than those described here, however the description in this section suffices for the bulk of the VME configurations you will need to deal with at the NSCL.
The VME bus should be thought of as three large chunks of memory. Which of the three chunks of memory is selected at any given time is determined by the bus operation's address modifier or AM. Each chunk of memory (selected by an address modifier) is called an address space. Within each chunk of memory, each byte has a unique address.
The names, shorthand names and characteristics of each address space are shown in the table below:
Space name | Shorthand | Characteristics |
Short IO | A16 | 16 bits of address provide up to 65K bytes of address space intended to be used by I/O modules. Each module lives on a 256 byte boundary |
Standard | A24 | 24 bits of address allow up to 16Mbytes of address space. |
Extended | A32 | 32 bits of address allow up to 4Gbytes of address space. |
Note again, that a location, say 0x1234 in A16 space is different from the same location 0x1234 in A24 space which in turn selects a different location in A32 space. The address spaces are all distinct and don't overlap unless a specific module chooses to accept addresses with multiple address modifiers.
There are several modules that may appear in your system that have a very standard set of addresses:
The V262 is in A24 space at base address 0x444400 and requires 256 bytes of address space.
The CES CBD 8210 CAMAC interface is in A24 space, with a base address that depends on the branch number set in its front panel thumbwheels:
Branch | Address range. |
0 | 0x800000 - 0x87ffff |
1 | 0x880000 - 0x8fffff |
2 | 0x900000 - 0x97ffff |
3 | 0x980000 - 0x9fffff |
4 | 0xa00000 - 0x97ffff |
5 | 0xa80000 - 0xafffff |
6 | 0xb00000 - 0xb7ffff |
7 | 0xb80000 - 0xbfffff |
The Wiener CAMAC interface may not be used in conjunction with the CES CBD 8210 interface and, due to the fact that the 8210 is an "end of life" module it is suggested that all new systems using CAMAC use this interface instead. While the Wiener CAMAC interface has a quite flexible set of base addresses (all in the A24 space), in order to retain source compatibility with the camac support macros developed for the CBD8210, we limit the set of base addresses you should use for this module. The switch settings for this module are described completely in its application note at: http://docs.nscl.msu.edu/daq/appnotes/WienerNotes.txt
The table below summarizes the set of addresses in A24 space taken up by this module (we support up to 8 crates in a VME bus).
Crate | Address range |
0 | 0x800000 - 0x807fff |
1 | 0x808000 - 0x80ffff |
2 | 0x810000 - 0x817fff |
3 | 0x818000 - 0x81ffff |
4 | 0x820000 - 0x827fff |
5 | 0x828000 - 0x82ffff |
6 | 0x830000 - 0x837fff |
7 | 0x838000 - 0x83ffff |
Physicists used to working with CAMAC may have difficulty remembering to set address switches or jumpers. This is especially true when replacing a suspect module deep into the midnight shift. The geographical addressing that CAMAC supports is a much simpler scheme.
CERN has defined several extensions to the VME bus that are carried on a third (middle) connector on the backplane. One of these extensions encodes the slot number on a set of pins in this middle connector. Modules can use this encoding to set their base addresssing.
Note that since that time, the VME standards committee has defined a newer VME standard called VME64 that supports 64 bit addressing. An extension to that standard called VME64x also supports geographical addressing, in a different way.
At this time, all of the backplanes in use in NSCL experimental setups support the CERN style geographical addressing extensions. Where modules provide support for it, we encourage the use of geographical addressing as this will simplify your setup. At this time the following families of modules we have in the pool that support CERN style geographical addressing extensions:
Due to hardware differences, two schemes are used to handle these modules.
The CAEN modules only support a subset of functionality needed to set them up when geographically addressed. One of the setup operations possible, however is to program an A32 base address for the module. Once accessed via this programmed A32 base address, the module can be fully used. Therefore, when using the CAEN modules it is important to recognize that they will occupy two regions of address space: an A24 space determined by the module's slot, and an A32 space determined by the software that sets up the module.
These address ranges are shown in the table below:
Slot | Geographical range | A32 address range |
2 (*) | 0x100000-0x108fff | 0x02000000 - 0x02008fff |
3 | 0x180000-0x188fff | 0x03000000 - 0x03008fff |
n | n<<19 - n<<19+0x8fff | n << 24 - n << 24 + 0x8fff |
20 | 0xa00000-0xa08fff | 0x14000000 - 0x14008fff |
(*) - Slot 1 of a VME bus must always be occupied by a system controller module. At the NSCL, this role is fulfilled by the SBS/Bit3 PCI/VME bus adapter.
Slot | Address range (always geographical) |
2(*) | 0x10000000 - 0x10ffffff |
3 | 0x18000000 - 0x18ffffff |
4 | 0x20000000 - 0x20ffffff |
... | ... |
n | n << 27 - n << 27 + 0xffffff |
20 | 0xa0000000 - 0xa0ffffff |
The purpose of this section is to provide an annotated map of the VME bus showing the 'danger zones'. When laying out a VME bus address map for your application you have two choices:
Range | Usage |
0x0000 - 0xffff | Uncommitted |
In the table below note that:
Range | Usage |
0x000000 - 0x0fffff | Uncommitted |
0x100000 - 0x108fff | CAEN Geo slot 2 |
0x109000 - 0x17ffff | Uncommitted |
0x180000 - 0x188fff | CAEN Geo slot 3 |
0x189fff - 0x1fffff | Uncomitted |
0x200000 - 0x208fff | CAEN Geo slot 4 |
0x209000 - 0x27ffff | Uncommitted |
0x280000 - 0x288fff | CAEN Geo slot 5 |
0x289fff - 0x2fffff | Uncommitted |
0x300000 - 0x308fff | CAEN Geo slot 6 |
0x309000 - 0x37ffff | Uncommitted |
0x380000 - 0x388fff | CAEN Geo slot 7 |
0x389fff - 0x3fffff | Uncommitted |
0x400000 - 0x408fff | CAEN Geo slot 8 |
0x409fff - 0x443fff | Uncommitted [a bit more really] |
0x444400 - 0x4444ff | CAEN V262 IO (trigger) |
0x444500 - 0x47ffff | Uncommitted |
0x480000 - 0x488fff | CAEN Geo slot 9 |
0x489000 - 0x4fffff | Uncommitted. |
0x500000 - 0x508fff | CAEN Geo slot 10 |
0x509000 - 0x57ffff | Uncommitted. |
0x580000 - 0x588fff | CAEN Geo slot 11 |
0x589000 - 0x5fffff | Uncommitted |
0x600000 - 0x608fff | CAEN Geo Slot 12 |
0x609000 - 0x67ffff | Uncommitted |
0x680000 - 0x688fff | CAEN Geo Slot 13 |
0x689000 - 0x6fffff | Uncommitted |
0x700000 - 0x708fff | CAEN Geo slot 14 |
0x709000 - 0x77ffff | Uncomittted |
0x780000 - 0x788fff | CAEN Geo slot 15 |
0x800000 - 0x808fff | CAEN Geo slot 16 OR CES Branch 0 OR Wiener Crate 0 (to 0x807fff) and Wiener Crate 1 (from 0x808000) |
0x809000 - 0x808fff | Wiener Crate 1 (from 0x808000) OR CES Branch 0 |
0x810000 - 0x817fff | Wiener Crate 2 OR CES Branch 0 |
0x818000 - 0x81ffff | Wiener Crate 3 OR CES Branch 0 |
0x820000 - 0x827fff | Wiener crate 4 OR CES Branch 0 |
0x828000 - 0x82ffff | Wiener Crate 5 OR CES Branch 0 |
0x830000 - 0x837fff | Wiener crate 6 OR CES Branch 0 |
0x838000 - 0x83ffff | Wiener crate 7 OR CES Branch 0 |
0x840000 - 0x87ffff | CES Branch 0 |
0x880000 - 0x888fff | CAEN Geo slot 17 OR CES Branch 1 |
0x889000 - 0x8fffff | CES Branch 1 |
0x900000 - 0x908fff | CAEN Geo slot 18 OR CES Branch 2 |
0x909000 - 0x97ffff | CES Branch 2 |
0x989000 - 0x9fffff | CES Branch 3 |
0xa00000 - 0xa08fff | CAEN Geo slot 20 OR CES Branch 4 |
0xa09000 - 0xa7ffff | CES Branch 4 |
0xa80000 - 0xafffff | CES Branch 5 |
0xb00000 - 0xb7ffff | CES Branch 6 |
0xb80000 - 0xbfffff | CES Branch 7 |
0xc00000 - 0xffffff | Uncommitted |
Some observations:
0x00000000 - 0x01ffffff | Uncommitted |
0x02000000 - 0x02008fff | CAEN slot 2 programmed A32 space |
0x02009000 - 0x02ffffff | Uncommitted |
0x03000000 - 0x03008fff | CAEN Slot 3 programmed A32 space |
0x03009000 - 0x03ffffff | Uncommitted. |
0x04000000 - 0x04008fff | CAEN Slot 4 programmed A32 space |
0x04009000 - 0x04ffffff | Uncommitted |
0x05000000 - 0x05008fff | CAEN Slot 5 programmed A32 space |
0x05009000 - 0x05ffffff | Uncommitted . |
0x06000000 - 0x06008fff | CAEN Slot 6 programmed A32 space |
0x0600900 - 0x06ffffff | Uncommitted . |
0x0700000 - 0x07008fff | CAEN Slot 7 programmed A32 space |
0x07009000 - 0x07ffffff | Uncommitted |
0x08000000 - 0x08008fff | CAEN slot 8 programmed A32 space |
0x08009000 - 0x08ffffff | Uncommitted . |
0x09000000 - 0x09008fff | CAEN Slot 9 programmed A32 space |
0x09009000 - 0x09ffffff | Uncommitted |
0x0a000000 - 0x0a008fff | CAEN Slot 10 programmed A32 space |
0x0a009000 - 0x0affffff | Uncommitted |
0x0b000000 - 0x0b08ffff | CAEN Slot 11 programmed A32 space |
0x0b009000 - 0x0bffffff | Uncommitted |
0x0c000000 - 0x0c008fff | CAEN Slot 12 programmed A32 space |
0x0c009000 - 0x0cffffff | Uncommitted |
0x0d000000 - 0x0d008fff | CAEN slot 13 programmed a32 space |
0x0d009000 - 0x0dffffff | Uncommitted . |
0x0e000000 - 0x0e008fff | CAEN Slot 14 programmed A32 space |
0x0e009000 - 0x0effffff | Uncommitted |
0x0f000000 - 0x0f008fff | CAEN Slot 15 programmed A32 space |
0x0f009000 - 0x0fffffff | Uncommitted |
0x10000000 - 0x10008fff | CAEN Slot 16 programmed A32 space OR JTEC XLM slot 2 |
0x10009000 - 0x10ffffff | JTEC XLM Slot 2 |
0x11000000 - 0x11008fff | CAEN Slot 17 programmed A32 space OR JTEC XLM Slot 2 |
0x11009000 - 0x11ffffff | JTEC XLM Slot 2 |
0x12000000 - 0x12008fff | CAEN Slot 18 programmed A32 space OR JTEC XLM Slot 2 |
0x12009000 - 0x12ffffff | JTEC XLM Slot 2 |
0x13000000 - 0x13008fff | CAEN Slot 19 programmed A32 space OR JTEC XLM Slot 2 |
0x13009000 - 0x13ffffff | JTEC XLM Slot 2 |
0x14000000 - 0x14008fff | CAEN Slot 20 programmed A32 space OR |
0x14009fff - 0x17ffffff | JTEC XLM Slot 2 |
0x18000000 - 0x1fffffff | JTEC XLM Slot 3 |
0x20000000 - 0x27ffffff | JTEC XLM Slot 4 |
0x28000000 - 0x2fffffff | JTEC XLM Slot 5 |
0x30000000 - 0x37ffffff | JTEC XLM Slot 6 |
0x38000000 - 0x3fffffff | JTEC XLM slot 7 |
0x40000000 - 0x47ffffff | JTEC XLM Slot 8 |
0x48000000 - 0x4fffffff | JTEC XLM Slot 9 |
0x50000000 - 0x57ffffff | JTEC XLM Slot 10 |
0x58000000 - 0x5fffffff | JTEC XLM Slot 11 |
0x60000000 - 0x67ffffff | JTEC XLM Slot 12 |
0x68000000 - 0x6fffffff | JTEC XLM Slot 13 |
0x70000000 - 0x77ffffff | JTEC XLM Slot 14 |
0x78000000 - 0x7fffffff | JTEC XLM Slot 15 |
0x80000000 - 0x87ffffff | JTEC XLM Slot 16 |
0x88000000 - 0x8fffffff | JTEC XLM Slot 17 |
0x90000000 - 0x97ffffff | JTEC XLM Slot 18 |
0x98000000 - 0x9fffffff | JTEC XLM Slot 19 |
0xa0000000 - 0xa7ffffff | JTEC XLM Slot 20 |
0xa8000000 - 0xffffffff | Uncommitted. |
In this section we layout a sample configuration, and document the resulting address map. Suppose we have an experiment that will require 64 channels of ADC (2 x CAEN V785), 64 channels of TDC (2 x CAEN V775), and 32 channels of QDC (1 x CAEN V892. We will have a programmable trigger that is managed by a pair of JTEC XLM modules as well as a CAEN V 262 IO module to accept the final trigger decision. We will have 32 channels of scaler that are readout via an SIS 3820 scaler. In order to avoid the potential address conflicts between The CAEN digitizers and the JTEC XLM, we'll put the XLM modules in slot2 19 and 20. We'll start inserting the CAEN digitizers at the left of the crate:
CAEN V785's in slots 2,3 CAEN V775's in slots 4,5 CAEN V892 in slot 6
The SIS 3820 is an A32 only module that requires a 16Mbyte chunk of address space. The switches allow us to set the top two hexadecimal digits of the module's base address. While the module supports Geographical addressing, it uses the VME 64x method which is not compatible with the NSCL backplanes. We will locate the SIS3820 at the bottom of the large uncomitted address space past the 'last' XLM (base address 0xa8000000 (switches set: J1 EN_A32 in , EN_GEO out, Rotary switches: SW4 Set to A and SW 3 set to 8). This module can be inserted in any unused slot. We'll choose slot 10.
This gives us the following address maps
A24 space has:
Range: | Contents |
0x000000 - 0x0fffff | Unused |
0x100000 - 0x108fff | CAEN V785 in slot 2 |
0x209000 - 0x17ffff | Unused |
0x180000 - 0x18ffff | CAEN V785 in slot 3 |
0x189fff - 0x1fffff | Unused |
0x200000 - 0x208fff | CAEN V775 in slot 4 |
0x209000 - 0x27ffff | Unused |
0x280000 - 0x288fff | CAEN V775 in slot 5 |
0x289000 - 0x2fffff | Unused |
0x300000 - 0x308fff | CAEN V792 in slot 6 |
0x309000 - 0x443fff | Unused |
0x444400 - 0x4444ff | CAEN V262 IO register |
0x444500 - 0xffffff | Unused. |
This address space has:
This gives the following address map:
Adress range | Contents |
0x00000000 - 0x01ffffff | Uncommitted |
0x02000000 - 0x02008fff | CAEN slot 2 programmed A32 space |
0x02009000 - 0x02ffffff | Uncommitted |
0x03000000 - 0x03008fff | CAEN Slot 3 programmed A32 space |
0x03009000 - 0x03ffffff | Uncommitted. |
0x04000000 - 0x04008fff | CAEN Slot 4 programmed A32 space |
0x04009000 - 0x04ffffff | Uncommitted |
0x05000000 - 0x05008fff | CAEN Slot 5 programmed A32 space |
0x05009000 - 0x05ffffff | Uncommitted . |
0x06000000 - 0x06008fff | CAEN Slot 6 programmed A32 space |
0x06009fff - 0x97ffffff | Uncommitted |
0x98000000 - 0x9fffffff | JTEC XLM in slot 19 |
0xa0000000 - 0xa7ffffff | JTEC XLM in slot 20 |
0xa8000000 - 0xa81fffff | SIS 3820 scaler (slot 10) |