14-MAR-89 ************************************************* * CHTCR PROMS * ************************************************* DESCRIPTION ----------- There are three types of PROMS on the CHTCR card. They are: 1. First Tier Count 2K x 4 2. First Tier Count 4K x 8 3. Eta/Phi address mapping Each type of PROM requires different programming. This document describes how the PROM data are generated. First Tier Count ---------------- The First Tier Count is the population count of each channel. That is, if n Trigger Towers of any channel are asserted, the First Tier Count will be n. The First Tier Count is computed in two stages. The 32 Trigger Towers are split into three groups, sized 11, 11, and 10. The (4-bit) partial sums in each group are computed in the first stage. The second stage consists of adding the three partial sums together to generate the (6-bit) First Tier Count. Both stages are implemented using PROMs. The first stage requires three 2K x 4 PROMs. Each PROM uses as its address lines the 11 (2**11 = 2048) Trigger Towers in a group (in the case of the 10 Trigger Tower group, an address line is grounded). The data at each location is then simply the number of binary 1's in the 11-bit address. The maximum number of 1's in an 11-bit address is 11, hence a 4-bit wide PROM is sufficient. Example: Assume that the lowest 4 Trigger Towers in a group are asserted. This would correspond to PROM location 15 (00000001111). There are four 1's in this address, hence PROM location 15 should contain the value 4. The second stage requires one 4K x 8 PROM. This PROM uses as its address lines the three (4-bit) partial counts (2**(3*4) = 4096). The data at each location is the summation of the three (4-bit) partial counts that make up the address. The maximum result is 32 (corresponding to all Trigger Towers asserted), therefore a 6-bit wide PROM (if available) would suffice. We use an 8-bit wide PROM. Example: Assume that the partial counts are 3, 4, and 10. This would correspond to PROM location 34A (hex). Since 3+4+10 = 17 (11 hex), PROM location 34A (hex) should contain the value 17 (11 hex). FORTRAN code has been written to generate these PROMs. The batch files to provide to the PROM programmer are stored as CHTCRPROM2048X4.DAT and CHTCRPROM4096X8.DAT. If necessary, these files can be transferred to the PC using KERMIT. The FORTRAN programs to generate the PROMs are stored as CHTCRPROM2048X4 and CHTCRPROM4096X8. They are in directory MSUTRGROOT:[000000.PROG_DEV.CHTCR.DEV_DATA] aka CHTCR_DATA. The actual PROM data, as well as the batch files mentioned above, are also stored on the PC floppy disk labelled CHTCR PROMS, and backed up on ROM-PAL #1 and BACKUP OF ROM-PAL #1. Eta/Phi Address Mapping ----------------------- The Eta/Phi mapping requires two 2K x 8 PROMs, each logically divided into 32 64-byte sections. The specifics of these PROMs are in CHTCR.TXT. The lowest section of these PROMs (address range 0 to 63) has been reserved for a test pattern.