Commit a072a95e authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

software/lib: fix compilation error in fdelay_bus.c, disabled long tests by default

parent 66491288
CFLAGS = -I../include -g -Imini_bone -Ispll -DPERFORM_LONG_TESTS
CFLAGS = -I../include -g -Imini_bone -Ispll
OBJS_LIB = fdelay_lib.o rr_io.o i2c_master.o onewire.o mini_bone/minibone_lib.o mini_bone/ptpd_netif.o spec_common.o
#uncomment for extra tests (DAC, output stage INL/DNL)
#CFLAGS += -DPERFORM_LONG_TESTS
OBJS_LIB = fdelay_lib.o fdelay_bus.o rr_io.o i2c_master.o onewire.o mini_bone/minibone_lib.o mini_bone/ptpd_netif.o spec_common.o
all: testprog lib testprog2 testprog3 testprog4
......
......@@ -39,7 +39,7 @@ return d;
fdelay_device_t *fdelay_create_rawrabbit(uint32_t base_addr)
{
fdelay_device_t *dev = malloc(sizeof(fdelay_device_t));
rr_init(RR_DEVSEL_NONE, RR_DEVSEL_NONE);
rr_init(RR_DEVSEL_UNUSED, RR_DEVSEL_UNUSED);
dev->writel = my_rr_writel;
dev->readl = my_rr_readl;
dev->base_addr = base_addr;
......
......@@ -661,11 +661,12 @@ static void measure_linearity(double *x, int n, double *inl, double *dnl)
its linearity, performing an indirect check of the delay lines' and TDC signal connections. */
#define MAX_DNL 20
#define MAX_INL 50
#define MAX_INL 60
static int test_delay_transfer_function(fdelay_device_t *dev)
{
double inl, dnl;
int lin_fail = 0;
fd_decl_private(dev)
......@@ -693,15 +694,18 @@ static int test_delay_transfer_function(fdelay_device_t *dev)
dbg("Linearity: INL = %.1f ps, DNL = %.1f ps\n", inl, dnl);
if(inl > MAX_INL || dnl > MAX_DNL)
{
dbg("Linearity check failed.\n");
fail(TEST_DELAY_LINE, "Maximum INL/DNL exceeded, indicating a wrong connection of the delay chip and/or the TDC calibration signals");
return -1;
}
lin_fail=1;
}
if(lin_fail)
{
dbg("Linearity check failed.\n");
fail(TEST_DELAY_LINE, "Maximum INL/DNL exceeded, indicating a wrong connection of the delay chip and/or the TDC calibration signals");
return -1;
}
return 0;
/* FILE *f=fopen("t_func.dat","w");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment