From 274ecf13ad74106c7704f46d6342011ad0b70a74 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 27 Feb 2022 14:20:15 +0000 Subject: [PATCH] Moved fma directory --- {pipelined/src/fma => fma}/Makefile | 0 fma/div | Bin 0 -> 22376 bytes {pipelined/src/fma => fma}/div.c | 0 {pipelined/src/fma => fma}/fma.do | 0 {pipelined/src/fma => fma}/fma16.sv | 2 +- fma/fma16_testgen | Bin 0 -> 27592 bytes {pipelined/src/fma => fma}/fma16_testgen.c | 2 +- fma/fma32 | Bin 0 -> 22472 bytes fma/fma32.c | 47 +++++++++++++++++++++ {pipelined/src/fma => fma}/lint-fma | 0 {pipelined/src/fma => fma}/sim-fma | 0 {pipelined/src/fma => fma}/testbench.sv | 0 12 files changed, 49 insertions(+), 2 deletions(-) rename {pipelined/src/fma => fma}/Makefile (100%) create mode 100755 fma/div rename {pipelined/src/fma => fma}/div.c (100%) rename {pipelined/src/fma => fma}/fma.do (100%) rename {pipelined/src/fma => fma}/fma16.sv (99%) create mode 100755 fma/fma16_testgen rename {pipelined/src/fma => fma}/fma16_testgen.c (97%) create mode 100755 fma/fma32 create mode 100644 fma/fma32.c rename {pipelined/src/fma => fma}/lint-fma (100%) rename {pipelined/src/fma => fma}/sim-fma (100%) rename {pipelined/src/fma => fma}/testbench.sv (100%) diff --git a/pipelined/src/fma/Makefile b/fma/Makefile similarity index 100% rename from pipelined/src/fma/Makefile rename to fma/Makefile diff --git a/fma/div b/fma/div new file mode 100755 index 0000000000000000000000000000000000000000..faeb00d9780c130fc13bf8389a7432620000dd33 GIT binary patch literal 22376 zcmeHP4{%$>nP16&V#kRjAR*>YlSeP)lF%r2u!D0njgbT9bgjXi3BAnC+zg#El-@Ac++CZd*Ou7iA8_=}KwCI+y-6T&3LzKMLJ|^U z-S_R=PkQg^iDqu@3QV>3d*AMFzwdjy-~M^4-F^E|i@()wvoUgZ_9cd)?g|fwv^!&& z4Lm5YCRWWnY(D!Os|2JRE)S1Es`-ds5UPn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z=kGJg(>(NE@%&m!n2(6A*_iBv13?$Hii&1aW#t@*cO7bHn z9C^_ZEd!6fiO_ui(-LQ6-KGX?u79YWU>x-KFV(gs3VL!eVF0vcts~RxMJ9u-h fsZH~KOP@G^DBZ+}-#l5#KaVd4aMzgxOhNWPPs= 7'd46) begin // overflow - uebiased = 5'd30; + uebiased = 7'd30; uff = 10'h3ff; end else begin uebiased = ue-7'd15; diff --git a/fma/fma16_testgen b/fma/fma16_testgen new file mode 100755 index 0000000000000000000000000000000000000000..625c721897366e56d5283567e853a5d456632a6c GIT binary patch literal 27592 zcmeHw3v^T0neLHngUv(73?w)t!Rn0Ym^28B05xft=zwG&Wn`e(5JEy^VN2k|wtV#n zBrDU{l}$K9+1TtwbA&GUr zf1karho#=ES?f;H8E=sOy}$kc|Ni&CA7`I^j42 z+Q5<=tB{H$yEIq2UYZ0XA0Io*A*#m&z06e$TFCkGKuNB`r~?&7JBtWPicn8aFRpys)WZK~rN(Wcz~c6-yT^U2F{ntczH^Nk8#cty;%QqV^W5 z$mUu25JveYe|7QfO(*uuTv=iJ_K%-mf9_zxi@zsX@j>)UhZ=C2vv5>T8kwt&woO z}_n3s@$#>D?N*>i>yl|kE^!Y)8GsGwls#q zzF=+j%BDbzuhzS{$tQU{TbctcT+*YnW@RKhjr^a85oTcjFrFxZ5Si0hMEO;EQW{!V z$70l%sr^NWr{JQ`Q{KfCJhlH{PQj-LC7>ncbu2X*-=aSfU{1lQUy4wcf~U?qVGvLI$27Jq< zcEl*XmGXv%5(x7)Qkq;fJiyXxDNR)yjJEZ z;u$yR*D-$J3Nn3*x1)|spzPm}SC?;g(C15R5Eye0kQAKQ7C_VV4Tc1Df9b8$_r z>u9XI#4f2v`^=0SEuI9wTs3FDS^8r)@%Q_!a%l&YN>aDlwftwuP`e6#LS)(H@Ktd2 zdu52j)kTRRxwMTK`#A;we_{Mf?jbUNRP7thQ?-j~U;I|pa72B1G&~Cmp5qD%6GMKv z)RB~@^4pfrhpZHtxlYyIjX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Qp{mo(TX3%g@r&~pg{g?p@jTZdM!m6xrEeLzJ z@YI%;h;?(M5q~G45!WC}ZKdC6SR3wdfj*svgL=+=z96eGW8(=A^03VCk^qmj!VOl| z>eeuvCRy1SwFU!hKv;cS`7F4#0kR^cOX$;~E+OJj>}_tuqHPPU$na%l1?bAqypolg z9h0qYB&&?o8x98>H%Bn#r!PDI%_;ib7~Lb#b{GZm96^oE5fgBuL6%h9CHrg5QZVm|h#eEZ& z^J!rfQuJFkA-~^fM+*1V94O>BP;@^=Q6VqxZ`K22TXCQiVtIB>8DZy6=`sDAs~dx8 z--3RtCdwDjJ!qeeg1Da-_6t5i?*$M2_D!V4^O06AZzd%OnfB|bBt3u#u?l(d9HpDf z*KtNserEkUxcmyvC!V)lsf^nesmXMm`buyW+VF?Q>BOziZS}$@^=O)(}aR z7te3@aQRlj$SHg83UNUn&5#%OyT#m~&Wz0rAt%)SBtu@jH?^C0km-VvQ|^{AbPr-= zzwp0!ZnT%nw`O!0;Xk2ZZ-%^hzEmT^Dpstg9f<&ME?@yigtVpvcw|f z#os|0;u|Vvs0)sj0$<3pqhAWXOwsFqO;Sl0#m=pKzVRezA|! z!R0fWkJ&0@iC)2n?C0zRu^{9-1;8osQV^8>3;W{>FmLI=@S zI=BpBHy=PWk8i?9_)W~e*j5>9J4DAq;YL0B4PrK4pojnf literal 0 HcmV?d00001 diff --git a/pipelined/src/fma/fma16_testgen.c b/fma/fma16_testgen.c similarity index 97% rename from pipelined/src/fma/fma16_testgen.c rename to fma/fma16_testgen.c index 69bade22f..b294552e6 100644 --- a/pipelined/src/fma/fma16_testgen.c +++ b/fma/fma16_testgen.c @@ -65,7 +65,7 @@ void genCase(FILE *fptr, float16_t x, float16_t y, float16_t z, int mul, int add resultmag.v &= 0x7FFF; // take absolute value if (f16_lt(resultmag, smallest) && (resultmag.v != 0x0000)) fprintf (fptr, "// skip denorm: "); if (resultmag.v == 0x0000 && !zeroAllowed) fprintf(fptr, "// skip zero: "); - if (resultmag.v == 0x7C00 && !infAllowed) fprintf(fptr, "// Skip inf: "); + if ((resultmag.v == 0x7C00 || resultmag.v == 0x7BFF) && !infAllowed) fprintf(fptr, "// Skip inf: "); if (resultmag.v > 0x7C00 && !nanAllowed) fprintf(fptr, "// Skip NaN: "); fprintf(fptr, "%04x_%04x_%04x_%02x_%04x // %s\n", x.v, y.v, z.v, op, result.v, calc); } diff --git a/fma/fma32 b/fma/fma32 new file mode 100755 index 0000000000000000000000000000000000000000..44be8588f834e8451238a2fe1f47ea056f972c23 GIT binary patch literal 22472 zcmeHP4RBM}mA;Y<*g*75AqxpDRyKyk6of^9nl=Q9Soo%en1wsjJ2^XMt%yA zWQtkaXbH*`~88L(&OIn4dy_Vw`02*X@v$WMy0u(lprl!P@WK zcdsQqNm*uRw@IeH_S3odyXTyD?zunjzI)$$yF9)%R*QwnU}ZNjN|j7-ame^(Os(Zf zfmO0%=3;Z$*VsfLg*aS1ho}*gbVR6@v`Fw3fRbFL)c`83E*_Ees|L&@l@=16Ao2|2 z5-EeuFENsmGG^xh$&sxv+6Z$RGU&W9J4C*aBbek$gj|V`leC`{BSuK+rsTa(r>WlWaRc)$NWl33;#oV<#~)nuMQQH=gUO;Olbp; zQClJZ%8*FIsa|BbkcP{)MtLJ?czS=FWpCi3lkh9+n}83LIUlQCe=Jh>OxQWw&eWcm zW=;01T}O-hIKTW!E{h;LIakB4QtCpC(k+xdcqW-l)*WW7^YC*|J@r&lA3Z*y4Vmot zgrGs{h$PBUuERUfZ}dL>xHFb`7GnC>s*%^MycausFLDl2(LYdbo8SbR*bfG0?Djr7 zAKB?V@6}IlR`s{kuCo_v>%AvpwUALy#LrA6a^mSi*mdPoSKHa2_Y!|!vqLHEhDOHr zs=X^uBSY<-aEi!^5$#G8`7Vm1$i>MsN@*uC;$)nH|3{SByX;XS<)dnRv_RD_sPV)q z)pA@tJ*v%sf*Q(%f}-S^W~H<$B~Rz?T)7F^EINIIs=uAM8>Klu;qQT1Hudf8Yfc#_ z%Qy7B6h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#z;!F&@Xt zdAS}bzrSZkUV4!8Xo)!yNtc)FmYOiAOfm{;mahViPh5nh{rjyh&beOz(tbIQmiH%| z2|sIb(7P;BUao^46u@4=h-oMHla!w&@S8yka7cN%UaAs^Am5iUQrZ67j0}2LMas){ z)k8vFz6T`jmwb}m33+<=MW*HYYrl}UixZpe7cjdU5%Q^&m+Q0_gnWZwl;<~>zgx(! z7JRjZE*_(G2ny0qBu{gAv;2d=sQreDY{JgS0PJnN1k7GEUi^>#x_5F>$KDJSWBz|!UAx`kZ`O1q^3;!O`9B0;*O{c^o-p55S* z+?eAk`kj@IpAgGk@G2!z3k`^FB +#include +#include "softfloat.h" +#include "softfloat_types.h" + +int float_rounding_mode = 0; + +union sp { + unsigned short x[2]; + float y; +} X; + + +int main() +{ + uint8_t rounding_mode; + uint8_t exceptions; + + uint32_t multiplier, multiplicand, addend, result; + float32_t f_multiplier, f_multiplicand, f_addend, f_result; + + multiplier = 0xbf800000; + multiplicand = 0xbf800000; + addend = 0xffaaaaaa; + + f_multiplier.v = multiplier; + f_multiplicand.v = multiplicand; + f_addend.v = addend; + + softfloat_roundingMode = rounding_mode; + softfloat_exceptionFlags = 0; + softfloat_detectTininess = softfloat_tininess_beforeRounding; + + f_result = f32_mulAdd(f_multiplier, f_multiplicand, f_addend); + + result = f_result.v; + exceptions = softfloat_exceptionFlags & 0x1f; + + printf("%x\n", f_result.v); + + // Print out SP number + X.x[1] = (f_result.v & 0xffff0000) >> 16; + X.x[0] = (f_result.v & 0x0000ffff); + printf("Number = %f\n", X.y); + + return 0; +} diff --git a/pipelined/src/fma/lint-fma b/fma/lint-fma similarity index 100% rename from pipelined/src/fma/lint-fma rename to fma/lint-fma diff --git a/pipelined/src/fma/sim-fma b/fma/sim-fma similarity index 100% rename from pipelined/src/fma/sim-fma rename to fma/sim-fma diff --git a/pipelined/src/fma/testbench.sv b/fma/testbench.sv similarity index 100% rename from pipelined/src/fma/testbench.sv rename to fma/testbench.sv