Skip to content

Commit

Permalink
2.33
Browse files Browse the repository at this point in the history
  • Loading branch information
W. Hennig authored and xia-stan committed Jun 18, 2024
1 parent e7c6e10 commit 11345da
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 107 deletions.
2 changes: 1 addition & 1 deletion PixieNetDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define PI 3.14159265358979

// system constants
#define PS_CODE_VERSION 0x0232
#define PS_CODE_VERSION 0x0233
#define PN_BOARD_VERSION_12_250_A 0xA990
#define PN_BOARD_VERSION_12_250_B 0xA991
#define PN_BOARD_VERSION_12_250_B_PTP 0xA981
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ software version 2.24.
| Standard | 12 | 0xA991_0232 | sd-bootfiles-pn-STD-2p32.zip |
| Standard | 14 | 0xA9A1_0232 | sd-bootfiles-pn-14B-2p32.zip |
| PSA | 12 | 0xA991_1231 | sd-bootfiles-pn-PSA-2p31.zip |
| PSA | 14 | 0xA991_1233 | sd-bootfiles-pn-14B-PSA-2p33.zip |


## File Name Conventions
Expand Down
Binary file modified docs/Pixie_Net_Manual.pdf
Binary file not shown.
15 changes: 9 additions & 6 deletions progfippi.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,20 @@ int main(void) {
SL[k] = (int)floorf(fippiconfig.ENERGY_RISETIME[k] * FILTER_CLOCK_MHZ);
SL[k] = SL[k] >> FR;
if(SL[k] <MIN_SL) {
printf("Invalid ENERGY_RISETIME = %f, minimum %f us at this filter range\n",fippiconfig.ENERGY_RISETIME[k],(double)((MIN_SL<<FR)/FILTER_CLOCK_MHZ));
printf("Invalid ENERGY_RISETIME = %f, minimum %f us at this filter range\n",fippiconfig.ENERGY_RISETIME[k],(double)(MIN_SL<<FR)/(double)FILTER_CLOCK_MHZ);
return -3600-k;
}
SG[k] = (int)floorf(fippiconfig.ENERGY_FLATTOP[k] * FILTER_CLOCK_MHZ);
//printf("ENERGY_FLATTOP = %f,rounded to %d\n",fippiconfig.ENERGY_FLATTOP[k],SG[k]);

SG[k] = SG[k] >> FR;
//printf("ENERGY_FLATTOP = %f,rounded and adjusted to decimation to %d\n",fippiconfig.ENERGY_FLATTOP[k],SG[k]);
if(SG[k] <MIN_SG) {
printf("Invalid ENERGY_FLATTOP = %f, minimum %f us at this filter range\n",fippiconfig.ENERGY_FLATTOP[k],(double)((MIN_SG<<FR)/FILTER_CLOCK_MHZ));
printf("Invalid ENERGY_FLATTOP = %f, minimum %f us at this filter range\n",fippiconfig.ENERGY_FLATTOP[k],(double)(MIN_SG<<FR)/(double)FILTER_CLOCK_MHZ);
return -3700-k;
}
if( (SL[k]+SG[k]) >MAX_SLSG) {
printf("Invalid combined energy filter, maximum %f us at this filter range\n",(double)((MAX_SLSG<<FR)/FILTER_CLOCK_MHZ));
printf("Invalid combined energy filter, maximum %f us at this filter range\n",(double)(MAX_SLSG<<FR)/(double)FILTER_CLOCK_MHZ);
return -3700-k;
}
mval = SL[k]-1;
Expand All @@ -334,16 +337,16 @@ int main(void) {
{
FL[k] = (int)floorf(fippiconfig.TRIGGER_RISETIME[k] * FILTER_CLOCK_MHZ);
if(FL[k] <MIN_FL) {
printf("Invalid TRIGGER_RISETIME = %f, minimum %f us\n",fippiconfig.TRIGGER_RISETIME[k],(double)(MIN_FL/FILTER_CLOCK_MHZ));
printf("Invalid TRIGGER_RISETIME = %f, minimum %f us\n",fippiconfig.TRIGGER_RISETIME[k],(double)MIN_FL/(double)FILTER_CLOCK_MHZ);
return -3800-k;
}
FG[k] = (int)floorf(fippiconfig.TRIGGER_FLATTOP[k] * FILTER_CLOCK_MHZ);
if(FG[k] <MIN_FL) {
printf("Invalid TRIGGER_FLATTOP = %f, minimum %f us\n",fippiconfig.TRIGGER_FLATTOP[k],(double)(MIN_FG/FILTER_CLOCK_MHZ));
printf("Invalid TRIGGER_FLATTOP = %f, minimum %f us\n",fippiconfig.TRIGGER_FLATTOP[k],(double)MIN_FG/(double)FILTER_CLOCK_MHZ);
return -3900-k;
}
if( (FL[k]+FG[k]) >MAX_FLFG) {
printf("Invalid combined trigger filter, maximum %f us\n",(double)(MAX_FLFG/FILTER_CLOCK_MHZ));
printf("Invalid combined trigger filter, maximum %f us\n",(double)MAX_FLFG/(double)FILTER_CLOCK_MHZ);
return -3900-k;
}
TH[k] = (int)floor(fippiconfig.TRIGGER_THRESHOLD[k]*FL[k]/2.0);
Expand Down
14 changes: 7 additions & 7 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REQ_RUNTIME 30
MCSRB_TERM01_01 1
MCSRB_TERM23_02 1
REQ_RUNTIME 5
MCSRB_TERM01_01 0
MCSRB_TERM23_02 0
COINC_PATTERN_0000 0
COINC_PATTERN_0001 1
COINC_PATTERN_0010 1
Expand All @@ -18,7 +18,7 @@ COINC_PATTERN_1101 1
COINC_PATTERN_1110 1
COINC_PATTERN_1111 1
COINCIDENCE_WINDOW 0.040
RUN_TYPE 0x501
RUN_TYPE 0x501
FILTER_RANGE 1
CCSRA_GROUP_00 0 0 0 0
CCSRA_GOOD_02 1 1 1 1
Expand All @@ -29,9 +29,9 @@ ENERGY_FLATTOP 0.320 0.320 0.320 0.320
TRIGGER_RISETIME 0.048 0.048 0.048 0.048
TRIGGER_FLATTOP 0.048 0.048 0.048 0.048
TRIGGER_THRESHOLD 15.0 15.0 15.0 15.0
ANALOG_GAIN 5.0 5.0 5.0 5.0
DIG_GAIN 1.0 1.0 1.0 1.0
VOFFSET -0.015 -0.015 -0.015 -0.015
ANALOG_GAIN 2.0 2.0 2.0 2.0
DIG_GAIN 1.0 1.0 1.0 1.0
VOFFSET -0.2 -0.2 -0.2 -0.2
TRACE_LENGTH 1.304 1.304 1.304 1.304
TRACE_DELAY 0.612 0.612 0.612 0.612
TAU 0.23 0.23 0.23 0.23
Expand Down
45 changes: 0 additions & 45 deletions settings_generic.ini

This file was deleted.

47 changes: 0 additions & 47 deletions settings_usdatest.ini

This file was deleted.

4 changes: 3 additions & 1 deletion startdaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) {
return rval;
}
const char *settings_file = "settings.ini";
rval = init_PixieNetFippiConfig_from_file( settings_file, 1, &fippiconfig ); // second override with user settings, do allow missing
rval = init_PixieNetFippiConfig_from_file( settings_file, 2, &fippiconfig ); // second override with user settings, do allow missing, no warning
if( rval != 0 )
{
printf( "Failed to parse FPGA settings from %s, rval=%d\n", settings_file, rval );
Expand Down Expand Up @@ -374,6 +374,8 @@ int main(int argc, char *argv[]) {

psa_ampl = ((psa1 & 0xFFFF0000) >> 16) - psa_base;

//if(eventcount<10) printf("psa0 0x%x, psa1 0x%x\n",psa0,psa1);

if(psa_Q0!=0)
psa_R = (int)floor(1000.0*(double)psa_Q1/(double)psa_Q0);
else
Expand Down

0 comments on commit 11345da

Please sign in to comment.