; #def SAMPL_MASK0 = 0x00B0 ; Address in DM to store the sample mask ; #def SAMPL_MASK1 = 0x00B4 ; Address in DM to store the sample mask ; #def SAMPL_MASK2 = 0x00B8 ; Address in DM to store the sample mask ; #def SAMPL_MASK = 0x00B0 ; Address in DM to store the sample mask ; #def SAMPL_MASK = 0x00B4 ; Address in DM to store the sample mask ; #def SAMPL_MASK = 0x00B8 ; Address in DM to store the sample mask ; this is include file for the main fit program ; OR the event buffer indicators (EBI) for the channels contributing to tracklets ; all EBIs stored before in RAM by each CPU ; linear code without loops, to gain some CPU clocks ; modified: r1, r2, r13, r15 ; results stored in 3 x 32 bit RAM words, at SAMPL_MASK0, 1, 2 mov EBI_CP0, r13 ; start address of the copied event buffers indicators - here for CPU0, as we need the complete array, not only the part calculated by CPU3 ; this will be repeated for cpu0..2 - 3 times - 16 CPU clocks mov adc_ch_msk0, r1 ; the ADC start channel cmp r1, CH_NR_NO_TRCK ; 23, used to mark no tracklet jmp cc_eq, _acq_or_c1 ; skip the part for CPU0, go to the tracklet of CPU1 (unprobable) shl 2, r1, r1 ; multiply by 4 as the address is byte-address, our data are 32-bit! add r13, r1, r15 ; add 4*start channel nop ; now OR the event buffer indicators lra rr_dword, r1 lra+ rr_dword, r1 ; read the sample mask in the first channel nop ; don't change the memory read pointer r15 just before reading! lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the second channel or r2, r1, r1 ; or the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the third channel or r2, r1, r1 ; OR the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the fourth channel or r2, r1, r1 sra r1, SAMPL_MASK0 _acq_or_c1: ; sample mask and Q2 for cpu1 mov adc_ch_msk1, r1 ; the ADC start channel cmp r1, CH_NR_NO_TRCK ; 23, used to mark no tracklet jmp cc_eq, _acq_or_c2 shl 2, r1, r1 ; multiply by 4 as the address is byte-address, our data are 32-bit! add r13, r1, r15 ; add 4*start channel nop ; now OR the event buffer indicators lra rr_dword, r1 lra+ rr_dword, r1 ; read the sample mask in the first channel nop ; don't change the memory read pointer r15 just before reading! lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the second channel or r2, r1, r1 ; or the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the third channel or r2, r1, r1 ; OR the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the fourth channel or r2, r1, r1 sra r1, SAMPL_MASK1 _acq_or_c2: ; sample mask and Q2 for cpu2 mov adc_ch_msk2, r1 ; the ADC start channel cmp r1, CH_NR_NO_TRCK ; 23, used to mark no tracklet jmp cc_eq, _acq_or_fin shl 2, r1, r1 ; multiply by 4 as the address is byte-address, our data are 32-bit! add r13, r1, r15 ; add 4*start channel nop ; now OR the event buffer indicators lra rr_dword, r1 lra+ rr_dword, r1 ; read the sample mask in the first channel nop ; don't change the memory read pointer r15 just before reading! lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the second channel or r2, r1, r1 ; or the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the third channel or r2, r1, r1 ; OR the masks lra rr_dword, r2 ; lra+ rr_dword, r2 ; read the sample mask in the fourth channel or r2, r1, r1 sra r1, SAMPL_MASK2 _acq_or_fin: nop