From: Pavel Pisa Date: Sun, 7 Dec 2014 21:52:00 +0000 (+0100) Subject: RoCoN: minor adjustment of fncapprox test; X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/lx-cpu1/lx-rocon.git/commitdiff_plain/027605eac09baa6a6ad300b2cd297b19e1a27e92 RoCoN: minor adjustment of fncapprox test; Reduce test range by 16. Signed-off-by: Pavel Pisa --- diff --git a/sw/app/rocon/appl_tests.c b/sw/app/rocon/appl_tests.c index 4443e6d..852e884 100644 --- a/sw/app/rocon/appl_tests.c +++ b/sw/app/rocon/appl_tests.c @@ -309,7 +309,7 @@ int cmd_do_testfncapprox(cmd_io_t *cmd_io, const struct cmd_des *des, char *para double xf; int64_t yl; long count = 1; - long step = 1 << (30-7-18+1); + long step = 1 << (30-7-18+1 +4); si_skspace(&ps); if (si_ulong(&ps, &fnc, 0) < 0) @@ -318,7 +318,7 @@ int cmd_do_testfncapprox(cmd_io_t *cmd_io, const struct cmd_des *des, char *para si_skspace(&ps); if (!strcmp(ps, "all")) { val = 0; - count = 0x80000000 / step; + count = 0x80000000UL / step; if (fnc == 1) { val = 1; } @@ -370,6 +370,8 @@ int cmd_do_testfncapprox(cmd_io_t *cmd_io, const struct cmd_des *des, char *para } + val -= step; + printf("fnc=%ld val=0x%08lx res=0x%08lx ref=0x%08lx diff=%ld max %ld\n", fnc, val, res, (unsigned long)yl, diff, diff_max);