28 #define FA_BOARD_ID 0xfadc0000 29 #define FA_MAX_BOARDS 20 30 #define FA_MAX_ADC_CHANNELS 16 31 #define FA_MAX_DATA_PER_CHANNEL 251 32 #define FA_MAX_A32_MEM 0x800000 33 #define FA_MAX_A32MB_SIZE 0x800000 34 #define FA_VME_INT_LEVEL 3 35 #define FA_VME_INT_VEC 0xFA 37 #define FA_SUPPORTED_CTRL_FIRMWARE 0x42,0x82 38 #define FA_SUPPORTED_CTRL_FIRMWARE_NUMBER 2 39 #define FA_SUPPORTED_PROC_FIRMWARE 0xC0D 40 #define FA_SUPPORTED_PROC_FIRMWARE_NUMBER 1 45 volatile unsigned int csr;
55 volatile unsigned int csr;
59 volatile unsigned int intr;
74 volatile unsigned short dac[16];
75 volatile unsigned int status[4];
76 volatile unsigned int aux;
98 volatile unsigned int reserved_ctrl[2];
100 volatile unsigned int serial_number[3];
106 volatile unsigned int adc_status[3];
107 volatile unsigned int adc_config[4];
112 volatile unsigned short adc_thres[16];
116 volatile unsigned int adc_pedestal[16];
119 unsigned int spare_adc[(0x200-0x1A0)>>2];
132 unsigned int spare_hitsum[(0x0300-0x022C)>>2];
134 volatile unsigned int scaler[16];
136 unsigned int spare_scaler[(0x400-0x344)>>2];
143 unsigned int blank[(0x500-0x414)>>2];
210 volatile unsigned short csr;
220 #define FA_CSR_EVENT_AVAILABLE 0x1 221 #define FA_CSR_BLOCK_LEVEL_FLAG 0x2 222 #define FA_CSR_BLOCK_READY 0x4 223 #define FA_CSR_BERR_STATUS 0x8 224 #define FA_CSR_TOKEN_STATUS 0x10 225 #define FA_CSR_FIFO1_EMPTY 0x800 226 #define FA_CSR_FIFO1_ALMOST_EMPTY 0x1000 227 #define FA_CSR_FIFO1_HALF_FULL 0x2000 228 #define FA_CSR_FIFO1_ALMOST_FULL 0x4000 229 #define FA_CSR_FIFO1_FULL 0x8000 230 #define FA_CSR_PROC_FPGA_HIGH_TEMP 0x10000 231 #define FA_CSR_CTRL_FPGA_HIGH_TEMP 0x20000 232 #define FA_CSR_SOFT_PULSE_TRIG2 0x100000 233 #define FA_CSR_SOFT_CLEAR 0x200000 234 #define FA_CSR_DATA_STREAM_SCALERS 0x400000 235 #define FA_CSR_FORCE_EOB_INSERT 0x800000 236 #define FA_CSR_FORCE_EOB_SUCCESS 0x1000000 237 #define FA_CSR_FORCE_EOB_FAILED 0x2000000 238 #define FA_CSR_ERROR_MASK 0x0e030000 239 #define FA_CSR_ERROR_CLEAR 0x08000000 240 #define FA_CSR_SYNC 0x10000000 241 #define FA_CSR_TRIGGER 0x20000000 242 #define FA_CSR_SOFT_RESET 0x40000000 243 #define FA_CSR_HARD_RESET 0x80000000 246 #define FA_SOURCE_INT 0x00 247 #define FA_SOURCE_SDC 0x10 248 #define FA_SOURCE_VXS 0x20 249 #define FA_SOURCE_MASK 0x30 252 #define FA_CTRL_GO 0x1 253 #define FA_CTRL_ENABLE_TRIG 0x2 254 #define FA_CTRL_ENABLE_SRESET 0x4 255 #define FA_CTRL_ENABLE_INT_TRIG 0x8 256 #define FA_CTRL_ENABLE_MASK 0x7 257 #define FA_CTRL_ENABLED 0x7 260 #define FA_REF_CLK_INTERNAL 0x0 261 #define FA_REF_CLK_FP 0x1 262 #define FA_REF_CLK_P0 0x2 263 #define FA_REF_CLK_MASK 0x3 264 #define FA_ENABLE_INTERNAL_CLK 0x8 265 #define FA_CTRL1_SUPPRESS_TT (1<<16) 266 #define FA_CTRL1_SUPPRESS_TT2 (1<<17) 267 #define FA_CTRL1_DATAFORMAT_MASK 0x0C000000 268 #define FA_CTRL1_DATAFORMAT_STD 0 269 #define FA_CTRL1_DATAFORMAT_INTERM_SUPPRESS 1 270 #define FA_CTRL1_DATAFORMAT_FULL_SUPPRESS 2 272 #define FA_TRIG_FP 0x00 273 #define FA_TRIG_FP_ISYNC 0x10 274 #define FA_TRIG_P0 0x20 275 #define FA_TRIG_P0_ISYNC 0x30 276 #define FA_TRIG_VME_PLAYBACK 0x50 277 #define FA_TRIG_VME 0x60 278 #define FA_TRIG_INTERNAL 0x70 279 #define FA_TRIG_MASK 0x70 280 #define FA_ENABLE_SOFT_TRIG 0x80 282 #define FA_SRESET_FP 0x000 283 #define FA_SRESET_FP_ISYNC 0x100 284 #define FA_SRESET_P0 0x200 285 #define FA_SRESET_P0_ISYNC 0x300 286 #define FA_SRESET_VME 0x600 287 #define FA_SRESET_NONE 0x700 288 #define FA_SRESET_MASK 0x700 289 #define FA_ENABLE_SOFT_SRESET 0x800 291 #define FA_ENABLE_LIVE_TRIG_OUT 0x1000 292 #define FA_ENABLE_TRIG_OUT_FP 0x2000 293 #define FA_ENABLE_TRIG_OUT_P0 0x4000 294 #define FA_TRIGOUT_MASK 0x7000 296 #define FA_ENABLE_BLKLVL_INT 0x40000 297 #define FA_ENABLE_BERR 0x100000 298 #define FA_ENABLE_MULTIBLOCK 0x200000 299 #define FA_FIRST_BOARD 0x400000 300 #define FA_LAST_BOARD 0x800000 301 #define FA_ENABLE_DEBUG 0x2000000 302 #define FA_MB_TOKEN_VIA_P0 0x10000000 303 #define FA_MB_TOKEN_VIA_P2 0x20000000 305 #define FA_ENABLE_ADC_PARAMETERS_DATA 0x8000 306 #define FA_SUPPRESS_TRIGGER_TIME_DATA 0x10000 307 #define FA_SUPPRESS_TRIGGER_TIME_WORD2_DATA 0x20000 311 #define FA_ENABLE_EXT_TRIGGER 0x2 312 #define FA_ENABLE_EXT_SRESET 0x4 313 #define FA_ENABLE_INT_TRIGGER 0x8 314 #define FA_ENABLE_STREAM_MODE 0x10 316 #define FA_DEBUG_XFER_INFIFO_BFIFO 0x1000 317 #define FA_DEBUG_XFER_BFIFO_OFIFO 0x2000 320 #define FA_RESET_CNTL_FPGA 0x1 321 #define FA_RESET_ADC_FPGA1 0x2 322 #define FA_RESET_ADC_FIFO1 0x100 323 #define FA_RESET_DAC 0x800 324 #define FA_RESET_EXT_RAM_PT 0x1000 325 #define FA_RESET_TOKEN 0x10000 326 #define FA_RESET_ALL 0xFFFF 329 #define FA_TRIG_SCAL_RESET (1<<31) 332 #define FA_TRIGCTL_TRIGSTOP_EN (1<<31) 333 #define FA_TRIGCTL_MAX2_MASK 0x00FF0000 334 #define FA_TRIGCTL_BUSY_EN (1<<15) 335 #define FA_TRIGCTL_MAX1_MASK 0x000000FF 338 #define FA_TRIG21_DELAY_MASK 0x00000FFF 341 #define FA_RELEASE_MGT_RESET 0x0 342 #define FA_MGT_RESET 0x1 343 #define FA_MGT_FRONT_END_TO_CTP 0x2 344 #define FA_MGT_ENABLE_DATA_ALIGNMENT 0x4 345 #define FA_MGT_HITBITS_TO_CTP 0x8 347 #define FA_INT_ACTIVE 0x1000000 348 #define FA_INT_IACKSTAT_WAIT 0x2000000 349 #define FA_INT_IACKSTAT_ONBT 0x4000000 353 #define FA_RAM_DATA_MASK 0x000fffff 354 #define FA_RAM_FULL 0x00100000 355 #define FA_RAM_EMPTY 0x00200000 356 #define FA_RAM_ADR_INCREMENT 0x00100000 359 #define FA_VERSION_MASK 0x000000ff 360 #define FA_BOARD_MASK 0xffff0000 361 #define FA_CSR_MASK 0x0fffffff 362 #define FA_CONTROL_MASK 0xffffffff 363 #define FA_CONTROL2_MASK 0xc000303f 364 #define FA_EVENT_COUNT_MASK 0xffffff 365 #define FA_BLOCK_COUNT_MASK 0xfffff 366 #define FA_BLOCK_LEVEL_MASK 0xffff 367 #define FA_INT_ENABLE_MASK 0xc0000 368 #define FA_INT_VEC_MASK 0xff 369 #define FA_INT_LEVEL_MASK 0x700 370 #define FA_SLOT_ID_MASK 0x1f0000 371 #define FA_DAC_VALUE_MASK 0x0fff 372 #define FA_DAC_WRITE_TIMEOUT_ERROR (1<<15) 374 #define FA_REF_CLK_SEL_MASK 0x7 375 #define FA_TRIG_SEL_MASK 0x70 376 #define FA_SRESET_SEL_MASK 0x700 378 #define FA_BUSY_LEVEL_MASK 0xfffff 379 #define FA_FORCE_BUSY 0x80000000 381 #define FA_A32_ENABLE 0x1 382 #define FA_AMB_ENABLE 0x1 383 #define FA_A32_ADDR_MASK 0xff80 384 #define FA_AMB_MIN_MASK 0xff80 385 #define FA_AMB_MAX_MASK 0xff800000 387 #define FA_SADR_AUTO_INCREMENT 0x10000 388 #define FA_PPG_WRITE_VALUE 0x8000 389 #define FA_PPG_SAMPLE_MASK 0x1fff 390 #define FA_PPG_MAX_SAMPLES 512 391 #define FA_PPG_ENABLE 0x80 394 #define FA_SYSMON_CTRL_TEMP_MASK 0x3FF 395 #define FA_SYSMON_FPGA_CORE_V_MASK 0x001FF800 396 #define FA_SYSMON_FPGA_AUX_V_MASK 0xFFC00000 399 #define FA_MGT_GTX1_LANE1_UP 0x1 400 #define FA_MGT_GTX1_LANE2_UP 0x2 401 #define FA_MGT_GTX1_CHANNEL_UP 0x4 402 #define FA_MGT_GTX1_HARD_ERROR 0x8 403 #define FA_MGT_GTX1_SOFT_ERROR 0x10 404 #define FA_MGT_GTX2_LANE1_UP 0x20 405 #define FA_MGT_GTX2_LANE2_UP 0x40 406 #define FA_MGT_GTX2_CHANNEL_UP 0x80 407 #define FA_MGT_GTX2_HARD_ERROR 0x100 408 #define FA_MGT_GTX2_SOFT_ERROR 0x200 409 #define FA_MGT_SUM_DATA_VALID 0x400 410 #define FA_MGT_RESET_ASSERTED 0x800 412 #define FA_STATUS3_PROC_TEMP_MASK 0xFFFF 417 #define FA_ADC_NS_PER_CLK 4 419 #define FA_MAX_PROC_MODE 10 420 #define FA_ADC_PROC_MASK (1<<8) 421 #define FA_ADC_PROC_ENABLE 0x8 422 #define FA_ADC_PROC_MODE_RAW_WINDOW 1 423 #define FA_ADC_PROC_MODE_PULSE_RAW 2 424 #define FA_ADC_PROC_MODE_PULSE_INTEGRAL 3 425 #define FA_ADC_PROC_MODE_HIGH_REZ_TIME 4 426 #define FA_ADC_PROC_MODE_HIGH_REZ_TIME_INTEGRAL 7 427 #define FA_ADC_PROC_MODE_DEBUG_HI_REZ_TIME 8 428 #define FA_ADC_PROC_MODE_PULSE_PARAM 9 429 #define FA_ADC_PROC_MODE_RAW_PULSE_PARAM 10 430 #define FA_SUPPORTED_MODES 9,10 431 #define FA_SUPPORTED_NMODES 2 435 #define FA_ADC_CONFIG0_CHAN_MASK 0x0F00 436 #define FA_ADC_CONFIG0_CHAN_READ_ENABLE (1<<12) 438 #define FA_ADC_STATUS1_TRIG_RCV_DONE (1<<15) 439 #define FA_ADC_STATUS1_TRIGNUM_MASK 0x0FFF 441 #define FA_ADC_STATUS2_CHAN_DATA_MASK 0x0FFF 443 #define FA_ADC_CONFIG1_NSAT_MASK 0x0C00 444 #define FA_ADC_CONFIG1_TNSAT_MASK 0x3000 446 #define FA_ADC_CONFIG3_TPT_MASK 0x0FFF 448 #define FA_ADC_CONFIG6_MNPED_MASK 0x00003C00 449 #define FA_ADC_CONFIG6_PMAXPED_MASK 0x000003FF 451 #define FA_ADC_CONFIG7_NPED_MASK 0x00003C00 452 #define FA_ADC_CONFIG7_MAXPED_MASK 0x000003FF 454 #define FA_ADC_VERSION_MASK 0x7fff 455 #define FA_ADC_PLAYBACK_MODE 0x0080 457 #define FA_ADC_PEAK_MASK 0x0070 458 #define FA_ADC_CHAN_MASK 0xffff 460 #define FA_ADC_DEFAULT_PL 50 461 #define FA_ADC_DEFAULT_PTW 50 462 #define FA_ADC_DEFAULT_NSB 5 463 #define FA_ADC_DEFAULT_NSA 10 464 #define FA_ADC_DEFAULT_NP 1 465 #define FA_ADC_DEFAULT_THRESH 0 466 #define FA_ADC_DEFAULT_NPED 4 467 #define FA_ADC_DEFAULT_MAXPED 1 468 #define FA_ADC_DEFAULT_NSAT 1 469 #define FA_ADC_DEFAULT_MNPED 4 470 #define FA_ADC_DEFAULT_TNSA 10 471 #define FA_ADC_DEFAULT_TNSAT 1 472 #define FA_ADC_DEFAULT_TPT 0 474 #define FA_ADC_MAX_PL 1024 475 #define FA_ADC_MAX_PTW 512 476 #define FA_ADC_MAX_NSB 7 477 #define FA_ADC_MAX_NSA 511 478 #define FA_ADC_MAX_NP 4 479 #define FA_ADC_MAX_THRESH 0xfff 480 #define FA_ADC_MAX_NPED 15 481 #define FA_ADC_MAX_MAXPED 1023 482 #define FA_ADC_MAX_NSAT 4 483 #define FA_ADC_MAX_MNPED 15 484 #define FA_ADC_MAX_TNSA 63 485 #define FA_ADC_MAX_TNSAT 4 486 #define FA_ADC_MAX_TPT 4095 488 #define FA_ADC_MIN_PL 0 489 #define FA_ADC_MIN_PTW 6 490 #define FA_ADC_MIN_NSB -3 491 #define FA_ADC_MIN_NSA 2 492 #define FA_ADC_MIN_NP 1 493 #define FA_ADC_MIN_THRESH 0 494 #define FA_ADC_MIN_NPED 4 495 #define FA_ADC_MIN_MAXPED 0 496 #define FA_ADC_MIN_NSAT 1 497 #define FA_ADC_MIN_MNPED 4 498 #define FA_ADC_MIN_TNSA 2 499 #define FA_ADC_MIN_TNSAT 2 500 #define FA_ADC_MIN_TPT 0 502 #define FA_ADC_NSB_READBACK_MASK 0x0000000F 503 #define FA_ADC_NSB_NEGATIVE (1<<3) 505 #define FA_ADC_NSA_READBACK_MASK 0x000001FF 506 #define FA_ADC_TNSA_MASK 0x00007E00 508 #define FA_ADC_TPT_MASK 0xFFF 510 #define FA_ADC_PEDESTAL_MASK 0xffff 513 #define FA_ITRIG_VERSION_MASK 0x1fff 514 #define FA_ITRIG_CONFIG_MASK 0x001F 515 #define FA_ITRIG_ENABLE_MASK 0x0010 516 #define FA_ITRIG_P2OUT_MASK 0x0008 517 #define FA_ITRIG_MODE_MASK 0x0007 519 #define FA_ITRIG_TABLE_MODE 0 520 #define FA_ITRIG_COIN_MODE 1 521 #define FA_ITRIG_WINDOW_MODE 2 522 #define FA_ITRIG_UNDEF_MODE 3 523 #define FA_ITRIG_SUM_MODE 4 530 #define FA_ITRIG_DISABLED 0x0010 531 #define FA_ITRIG_HB_P2OUT 0x0008 532 #define FA_ITRIG_OUT_MASK 0x0000f000 533 #define FA_ITRIG_OUT_FP 0x00003000 535 #define FA_ITRIG_MIN_WIDTH 0x01 536 #define FA_ITRIG_MAX_WIDTH 0x100 537 #define FA_ITRIG_MAX_DELAY 0xf00 539 #define FA_ITRIG_WINDOW_MAX_WIDTH 0x200 541 #define FA_ITRIG_MAX_HB_WIDTH 0xff 542 #define FA_ITRIG_MAX_HB_DELAY 0xf 544 #define FA_ITRIG_HB_INFO_MASK 0xffff 545 #define FA_ITRIG_HB_WIDTH_MASK 0x00ff 546 #define FA_ITRIG_HB_DELAY_MASK 0x1f00 549 #define FA_STATE_LEVEL_CAPTURE_MASK 0x000000FF 551 #define FA_STATE_CSR_ARM_BUFFER (1<<31) 552 #define FA_STATE_CSR_BUFFER_FULL (1<<27) 553 #define FA_STATE_CSR_BUFFER_EMPTY (1<<26) 554 #define FA_STATE_CSR_BUFFER_WORDS_MASK 0x000000FF 556 #define FA_STATE_VALUE_MASK 0x0000FFFF 560 #define FA_DATA_TYPE_DEFINE 0x80000000 561 #define FA_DATA_TYPE_MASK 0x78000000 562 #define FA_DATA_SLOT_MASK 0x07c00000 564 #define FA_DATA_BLOCK_HEADER 0x00000000 565 #define FA_DATA_BLOCK_TRAILER 0x08000000 566 #define FA_DATA_EVENT_HEADER 0x10000000 567 #define FA_DATA_TRIGGER_TIME 0x18000000 568 #define FA_DATA_WINDOW_RAW 0x20000000 569 #define FA_DATA_WINDOW_SUM 0x28000000 570 #define FA_DATA_PULSE_RAW 0x30000000 571 #define FA_DATA_PULSE_INTEGRAL 0x38000000 572 #define FA_DATA_PULSE_TIME 0x40000000 573 #define FA_DATA_STREAM 0x48000000 574 #define FA_DATA_INVALID 0x70000000 575 #define FA_DATA_FILLER 0x78000000 576 #define FA_DUMMY_DATA 0xf800fafa 578 #define FA_DATA_BLKNUM_MASK 0x0000003f 579 #define FA_DATA_WRDCNT_MASK 0x003fffff 580 #define FA_DATA_TRIGNUM_MASK 0x07ffffff 583 #define FA_PROMREG1_SRAM_TO_PROM1 0x0 584 #define FA_PROMREG1_SRAM_TO_PROM2 0x1 585 #define FA_PROMREG1_PROM1_TO_SRAM 0x3 586 #define FA_PROMREG1_PROM2_TO_SRAM 0x4 587 #define FA_PROMREG1_GET_ID1 0x6 588 #define FA_PROMREG1_GET_ID2 0x7 589 #define FA_PROMREG1_ERASE_PROM1 0x9 590 #define FA_PROMREG1_ERASE_PROM2 0xA 591 #define FA_PROMREG1_REBOOT_FPGA1 0xC 592 #define FA_PROMREG1_REBOOT_FPGA2 0xD 593 #define FA_PROMREG1_READY (1<<31) 595 #define FA_MEM_ADR_INCR_MEM1 (1<<31) 596 #define FA_MEM_ADR_INCR_MEM2 (1<<30) 599 #define FA_SCALER_CTRL_ENABLE (1<<0) 600 #define FA_SCALER_CTRL_LATCH (1<<1) 601 #define FA_SCALER_CTRL_RESET (1<<2) 602 #define FA_SCALER_CTRL_MASK (0x7) 605 #define FA_SCALER_INTERVAL_MASK 0x0000FFFF 608 #define FA_SUM_THRESHOLD_DREADY (1<<31) 609 #define FA_SUM_THRESHOLD_MASK 0x0000FFFF 612 #define FA_SUM_DATA_ARM_HISTORY_BUFFER (1<<31) 613 #define FA_SUM_DATA_SAMPLE_MASK 0x0000FFFF 616 #define FA_SERIAL_NUMBER_ACDI 0x41434449 617 #define FA_SERIAL_NUMBER_ADV_ASSEM_MASK 0xFF000000 618 #define FA_SERIAL_NUMBER_ADV_ASSEM 0x42000000 619 #define FA_SERIAL_NUMBER_ACDI_BOARDID_MASK 0x0000FFFF 620 #define FA_SERIAL_NUMBER_ADV_MNFID1 0x42323135 621 #define FA_SERIAL_NUMBER_ADV_MNFID2_MASK 0xFFFF0000 622 #define FA_SERIAL_NUMBER_ADV_MNFID2 0x39350000 623 #define FA_SERIAL_NUMBER_ADV_BOARDID2_MASK 0x000000FF 628 #define FA_SDC_BOARD_ID 0x0200 629 #define FA_SDC_BOARD_MASK 0xfffe 630 #define FA_SDC_ADR_MASK 0xffc0 632 #define FASDC_BUSY_MASK 0x00ff 634 #define FASDC_CSR_BUSY 0x1 635 #define FASDC_CSR_TRIG 0x20 636 #define FASDC_CSR_SRESET 0x40 637 #define FASDC_CSR_INIT 0x80 638 #define FASDC_CSR_MASK 0x00e1 640 #define FASDC_CTRL_CLK_EXT 0x1 641 #define FASDC_CTRL_NOSYNC_TRIG 0x10 642 #define FASDC_CTRL_ENABLE_SOFT_TRIG 0x20 643 #define FASDC_CTRL_NOSYNC_SRESET 0x100 644 #define FASDC_CTRL_ENABLE_SOFT_SRESET 0x200 645 #define FASDC_CTRL_ASSERT_SOFT_BUSY 0x8000 646 #define FASDC_CTRL_MASK 0x8331 649 #define FADC_FIRMWARE_LX110 0 650 #define FADC_FIRMWARE_FX70T 1 652 #define FA_CTRL1_SYSTEM_TEST_MODE (1<<31) 654 #define FA_TESTBIT_TRIGOUT (1<<0) 655 #define FA_TESTBIT_BUSYOUT (1<<1) 656 #define FA_TESTBIT_SDLINKOUT (1<<2) 657 #define FA_TESTBIT_TOKENOUT (1<<3) 658 #define FA_TESTBIT_STATBITB (1<<8) 659 #define FA_TESTBIT_TOKENIN (1<<9) 660 #define FA_TESTBIT_CLOCK250_STATUS (1<<15) 662 #define FA_CLOCK250COUNT_RESET (0<<0) 663 #define FA_CLOCK250COUNT_START (1<<0) 664 #define FA_SYNCP0COUNT_RESET (0<<0) 665 #define FA_TRIG1P0COUNT_RESET (0<<0) 666 #define FA_TRIG2P0COUNT_RESET (0<<0) 669 #define FA_INIT_SOFT_SYNCRESET (0<<0) 670 #define FA_INIT_EXT_SYNCRESET (1<<0) 671 #define FA_INIT_SOFT_TRIG (0<<1) 672 #define FA_INIT_FP_TRIG (1<<1) 673 #define FA_INIT_VXS_TRIG (2<<1) 674 #define FA_INIT_INT_TRIG (4<<1) 675 #define FA_INIT_INT_CLKSRC (0<<4) 676 #define FA_INIT_FP_CLKSRC (1<<4) 677 #define FA_INIT_VXS_CLKSRC (2<<4) 678 #define FA_INIT_P2_CLKSRC ((1<<4) | (2<<4)) 679 #define FA_INIT_SKIP (1<<16) 680 #define FA_INIT_USE_ADDRLIST (1<<17) 681 #define FA_INIT_SKIP_FIRMWARE_CHECK (1<<18) 684 #define FA_BLOCKERROR_NO_ERROR 0 685 #define FA_BLOCKERROR_TERM_ON_WORDCOUNT 1 686 #define FA_BLOCKERROR_UNKNOWN_BUS_ERROR 2 687 #define FA_BLOCKERROR_ZERO_WORD_COUNT 3 688 #define FA_BLOCKERROR_DMADONE_ERROR 4 689 #define FA_BLOCKERROR_NTYPES 5 692 STATUS
faInit (UINT32 addr, UINT32 addr_inc,
int nadc,
int iFlag);
694 int faSlot(
unsigned int i);
701 int faSetProcMode(
int id,
int pmode,
unsigned int PL,
unsigned int PTW,
702 int NSB,
unsigned int NSA,
unsigned int NP,
703 unsigned int NPED,
unsigned int MAXPED,
unsigned int NSAT);
705 int NSB,
unsigned int NSA,
unsigned int NP,
706 unsigned int NPED,
unsigned int MAXPED,
unsigned int NSAT);
716 int faSetPPG(
int id,
int pmode,
unsigned short *sdata,
int nsamples);
719 int faReadBlock(
int id,
volatile UINT32 *data,
int nwrds,
int rflag);
727 void faReset(
int id,
int iFlag);
736 void faSetCalib(
int id,
unsigned short sdelay,
unsigned short tdelay);
745 void faEnable(
int id,
int eflag,
int bank);
760 unsigned int faGBlockReady(
unsigned int slotmask,
int nloop);
762 int faBusyLevel(
int id,
unsigned int val,
int bflag);
783 int faSetThreshold(
int id,
unsigned short tvalue,
unsigned short chmask);
791 int faSetDAC(
int id,
unsigned short dvalue,
unsigned short chmask);
794 int faGetDAC(
int id,
unsigned short *indata);
807 int faReadScalers(
int id,
volatile unsigned int *data,
unsigned int chmask,
int rflag);
904 int faSDC_Config(
unsigned short cFlag,
unsigned short bMask);
913 int faItrigSetMode(
int id,
int tmode,
unsigned int wWidth,
unsigned int wMask,
914 unsigned int cMask,
unsigned int sumThresh,
unsigned int *tTable);
int faStatePrintBuffer(int id)
Print the contents of the State Machine buffer to standard out.
Definition: fadcLib.c:8207
int faSetTriggerStopCondition(int id, int trigger_max)
Set the maximum number of unacknowledged triggers before module stops accepting incoming triggers...
Definition: fadcLib.c:1989
unsigned int faGetA32(int id)
Return the base address of the A32 for specified module.
Definition: fadcLib.c:5993
void faReset(int id, int iFlag)
Perform a hard reset.
Definition: fadcLib.c:3208
volatile unsigned int adc_nsb
Definition: fadcLib.h:110
void faItrigPrintHBinfo(int id)
unsigned int faGBlockReady(unsigned int slotmask, int nloop)
Return a Block Ready status mask for fADCs indicated in supplied slotmask.
Definition: fadcLib.c:4164
int faBready(int id)
Return a Block Ready status.
Definition: fadcLib.c:4108
void faTestSetTokenOut(int id, int mode)
Set the level of Token Out to the SD.
Definition: fadcLib.c:7016
volatile unsigned int hitsum_trig_width
Definition: fadcLib.h:125
void faTestSetSdLink(int id, int mode)
Set the level of the SD Link.
Definition: fadcLib.c:6980
void fadcFirmwareSetFilename(char *filename, int chip)
volatile unsigned int clock250count
Definition: fadcLib.h:139
int faGetHitbitsMode(int id)
Get the enabled/disabled status of hitbits mode for the module.
Definition: fadcLib.c:5729
volatile unsigned int trig_scal
Definition: fadcLib.h:66
int faHistoryBufferDReady(int id)
Return whether or not the history buffer has been triggered.
Definition: fadcLib.c:7835
int faDready(int id, int dflag)
Return Event/Block count.
Definition: fadcLib.c:4078
void faDisableClk(int id)
Disable the internal clock.
Definition: fadcLib.c:4451
int faSampleConfig(int id, int nsamples, int maxvalue)
Configure output of sample data from .
Definition: fadcLib.c:5162
int faPrintScalers(int id, int rflag)
Scaler Print Out routine.
Definition: fadcLib.c:5828
int fadcFirmwareCheckSRAM(int id)
volatile unsigned int hitsum_cfg
Definition: fadcLib.h:122
int fadcFirmwareGLoad(int chip, int pFlag)
void faDataDecode(unsigned int data)
Decode a data word from an fADC250 and print to standard out.
Definition: fadcLib.c:6573
Definition: fadcLib.h:851
volatile unsigned int syncreset_scal
Definition: fadcLib.h:91
unsigned int thres_bin
Definition: fadcLib.h:185
int faSetDACandCheck(int id, unsigned short dvalue, unsigned short chmask)
Set the DAC value of the specified channel mask and readback and check that it was written properly...
Definition: fadcLib.c:5364
volatile unsigned int testBit
Definition: fadcLib.h:138
volatile unsigned int csr
Definition: fadcLib.h:55
volatile unsigned int scaler_ctrl
Definition: fadcLib.h:99
int faSetSyncSource(int id, int source)
Set the SyncReset source for the module.
Definition: fadcLib.c:4810
int faSetPPG(int id, int pmode, unsigned short *sdata, int nsamples)
Setup FADC Progammable Pulse Generator.
Definition: fadcLib.c:2370
int faSetChannelEnable(int id, int channel)
Enable the specified channel.
Definition: fadcLib.c:3572
int faBusyLevel(int id, unsigned int val, int bflag)
Set/Readback Busy Level.
Definition: fadcLib.c:4237
Definition: fadcLib.h:855
void faEnableSoftTrig(int id)
Enable software triggers.
Definition: fadcLib.c:4308
const char * fa_mode_names[FA_MAX_PROC_MODE+1]
Definition: fadcLib.c:8241
unsigned int pulse_num
Definition: fadcLib.h:184
int faSetChannelPedestal(int id, unsigned int chan, unsigned int ped)
Set the pedestal value of specified channel.
Definition: fadcLib.c:5520
volatile unsigned int blk_wrdcnt_fifo
Definition: fadcLib.h:70
unsigned int samp_ov_thres
Definition: fadcLib.h:181
volatile unsigned int blk_count
Definition: fadcLib.h:68
void faTestResetClock250Counter(int id)
Reset the counter of the 250MHz Clock scaler.
Definition: fadcLib.c:7266
void faGForceEndOfBlock(int scalers)
Allows for the insertion of a block trailer into the data stream for all initialized fADC250s...
Definition: fadcLib.c:7700
void faGTrig()
Pulse a software trigger to all initialized fADC250s.
Definition: fadcLib.c:3913
unsigned int faGetCtrlFPGAData(int id)
Return raw register data from the Control FPGA containing the temperature, core voltage, and auxiliary voltage.
Definition: fadcLib.c:6278
void faEnableMultiBlock(int tflag)
Enable and setup multiblock transfers for all initialized fADC250s.
Definition: fadcLib.c:4595
int faTokenStatus(int id)
Return the status of the token.
Definition: fadcLib.c:3389
unsigned int faScanMask()
Return the vme slot mask of all initialized fADC250s.
Definition: fadcLib.c:4210
unsigned int faTestGetTrig1Counter(int id)
Return the value of the trig1 scaler.
Definition: fadcLib.c:7205
unsigned int slot_id_hd
Definition: fadcLib.h:153
unsigned int integral
Definition: fadcLib.h:188
void faGEnable(int eflag, int bank)
Enable data acquisition, trigger, and SyncReset on all initialized fADC250s.
Definition: fadcLib.c:3802
int faSetChannelDisableMask(int id, unsigned short cmask)
Disable all channels in the specified mask.
Definition: fadcLib.c:3543
volatile unsigned short ctrl
Definition: fadcLib.h:211
int fadcFirmwareRevFromFpgaID(int pflag)
volatile unsigned int adc_pl
Definition: fadcLib.h:109
int faGetBlockError(int pflag)
Return the type of error that occurred while attempting a block read from faReadBlock.
Definition: fadcLib.c:2850
unsigned int NSA
Definition: fadcLib.h:161
volatile unsigned int mgt_ctrl
Definition: fadcLib.h:97
unsigned int slot_id_evh
Definition: fadcLib.h:155
int faSetTrigOut(int id, int trigout)
Set trigger output options.
Definition: fadcLib.c:4878
int faSlot(unsigned int i)
Convert an index into a slot number, where the index is the element of an array of FADCs in the order...
Definition: fadcLib.c:820
void faGDisable(int eflag)
Disable data acquisition, triggers, and SyncReset on all initialized fADC250s.
Definition: fadcLib.c:3871
#define FA_MAX_PROC_MODE
Definition: fadcLib.h:419
void faStatus(int id, int sflag)
Print Status of fADC250 to standard out.
Definition: fadcLib.c:986
volatile unsigned int dataflow_status
Definition: fadcLib.h:73
void faItrigDisable(int id, int dflag)
unsigned int faItrigSetOutWidth(int id, unsigned short itrigWidth)
int faTestGetClock250CounterStatus(int id)
Return the status of the 250Mhz Clock Counter.
Definition: fadcLib.c:7112
volatile unsigned int berr_module_scal
Definition: fadcLib.h:84
volatile unsigned int scaler_interval
Definition: fadcLib.h:101
int fadcFirmwareVerifyDownload(int id)
unsigned int n_evts
Definition: fadcLib.h:156
volatile unsigned int hitsum_sum_thresh
Definition: fadcLib.h:131
unsigned int group
Definition: fadcLib.h:194
int faSetHistoryBufferThreshold(int id, int thres)
Set the threshold to trigger for the history buffer to be saved for readout.
Definition: fadcLib.c:7721
void faClear(int id)
Perform a soft reset.
Definition: fadcLib.c:3106
unsigned int valid_2
Definition: fadcLib.h:176
volatile unsigned int hitsum_window_width
Definition: fadcLib.h:127
int faCalcMaxUnAckTriggers(int mode, int ptw, int nsa, int nsb, int np)
Return the maximum number of unacknowledged triggers a specific mode can handle.
Definition: fadcLib.c:1942
volatile unsigned int reset
Definition: fadcLib.h:65
unsigned int faItrigGetHBwidth(int id, unsigned int chan)
void faChanDisable(int id, unsigned short cmask)
Disable all channels in the specified mask.
Definition: fadcLib.c:3530
void faDisableSoftSync(int id)
Disable Software SyncReset.
Definition: fadcLib.c:4403
unsigned int trig_type_int
Definition: fadcLib.h:199
int faDataSuppressTriggerTime(int id, int suppress)
Enable/Disable suppression of one or both of the trigger time words in the data stream.
Definition: fadcLib.c:6150
volatile unsigned int trig2p0count
Definition: fadcLib.h:142
void faSetNormalMode(int id, int opt)
Configure the ADC Processing in "Normal Mode".
Definition: fadcLib.c:2248
int faEnableScalers(int id)
Enable the scalers to count.
Definition: fadcLib.c:5941
int faItrigInitTable(int id, unsigned int *table)
unsigned int ped_sum
Definition: fadcLib.h:183
void faGTrig2()
Pulse a software playback trigger to all initialized fADC250s.
Definition: fadcLib.c:3949
int faGetChannelDAC(int id, int channel)
Readback the DAC for a specific channel by the module in the specified slot.
Definition: fadcLib.c:5481
int faReadHistoryBuffer(int id, volatile unsigned int *data, int nwrds)
Read out history buffer from the module.
Definition: fadcLib.c:7863
volatile unsigned int hitsum_reserved
Definition: fadcLib.h:124
int faSetClkSource(int id, int source)
Set the Clock Source for the module.
Definition: fadcLib.c:4723
int faSetTriggerBusyCondition(int id, int trigger_max)
Set the maximum number of unacknowledged triggers before module asserts BUSY.
Definition: fadcLib.c:2035
unsigned int time_coarse
Definition: fadcLib.h:195
volatile unsigned int mem_adr
Definition: fadcLib.h:79
unsigned int over
Definition: fadcLib.h:178
int faDataInsertAdcParameters(int id, int enable)
Insert ADC parameter word into datastream. The data word appears as a block header continuation word...
Definition: fadcLib.c:6097
void faTestSetTrigOut(int id, int mode)
Set the level of Trig Out to the SD.
Definition: fadcLib.c:6908
unsigned int evt_num_int
Definition: fadcLib.h:201
void faEnableBusError(int id)
Enable bus errors to terminate a block transfer.
Definition: fadcLib.c:4526
int faSDC_Config(unsigned short cFlag, unsigned short bMask)
Configure the Signal Distribution Card (SDC)
Definition: fadcLib.c:8272
volatile unsigned int hitsum_window_bits
Definition: fadcLib.h:126
volatile unsigned int hitsum_fifo
Definition: fadcLib.h:130
int faReadBlock(int id, volatile UINT32 *data, int nwrds, int rflag)
General Data readout routine.
Definition: fadcLib.c:2582
void faResetToken(int id)
Reset the token.
Definition: fadcLib.c:3366
void faEnableSoftSync(int id)
Enable Software SyncReset.
Definition: fadcLib.c:4376
unsigned int faTestGetTrig2Counter(int id)
Return the value of the trig2 scaler.
Definition: fadcLib.c:7236
void faSDC_Sync()
Perform a SyncReset from the SDC.
Definition: fadcLib.c:8431
unsigned int time_fine
Definition: fadcLib.h:196
volatile unsigned int sum_data
Definition: fadcLib.h:103
volatile unsigned int system_monitor
Definition: fadcLib.h:104
volatile unsigned int aux
Definition: fadcLib.h:76
int faSetDAC(int id, unsigned short dvalue, unsigned short chmask)
Set the DAC value of the specified channel mask.
Definition: fadcLib.c:5272
unsigned int under
Definition: fadcLib.h:179
volatile unsigned int hitsum_pattern
Definition: fadcLib.h:129
int faSetChannelDisable(int id, int channel)
Disable the specified channel.
Definition: fadcLib.c:3496
volatile unsigned int berr_crate_scal
Definition: fadcLib.h:85
int faGetChannelMask(int id, int type)
Get the Enabled/Disabled Channel Mask.
Definition: fadcLib.c:3637
unsigned int slot_id_tr
Definition: fadcLib.h:154
volatile unsigned int busy_level
Definition: fadcLib.h:92
void faEnable(int id, int eflag, int bank)
Enable data acquisition, trigger, and SyncReset on the module.
Definition: fadcLib.c:3729
void faItrigEnable(int id, int eflag)
void faSDC_Status(int sFlag)
Print status of SDC to standard out.
Definition: fadcLib.c:8314
int faSetBlockLevel(int id, int level)
Set the block level for the module.
Definition: fadcLib.c:4670
Definition: fadcLib.h:854
unsigned int faGetTokenStatus(int pflag)
Return slot mask of modules with token.
Definition: fadcLib.c:3435
int faEnableInternalPlaybackTrigger(int id)
Enable the software playback trigger and trigger.
Definition: fadcLib.c:4023
void faEnableFP(int id)
Enable Front Panel Inputs.
Definition: fadcLib.c:4844
unsigned int chan_b
Definition: fadcLib.h:192
volatile unsigned int trigger_control
Definition: fadcLib.h:77
int id
Definition: fadcLib.h:861
int faTestGetTokenIn(int id)
Get the level of the Token In from the SD.
Definition: fadcLib.c:7081
int faItrigSetHBwidth(int id, unsigned short hbWidth, unsigned short hbMask)
volatile unsigned int s_adr
Definition: fadcLib.h:62
unsigned int quality2
Definition: fadcLib.h:187
void faGDataSuppressTriggerTime(int suppress)
Enable/Disable suppression of one or both of the trigger time words in the data stream for all initia...
Definition: fadcLib.c:6204
unsigned int trig_state_int
Definition: fadcLib.h:200
unsigned int faGetMaxA32MB(int id)
Get the maximum address used for multiblock.
Definition: fadcLib.c:6067
volatile unsigned int time_count
Definition: fadcLib.h:135
void faPrintDAC(int id)
Print DAC values for each channel to standard out.
Definition: fadcLib.c:5408
void faDACReset(int id)
Perform a reset of the DAC chip.
Definition: fadcLib.c:3321
unsigned int scaler_data_words
Definition: fadcLib.h:203
void faEnableClk(int id)
Enable the internal clock.
Definition: fadcLib.c:4427
volatile unsigned int ctrl2
Definition: fadcLib.h:57
unsigned int time_1
Definition: fadcLib.h:168
volatile unsigned int blk_level
Definition: fadcLib.h:58
int faLatchScalers(int id)
Latch the current scaler count.
Definition: fadcLib.c:5915
void faTestResetSyncCounter(int id)
Reset the counter of the SyncReset scaler.
Definition: fadcLib.c:7294
struct faUpdateWatcherArgs_struct faUpdateWatcherArgs_t
int faCheckThreshold(int id)
Check and make sure readout threshold for each channel is non zero.
Definition: fadcLib.c:4934
void faGSetProcMode(int pmode, unsigned int PL, unsigned int PTW, int NSB, unsigned int NSA, unsigned int NP, unsigned int NPED, unsigned int MAXPED, unsigned int NSAT)
Configure the processing type/mode for all initialized fADC250s.
Definition: fadcLib.c:1912
int faCheckAddresses(int id)
Definition: fadcLib.c:759
unsigned int chan_a
Definition: fadcLib.h:190
int faSetHitbitsMode(int id, int enable)
Enable/Disable Hitbits mode on the module.
Definition: fadcLib.c:5678
volatile unsigned int trig1p0count
Definition: fadcLib.h:141
unsigned int err_status_int
Definition: fadcLib.h:202
unsigned int blk_num
Definition: fadcLib.h:157
int faGetTrig21Delay(int id)
Return the value of the delay between the software playback trigger and trigger.
Definition: fadcLib.c:3997
void faTrig(int id)
Pulse a software trigger to the module.
Definition: fadcLib.c:3889
int faSetChannelEnableMask(int id, unsigned short enMask)
Enable all channels in the specified mask.
Definition: fadcLib.c:3607
unsigned int vpeak
Definition: fadcLib.h:198
int fadcFirmwareReadMcsFile(char *filename)
unsigned int adc_2
Definition: fadcLib.h:177
float faGetCtrlFPGAVoltage(int id, int vtype, int pflag)
Return the value of specified Control FPGA voltage.
Definition: fadcLib.c:6371
volatile unsigned int prom_reg2
Definition: fadcLib.h:83
int faReadScalers(int id, volatile unsigned int *data, unsigned int chmask, int rflag)
Scaler Data readout routine.
Definition: fadcLib.c:5765
unsigned int quality
Definition: fadcLib.h:186
void faGArmHistoryBuffer()
Enable the history buffer for data acquisition for all initialized fADC250s.
Definition: fadcLib.c:7818
unsigned int new_type
Definition: fadcLib.h:151
volatile unsigned int adc_test_data
Definition: fadcLib.h:115
void faTestResetTrig2Counter(int id)
Reset the counter of the trig2 scaler.
Definition: fadcLib.c:7348
volatile unsigned int internal_trig_scal
Definition: fadcLib.h:71
Definition: fadcLib.h:148
unsigned int faTestGetTestBitReg(int id)
Return the current value of the testBit register.
Definition: fadcLib.c:7376
int faTestGetStatBitB(int id)
Get the level of the StatBitB to the SD.
Definition: fadcLib.c:7050
void faGSetTriggerPathSamples(unsigned int TNSA, unsigned int TNSAT)
Set the number of samples that are included before and after threshold crossing that are sent through...
Definition: fadcLib.c:2138
unsigned int faReadCSR(int id)
Get the value of the Control/Status Register.
Definition: fadcLib.c:3080
volatile unsigned int intr
Definition: fadcLib.h:59
volatile unsigned int header_scal
Definition: fadcLib.h:88
int step
Definition: fadcLib.h:860
int fadcFirmwareZeroSRAM(int id)
void faEnableTriggerOut(int id, int output)
Enable trigger out for front panel or p0.
Definition: fadcLib.c:4479
volatile unsigned int version
Definition: fadcLib.h:54
unsigned int faGetMinA32MB(int id)
Get the minimum address used for multiblock.
Definition: fadcLib.c:6041
volatile unsigned int proc_words_scal
Definition: fadcLib.h:86
volatile unsigned int mgt_status
Definition: fadcLib.h:96
unsigned int time_4
Definition: fadcLib.h:171
unsigned int faGBready()
Return a Block Ready status mask for all initialized fADC250s.
Definition: fadcLib.c:4136
volatile unsigned int mem2_data
Definition: fadcLib.h:81
unsigned int vmin
Definition: fadcLib.h:197
void faDisableSoftTrig(int id)
Disable Software Triggers.
Definition: fadcLib.c:4352
unsigned int source_b
Definition: fadcLib.h:193
int faResetTriggerCount(int id)
Reset the trigger count for the module.
Definition: fadcLib.c:4910
int faSetScalerBlockInterval(int id, unsigned int nblock)
Set the block interval of scaler data insertion.
Definition: fadcLib.c:7559
int fadcFirmwareGetFpgaID(int pflag)
int faSetTriggerPathThreshold(int id, unsigned int TPT)
Set the threshold used to determine what samples are sent through the trigger path.
Definition: fadcLib.c:2158
void faSDC_Enable(int nsync)
Enable Triggers and/or SyncReset on the SDC.
Definition: fadcLib.c:8388
unsigned int chan
Definition: fadcLib.h:172
volatile unsigned int syncp0count
Definition: fadcLib.h:140
int faGTokenStatus()
Return the slotmask of those modules that have the token.
Definition: fadcLib.c:3414
void faSetInvertedMode(int id)
Configure the ADC Processing in "Inverted (positive polarity) Mode".
Definition: fadcLib.c:2327
void faTrig2(int id)
Pulse a software playback trigger to the module.
Definition: fadcLib.c:3927
int faGSuppressTriggerTime(int suppress)
Suppress all, or just the MSB, of the trigger time words from the datastream.
Definition: fadcLib.c:2540
unsigned int nsa_ext
Definition: fadcLib.h:180
volatile unsigned int berr_drive_count
Definition: fadcLib.h:48
unsigned int n_words
Definition: fadcLib.h:162
void faItrigSetTableVal(int id, unsigned short tval, unsigned short pMask)
unsigned int valid_1
Definition: fadcLib.h:174
Definition: fadcLib.h:858
void faGSetHistoryBufferThreshold(int thres)
Set the threshold to trigger for the history buffer to be saved for readout for all initialized fADC2...
Definition: fadcLib.c:7753
volatile unsigned int adr32
Definition: fadcLib.h:60
unsigned int adc_sum
Definition: fadcLib.h:182
int faGetScalerBlockInterval(int id)
Definition: fadcLib.c:7591
void faSDC_Disable()
Disable Triggers and SyncReset on the SDC.
Definition: fadcLib.c:8410
unsigned int faTestGetClock250Counter(int id)
Return the value of the 250Mhz Clock scaler.
Definition: fadcLib.c:7143
int fadcFirmwareReadFile(char *filename)
int faStateMap(unsigned int state_value)
Convert state value to mapped identifier.
Definition: fadcLib.c:7984
int faSuppressTriggerTime(int id, int suppress)
Suppress all, or just the MSB, of the trigger time words from the datastream.
Definition: fadcLib.c:2485
void faGEnableSyncSrc()
Enable the SyncReset Source of all initialized fADC250s.
Definition: fadcLib.c:3713
void fadcFirmwareDownloadConfigData(int id)
int faSetTriggerPathSamples(int id, unsigned int TNSA, unsigned int TNSAT)
Set the number of samples that are included before and after threshold crossing that are sent through...
Definition: fadcLib.c:2080
unsigned int evt_num_2
Definition: fadcLib.h:164
volatile unsigned int sum_threshold
Definition: fadcLib.h:102
int faSetTrig21Delay(int id, int delay)
Configure the delay between the software playback trigger and trigger.
Definition: fadcLib.c:3966
void faClearError(int id)
Clear latched errors.
Definition: fadcLib.c:3154
void faGSetDataFormat(int format)
Set the readout data form for all initialized modules.
Definition: fadcLib.c:6262
void faGReset(int iFlag)
Perform a hard reset on all initialized fADC250s.
Definition: fadcLib.c:3247
int faGetDAC(int id, unsigned short *indata)
Readback the DAC values currently used by the module in the specified slot.
Definition: fadcLib.c:5446
volatile unsigned int config7
Definition: fadcLib.h:114
volatile unsigned int prom_reg1
Definition: fadcLib.h:82
unsigned int faTestGetSyncCounter(int id)
Return the value of the SyncReset scaler.
Definition: fadcLib.c:7174
unsigned int evt_of_blk
Definition: fadcLib.h:165
Definition: fadcLib.h:207
int faClearScalers(int id)
Clear the scalers (and enable, if disabled)
Definition: fadcLib.c:5889
int faBusy(int id)
Get the busy status.
Definition: fadcLib.c:4278
volatile unsigned int ev_count
Definition: fadcLib.h:67
int faReadAllChannelSamples(int id, volatile unsigned int *data)
Read the current sample data from the specified channel and module.
Definition: fadcLib.c:5224
volatile unsigned int ram_word_count
Definition: fadcLib.h:72
volatile unsigned int delay
Definition: fadcLib.h:63
volatile unsigned short csr
Definition: fadcLib.h:210
int faArmHistoryBuffer(int id)
Enable the history buffer for data acquisition for the module.
Definition: fadcLib.c:7796
unsigned int time_3
Definition: fadcLib.h:170
unsigned int modID
Definition: fadcLib.h:158
volatile unsigned int hitsum_hit_info
Definition: fadcLib.h:123
volatile unsigned int hitsum_status
Definition: fadcLib.h:121
unsigned int NSB
Definition: fadcLib.h:160
void faPPGDisable(int id)
Disable the programmable pulse generator.
Definition: fadcLib.c:2452
Definition: fadcLib.h:853
unsigned int faItrigGetHBdelay(int id, unsigned int chan)
int faGProcPedConfig(int nsamples, int maxvalue)
Configure pedestal parameters to be used by processing algorythm for all initialized modules...
Definition: fadcLib.c:5141
unsigned int width
Definition: fadcLib.h:173
unsigned int type
Definition: fadcLib.h:152
int faGSetClockSource(int clkSrc)
Set the clock source for all initialized modules.
Definition: fadcLib.c:930
volatile unsigned short busy_status
Definition: fadcLib.h:213
volatile unsigned int itrig_cfg
Definition: fadcLib.h:64
STATUS faInit(UINT32 addr, UINT32 addr_inc, int nadc, int iFlag)
Initialize JLAB FADC Library.
Definition: fadcLib.c:188
unsigned int evt_num_1
Definition: fadcLib.h:163
volatile unsigned int gen_evt_header
Definition: fadcLib.h:93
int faItrigSetHBdelay(int id, unsigned short hbDelay, unsigned short hbMask)
void faDisable(int id, int eflag)
Disable data acquisition, triggers, and SyncReset on the module.
Definition: fadcLib.c:3822
void faGStatus(int sflag)
Print a summary of all initialized fADC250s.
Definition: fadcLib.c:1357
int faGetChannelPedestal(int id, unsigned int chan)
Get the pedestal value of specified channel.
Definition: fadcLib.c:5559
int faStateReadBuffer(int id, volatile unsigned int *data, int nwords)
Read state machine buffer.
Definition: fadcLib.c:7935
unsigned int faGetProcFPGAData(int id)
Return raw register data from the Processing FPGA containing the temperature.
Definition: fadcLib.c:6304
int fadcFirmwareTestReady(int id, int n_try, int pFlag)
void faSetCalib(int id, unsigned short sdelay, unsigned short tdelay)
Set the SyncReset and Trigger Delay.
Definition: fadcLib.c:3472
volatile unsigned int status3
Definition: fadcLib.h:118
unsigned int faGetFirmwareVersions(int id, int pflag)
Get the firmware versions of each FPGA.
Definition: fadcLib.c:1676
int faPrintThreshold(int id)
Print the thresholds of all channels to standard out.
Definition: fadcLib.c:5053
int faGetHistoryBufferThreshold(int id)
Get the history buffer threshold.
Definition: fadcLib.c:7770
void fadcFirmwareUpdateWatcher(faUpdateWatcherArgs_t arg)
void faTestSetBusyOut(int id, int mode)
Set the level of Busy Out to the SD.
Definition: fadcLib.c:6944
int faSetTrigSource(int id, int source)
Set the trigger source for the module.
Definition: fadcLib.c:4764
unsigned int time_2
Definition: fadcLib.h:169
unsigned int time_low_10
Definition: fadcLib.h:167
void faGDACReset()
Perform a reset of the DAC chip for all initialized modules.
Definition: fadcLib.c:3342
int faForceEndOfBlock(int id, int scalers)
Allows for the insertion of a block trailer into the data stream.
Definition: fadcLib.c:7626
void faSDC_Trig()
Perform a trigger pulse from the SDC.
Definition: fadcLib.c:8450
float faGetCtrlFPGATemp(int id, int pflag)
Return the value of the Control FPGA temperature (in degrees Celsius)
Definition: fadcLib.c:6332
int faStateArmBuffer(int id, int enable)
Enable/Disable Buffer to store state machine diagnostics.
Definition: fadcLib.c:7905
unsigned int time
Definition: fadcLib.h:189
void faGDataInsertAdcParameters(int enable)
Insert ADC parameter word into datastream. For all initialized modules. The data word appears as a bl...
Definition: fadcLib.c:6129
volatile unsigned int hitsum_coin_bits
Definition: fadcLib.h:128
volatile unsigned int ctrl1
Definition: fadcLib.h:56
int faGetSerialNumber(int id, char **rval, int snfix)
Fills 'rval' with a character array containing the fa250 serial number.
Definition: fadcLib.c:7415
volatile unsigned int adc_nsa
Definition: fadcLib.h:111
int faSDC_Busy()
Return Busy status of the SDC.
Definition: fadcLib.c:8469
int faGSampleConfig(int nsamples, int maxvalue)
Configure output of sample data from for all initialized modules.
Definition: fadcLib.c:5204
volatile unsigned int trig2_scal
Definition: fadcLib.h:89
unsigned int adc_1
Definition: fadcLib.h:175
volatile unsigned int blk_fifo_count
Definition: fadcLib.h:69
volatile unsigned int value
Definition: fadcLib.h:46
volatile unsigned int adr_mb
Definition: fadcLib.h:61
int fadcFirmwareChipFromFpgaID(int pflag)
void faTestResetTrig1Counter(int id)
Reset the counter of the trig1 scaler.
Definition: fadcLib.c:7321
void faDisableMultiBlock()
Disable multiblock transfer for all initialized fADC250s.
Definition: fadcLib.c:4644
void faTestSetSystemTestMode(int id, int mode)
Enable/Disable System test mode.
Definition: fadcLib.c:6868
void faSoftReset(int id, int cflag)
Perform either a soft clear or soft reset.
Definition: fadcLib.c:3296
int faSetThreshold(int id, unsigned short tvalue, unsigned short chmask)
Set the readout threshold value for specified channel mask.
Definition: fadcLib.c:4990
unsigned int time_now
Definition: fadcLib.h:166
volatile unsigned int level
Definition: fadcLib.h:44
volatile unsigned int trig21_delay
Definition: fadcLib.h:78
volatile unsigned int retry_drive_count
Definition: fadcLib.h:49
volatile unsigned int config6
Definition: fadcLib.h:113
volatile unsigned int lost_trig_scal
Definition: fadcLib.h:87
int fadcFirmwareLoad(int id, int chip, int pFlag)
int faSetClockSource(int id, int clkSrc)
Set the clock source.
Definition: fadcLib.c:855
unsigned int source_a
Definition: fadcLib.h:191
void faSync(int id)
Pulse a software SyncReset.
Definition: fadcLib.c:4047
int faSetDataFormat(int id, int format)
Set the readout data form which allows for suppression of repetitious data words. ...
Definition: fadcLib.c:6225
Definition: fadcLib.h:852
int faSetProcMode(int id, int pmode, unsigned int PL, unsigned int PTW, int NSB, unsigned int NSA, unsigned int NP, unsigned int NPED, unsigned int MAXPED, unsigned int NSAT)
Configure the processing type/mode.
Definition: fadcLib.c:1733
unsigned int spare
Definition: fadcLib.h:47
volatile unsigned int gen_evt_trailer
Definition: fadcLib.h:95
volatile unsigned int trailer_scal
Definition: fadcLib.h:90
faArgs_enum
Definition: fadcLib.h:849
volatile unsigned int adc_ptw
Definition: fadcLib.h:108
unsigned int PL
Definition: fadcLib.h:159
void faPPGEnable(int id)
Enable the programmable pulse generator.
Definition: fadcLib.c:2431
int faItrigGetTableVal(int id, unsigned short pMask)
volatile unsigned short busy_enable
Definition: fadcLib.h:212
volatile unsigned int gen_evt_data
Definition: fadcLib.h:94
unsigned int faGetA32M()
Return the base address of the A32 Multiblock.
Definition: fadcLib.c:6017
void faDisableBusError(int id)
Disable bus errors.
Definition: fadcLib.c:4569
void faGSetTriggerPathThreshold(unsigned int TPT)
Set the threshold used to determine what samples are sent through the trigger path for all initialize...
Definition: fadcLib.c:2198
int faItrigSetMode(int id, int tmode, unsigned int wWidth, unsigned int wMask, unsigned int cMask, unsigned int sumThresh, unsigned int *tTable)
int faDisableScalers(int id)
Disable counting in the scalers.
Definition: fadcLib.c:5966
volatile unsigned int config3
Definition: fadcLib.h:117
int faProcPedConfig(int id, int nsamples, int maxvalue)
Configure pedestal parameters to be used by processing algorythm.
Definition: fadcLib.c:5099
volatile unsigned int csr
Definition: fadcLib.h:45
int faSetMGTTestMode(int id, unsigned int mode)
Set the fa250 operation when Sync Reset is received.
Definition: fadcLib.c:5599
void faGSetHitbitsMode(int enable)
Enable/Disable Hitbits mode for all initialized fADC250s.
Definition: fadcLib.c:5713
volatile unsigned int mem1_data
Definition: fadcLib.h:80
int faPrintBlock(int id, int rflag)
Print the current available block to standard out.
Definition: fadcLib.c:2977
float faGetProcFPGATemp(int id, int pflag)
Return the value of the Processing FPGA temperature (in degrees Celsius)
Definition: fadcLib.c:6426
void faEnableSyncSrc(int id)
Enabled the SyncReset source.
Definition: fadcLib.c:3666
int fadcFirmwareAttachUpdateWatcher(VOIDFUNCPTR routine, faUpdateWatcherArgs_t arg)