From 11bb3f0a3eee60dc8329e9f28c1840a537c1e80a Mon Sep 17 00:00:00 2001 From: cturek Date: Wed, 13 Jul 2022 18:11:13 +0000 Subject: [PATCH] Test generation files in common format --- pipelined/srt/exptestgen.c | 4 ++++ pipelined/srt/sqrttestgen | Bin 22792 -> 22792 bytes pipelined/srt/sqrttestgen.c | 17 +++++++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pipelined/srt/exptestgen.c b/pipelined/srt/exptestgen.c index 61fe74aa4..d6bebb774 100644 --- a/pipelined/srt/exptestgen.c +++ b/pipelined/srt/exptestgen.c @@ -96,6 +96,10 @@ void output(FILE *fptr, int aSign, int aExp, double aFrac, int bSign, int bExp, // Print r in standard double format fprintf(fptr, "%03x", rExp|(rSign<<11)); printhex(fptr, rFrac); + fprintf(fptr, "_"); + + // Spacing for testbench, value doesn't matter + fprintf(fptr, "%016x", 0); fprintf(fptr, "\n"); } diff --git a/pipelined/srt/sqrttestgen b/pipelined/srt/sqrttestgen index dadc5dc5c8d36055ee1c68c8296279c302aa4efb..06615165395cb6abb37c9d60152d5fe70f15e11a 100755 GIT binary patch delta 1496 zcmZwFUu+ab7y$5@y+8D>dwYBQyH=zeO}P{r=pj&o!QPT~+YM1tlqL57$b-gGeJCc{ zKAL_2l*X%rF5edal=QY zZ}9UV%d5MF@h%wydfw>2HvS^M=PLiUZPD70h+A4~H!Mqoqq|MHAFeT6moMdDNNru-Uz9)6K`SB*ZJ=lh4Y z-J{RDd)}Jg^7esL*q|9-9t_6DLn3EhFRuv?8V(|C8Is9$(?{e7e7_mbRP9xeqw z^TjsTb+UDxjKKlr_40q>W}*BUKQkoC!}ycwqxhSL-;~p96LYpbh-)d!+jhIy4Av*G zUch<+>oxF6FzhSA&#iIBI^mmO&4#l$rWX5H;}TWHDu(|n*oNP_P^$3Ri2t!!SgJ;O z9qdroEZdHUJSDn!DQd6O5b#PlcvXFlPr#RIGtXH(^sx-ns}0Fetfwp9Tj4YCKtySQ zTU#3Z*?=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ZMD|( diff --git a/pipelined/srt/sqrttestgen.c b/pipelined/srt/sqrttestgen.c index b4ece1473..710fc32f3 100644 --- a/pipelined/srt/sqrttestgen.c +++ b/pipelined/srt/sqrttestgen.c @@ -33,11 +33,7 @@ void main(void) double mans[ENTRIES] = {1, 1.5, 1.25, 1.125, 1.0625, 1.75, 1.875, 1.99999, 1.1, 1.2, 1.01, 1.001, 1.0001, -<<<<<<< Updated upstream - 1/1.1, 1/1.5, 1/1.25, 1/1.125}; -======= 2/1.1, 2/1.5, 2/1.25, 2/1.125}; ->>>>>>> Stashed changes double exps[ENTRIES] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; int i; @@ -69,14 +65,23 @@ void main(void) void output(FILE *fptr, int aExp, double aFrac, int rExp, double rFrac) { + // Print a in standard double format fprintf(fptr, "%03x", aExp); printhex(fptr, aFrac); fprintf(fptr, "_"); + + // Spacing for testbench, value doesn't matter + fprintf(fptr, "%016x", 0); + fprintf(fptr, "_"); + + // Print r in standard double format fprintf(fptr, "%03x", rExp); printhex(fptr, rFrac); + fprintf(fptr, "_"); + + // Spacing for testbench, value doesn't matter + fprintf(fptr, "%016x", 0); fprintf(fptr, "\n"); - - } void printhex(FILE *fptr, double m)