From 46e448c187b1eafcaddd9f04c25ed04c3b0c72f1 Mon Sep 17 00:00:00 2001 From: muench Date: Thu, 3 Feb 2000 18:28:47 +0000 Subject: [PATCH] *** empty log message *** --- hadaq/hwv775.c | 5 +++- hadaq/hwv878.c | 8 +++--- hadaq/ipc_basis.h | 66 ++++++++++++++++++++++++++++++++++++----------- hadaq/makeenv | 3 +++ hadaq/showevt.c | 8 +++--- 5 files changed, 67 insertions(+), 23 deletions(-) diff --git a/hadaq/hwv775.c b/hadaq/hwv775.c index 731a7e2..c956bcb 100644 --- a/hadaq/hwv775.c +++ b/hadaq/hwv775.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.8 2000-02-03 09:54:03 muench Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.9 2000-02-03 18:28:47 muench Stab $"; #define _POSIX_C_SOURCE 199309L #include @@ -34,8 +34,10 @@ int conHwV775(HwV775 *my, const char *name, const Param *param) } LVme_setW(my->lvme, V775_RESET, 0); /* clear data, don't change next 2 lines */ + LVme_setW(my->lvme, V775_BIT_CLR_2, 0xffff); LVme_setW(my->lvme, V775_BIT_SET_2, 0x0004); LVme_setW(my->lvme, V775_BIT_CLR_2, 0x0004); + LVme_setW(my->lvme, V775_BIT_SET_2, 0x0020); LVme_setW(my->lvme, V775_CTRL_REG_2, 0x0003); LVme_setW(my->lvme, V775_CRATE_REG, 0x0000); LVme_setW(my->lvme, V775_RANGE_SET, Param_getVal(param, my->name, "range")); @@ -92,6 +94,7 @@ int HwV775_readData(HwV775 *my, void *subEvt) trigTag = eob & 0xff; if (trigTag != (SubEvt_trigNr(subEvt) & 0xff)) { + SubEvt_setId(subEvt, SubEvt_id(subEvt) | 0x80000000); msglog(LOG_EMERG, "%s trigNr mismatch: 0x%08x != 0x%02x \n", my->name, SubEvt_trigNr(subEvt), trigTag); } diff --git a/hadaq/hwv878.c b/hadaq/hwv878.c index 9ba88f6..100d3ea 100644 --- a/hadaq/hwv878.c +++ b/hadaq/hwv878.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv878.c,v 1.6 2000-02-03 09:54:03 muench Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv878.c,v 1.7 2000-02-03 18:28:47 muench Stab $"; #define _POSIX_C_SOURCE 199309L #include @@ -36,11 +36,12 @@ int conHwV878(HwV878 *my, const char *name, const Param *param) LVme_setW(my->lvme, V878_BIT_SET_1, 0x0080); LVme_setW(my->lvme, V878_BIT_CLR_1, 0x0080); /* clear data, don't change next 2 lines */ + LVme_setW(my->lvme, V878_BIT_CLR_2, 0xffff); LVme_setW(my->lvme, V878_BIT_SET_2, 0x0004); LVme_setW(my->lvme, V878_BIT_CLR_2, 0x0004); - LVme_setW(my->lvme, V878_BIT_SET_2, 0x9800); - LVme_setW(my->lvme, V878_BIT_CLR_2, 0x4000); + LVme_setW(my->lvme, V878_BIT_SET_2, 0xf800); LVme_setW(my->lvme, V878_CRATE_REG, 0x0000); + LVme_setW(my->lvme, V878_SLIDE, 0); LVme_setW(my->lvme, V878_FCLR_WIN, Param_getVal(param, my->name, "fclr_win")); LVme_setW(my->lvme, V878_VSET, Param_getVal(param, my->name, "vset")); LVme_setW(my->lvme, V878_VOFF, Param_getVal(param, my->name, "voff")); @@ -96,6 +97,7 @@ int HwV878_readData(HwV878 *my, void *subEvt) trigTag = eob & 0xff; if (trigTag != (SubEvt_trigNr(subEvt) & 0xff)) { + SubEvt_setId(subEvt, SubEvt_id(subEvt) | 0x80000000); msglog(LOG_EMERG, "%s trigNr mismatch: 0x%08x != 0x%02x \n", my->name, SubEvt_trigNr(subEvt), trigTag); } diff --git a/hadaq/ipc_basis.h b/hadaq/ipc_basis.h index af9964a..987fe12 100644 --- a/hadaq/ipc_basis.h +++ b/hadaq/ipc_basis.h @@ -11,16 +11,22 @@ ~ */ #if !defined(IPC_BASIS) -#define IPC_BASIS -#define BASIS_ADRESSE 0xffc00000 -#define BASIS_ADDR 0x00000000 -#define IPC_BASIS_ADR 0x00c00000 +#define IPC_1_BASIS 0xc00000 +#define IPC_2_BASIS 0xc00000 +#define IPC_ASPACE 0x00100000 + #define LVL2_OFFSET 0x60000 #define LUT5_OFFSET 0x40000 #define RC3_ACCESS_OFF 0x04022 #define RC3_ACCESS_ON 0x04020 +#define RC3_ERRREG_B 0x04014 +#define RC3_ERRREG_A 0x04012 +#define RC3_BYSREG_B 0x04010 +#define RC3_BYSREG_A 0x0400e +#define RC3_DISPLAY_REG 0x0400c +#define RC3_DISPLAY_RESET 0x0400a #define RC3_FIFO_RESET 0x04008 #define RC3_SHOWER_MODE 0x04006 #define RC3_TEST_MODE 0x04004 @@ -37,6 +43,7 @@ #define LVL2_ACCESS_OFF 0x0101e #define LVL2_ACCESS_ON 0x0101c +#define LVL2_SUBID_WRITE 0x0100e #define LVL2_STAT_READ 0x0100c #define LVL2_STAT_WRITE 0x0100a #define LVL2_VME_RCLK 0x01008 @@ -47,14 +54,18 @@ #define PEDAS_ACCESS_OFF 0x00e02 #define PEDAS_ACCESS_ON 0x00e00 +#define PEDAS_PEDCOR_OFF 0x00c0c +#define PEDAS_PEDCOR_ON 0x00c0a #define PEDAS_FIFO_RESET 0x00c08 #define PEDAS_SHOWER_MODE 0x00c06 #define PEDAS_TEST_MODE 0x00c04 #define PEDAS_CONF_MODE 0x00c02 #define PEDAS_STANDBY_MODE 0x00c00 -#define RC1_ACCESS_OFF 0x00a12 -#define RC1_ACCESS_ON 0x00a10 +#define RC1_ACCESS_OFF 0x00a1e +#define RC1_ACCESS_ON 0x00a1c +#define RC1_LD_F12_DISAB 0x00a10 +#define RC1_LD_F12_ENAB 0x00a0e #define RC1_FIFO_RCLK 0x00a0c #define RC1_VME_LVL2 0x00a0a #define RC1_FIFO_RESET 0x00a08 @@ -97,6 +108,11 @@ #define LUT2_WE 0x00010 /* bzw. LUT4_WE */ #define LUT12_WE 0x00012 /* bzw. LUT34_WE */ #define LUT1234_READ 0x00014 +#define LUT_CTR_LD_F12_ENAB 0x00016 +#define LUT_CTR_LD_F12_DISAB 0x00018 +#define LUT_CTR_LD_REG 0x0001a +#define LUT_CTR_LD_STR 0x0001e + /* -- Operational Modes of the Image Processing Card -- @@ -127,8 +143,6 @@ These codes/flags are just used by the controlling C-software #define LUT1234_SIZE 131071 #define LVL2_SIZE 65536 #define EVENT_SIZE 388 -#define NUM_RB_FIFOS 2 -#define NUM_COLS_RB_FIFO 8 #define FILENAME_LENGTH 30 #define CONF_VECTOR_SIZE 750000 @@ -142,22 +156,44 @@ These codes/flags are just used by the controlling C-software #define TDAT_RANDOM 1 #define TDAT_ZERO 2 -#define INTACTIVE 1 +#define INTACTIVE 1 #define BATCH 0 #define SRAM_A 0 #define SRAM_B 1 -#define SRAM_OLD 2 #define POS 1 #define NEG 0 -#define SRAM_ACCESS 0 -#define BUFF_ACCESS 1 +#define END_PATTERN 0x23ad +#define ZERO_SUPPRESSION_ON 0x8 +#define ZERO_SUPPRESSION_OFF 0x0 +#define PEDASTAL_ON 0x1 +#define PEDASTAL_OFF 0x0 +#define SEL_SRAM_A 0x0 +#define SEL_SRAM_B 0x2 +#define SEL_LVL2_PIPE 0x0 +#define SEL_LVL2_BUFFER 0x1 + +/* Layers, Rows, Columns per Shower Detector segment */ +/* +#define D_LAYS 3 +#define D_ROWS 32 +#define D_COLS 32 +*/ -#define D_LAYS 3 -#define D_ROWS 32 -#define D_COLS 16 +/* Layers, Rows, Columns per Image Processing Card */ +#define IPC_LAYS 3 +#define IPC_ROWS 16 +#define IPC_COLS 32 + +/* Layers, Rows, Columns per Readout Board */ +#define RB_LAYS 3 +#define RB_ROWS 32 +#define RB_COLS 16 +#define NUM_RBS 2 /* Number of RBs in current test 1 or 2 */ +#define NUM_RB_FIFOS 2 /* Number of fifos per RB */ +#define NUM_ROWS_RB_FIFO 8 /* Number of detector colmuns per RB fifo */ #endif diff --git a/hadaq/makeenv b/hadaq/makeenv index d513879..206b635 100644 --- a/hadaq/makeenv +++ b/hadaq/makeenv @@ -50,6 +50,9 @@ export HW_OBJS="hwrich.o hwrace.o rc.o" elif test $HW_CONF = "MDC" then export HW_OBJS="hwmdc.o hwsam.o" +elif test $HW_CONF = "SHOW" +then +export HW_OBJS="hwshow.o hwship.o" elif test $HW_CONF = "TBUS" then export HW_OBJS="hwtbus.o hwdtu.o" diff --git a/hadaq/showevt.c b/hadaq/showevt.c index b04731e..28d4e88 100644 --- a/hadaq/showevt.c +++ b/hadaq/showevt.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/showevt.c,v 6.2 1999-09-04 15:39:25 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/showevt.c,v 6.3 2000-02-03 18:35:27 muench Stab $"; #define _ANSI_C_SOURCE #include @@ -38,21 +38,21 @@ int analyseEvt(void *evt) if (SubEvt_decoding(subEvt) == SubEvtDecoding_32bitData) { for (i = 0; i < SubEvt_dataSize(subEvt) / sizeof(UInt4); i++) { if (i % 4 == 0) { /* newline and the offset in the subEvt */ - printf("\n%08d:", i); + printf("\n%08x:", i * sizeof(UInt4)); } printf(" 0x%08x", SubEvt_dataValue(subEvt, i)); } } else if (SubEvt_decoding(subEvt) == SubEvtDecoding_16bitData) { for (i = 0; i < SubEvt_dataSize(subEvt) / sizeof(UInt2); i++) { if (i % 8 == 0) { /* newline and the offset in the subEvt */ - printf("\n%08d:", i); + printf("\n%08x:", i * sizeof(UInt2)); } printf(" 0x%04x", SubEvt_dataValue(subEvt, i)); } } else if (SubEvt_decoding(subEvt) == SubEvtDecoding_8bitData) { for (i = 0; i < SubEvt_dataSize(subEvt) / sizeof(UInt1); i++) { if (i % 16 == 0) { /* newline and the offset in the subEvt */ - printf("\n%08d:", i); + printf("\n%08x:", i); } printf(" 0x%02x", SubEvt_dataValue(subEvt, i)); } -- 2.43.0