Changeset 511bc5 in git


Ignore:
Timestamp:
Aug 6, 2008, 12:01:52 PM (16 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
267a1cb8f0f1e83f957d8bddf5ef6f9883c36406
Parents:
948192173404d9f6b1f2afe6d36e4eef49fe83fe
Message:
ringgb.lib: weitere Beispiele am Schluss


git-svn-id: file:///usr/local/Singular/svn/trunk@10945 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ringgb.lib

    r948192 r511bc5  
    258258  findZeroPoly(f);
    259259}
     260
     261///////////////////////////////////////////////////////////////////////////////
     262
     263/*
     264                           Examples:
     265
     266
     267// POLYNOMIAL EXAMPLES (Singular ready)
     268// ===================
     269//
     270// For each of the examples below, there are three equivalent polynomials. 'm' indicates the bit-widths of the
     271// input/output variables. For some of the polynomials, I have attached the RTL as well.
     272//
     273//
     274// 1) VOLTERRA MODELS:
     275//
     276//        A) CUBIC FILTER: (m = 32, 3 Vars)
     277
     278LIB "ringgb.lib";
     279ring r = (integer, 2, 32), (x,y,z), dp;
     280poly p1 = 3795162112*x^3+587202566*x^2*y+2936012853*x*y*z+2281701376*x+548767119*y^3+16777216*y^2+268435456*y*z \
     281         +1107296256*y+4244635648*z^3+4244635648*z^2+16777216*z;
     282poly p2 = 1647678464*x^3+587202566*x^2*y+2936012853*x*y*z+134217728*x+548767119*y^3+16777216*y^2+268435456*y*z \
     283         +1107296256*y+2097152000*z^3+2097152000*z^2+16777216*z;
     284poly p3 = 1647678464*x^3+587202566*x^2*y+2936012853*x*y*z+134217728*x+548767119*y^3+16777216*y^2+268435456*y*z \
     285         +1107296256*y+2097152000*z^3+2097152000*z^2+16777216*z;
     286zeroReduce(p1-p2);
     287zeroReduce(p1-p3);
     288zeroReduce(p2-p3);
     289
     290//        B) DEGREE-4 FILTER: (m=16 , 3 Vars)
     291
     292LIB "ringgb.lib";
     293ring r = (integer, 2, 16), (x,y,z), dp;
     294poly p1 = 16384*x^4+y^4+57344*z^4+64767*x*y^3+16127*y^2*z^2+8965*x^3*z+19275*x^2*y*z+51903*x*y*z+32768*x^2*y  \
     295         +40960*z^2+32768*x*y^2+49152*x^2+4869*y;
     296poly p2 = 8965*x^3*z+19275*x^2*y*z+31999*x*y^3+51903*x*y*z+32768*x*y+y^4+32768*y^3+16127*y^2*z^2+32768*y^2 \
     297         +4869*y+57344*z^4+40960*z^2;
     298poly p3 = 8965*x^3*z+19275*x^2*y*z+31999*x*y^3+51903*x*y*z+32768*x*y+y^4+16127*y^2*z^2+4869*y+16384*z^3+16384*z;
     299zeroReduce(p1-p2);
     300zeroReduce(p1-p3);
     301zeroReduce(p2-p3);
     302
     303
     304// 2) Savitzsky Golay filter(m=16,5 Vars)
     305
     306LIB "ringgb.lib";
     307ring r = (integer, 2, 16), (v,w,x,y,z), dp;
     308poly p1 = 25000*v^2*y+37322*v^2+22142*v*w*z+50356*w^3+58627*w^2+17797*w+17797*x^3+62500*x^2*z+41667*x \
     309         +22142*y^3+23870*y^2+59464*y+41667*z+58627;
     310poly p2 = 25000*v^2*y+4554*v^2+22142*v*w*z+32768*v+17588*w^3+25859*w^2+17797*w+17797*x^3+29732*x^2*z+32768*x^2 \
     311         +32768*x*z+8899*x+22142*y^3+23870*y^2+59464*y+41667*z+58627;
     312poly p3 = 25000*v^2*y+4554*v^2+22142*v*w*z+32768*v+17588*w^3+25859*w^2+17797*w+17797*x^3+29732*x^2*z+32768*x*z \
     313         +41667*x+22142*y^3+23870*y^2+59464*y+41667*z+58627;
     314zeroReduce(p1-p2);
     315zeroReduce(p1-p3);
     316zeroReduce(p2-p3);
     317
     318
     319// 3) Anti-alias filter:(m=16, 1 Var)
     320
     321LIB "ringgb.lib";
     322ring r = (integer, 2, 16), c, dp;
     323poly p1 = 156*c^6+62724*c^5+17968*c^4+18661*c^3+43593*c^2+40224*c+13281;
     324poly p2 = 156*c^6+5380*c^5+1584*c^4+43237*c^3+27209*c^2+40224*c+13281;
     325poly p3 = 156*c^6+5380*c^5+1584*c^4+10469*c^3+27209*c^2+7456*c+13281;
     326zeroReduce(p1-p2);
     327zeroReduce(p1-p3);
     328zeroReduce(p2-p3);
     329
     330
     331// 4) PSK:(m=16, 2 Var)
     332
     333LIB "ringgb.lib";
     334ring r = (integer, 2, 16), (x,y), dp;
     335poly p1 = 4166*x^4+16666*x^3*y+25000*x^2*y^2+15536*x^2+16666*x*y^4+31072*x*y+4166*y^4+15536*y^2+34464;
     336poly p2 = 4166*x^4+16666*x^3*y+8616*x^2*y^2+16384*x^2*y+15536*x^2+282*x*y^4+47456*x*y+53318*y^4+31920*y^2+34464;
     337poly p3 = 4166*x^4+16666*x^3*y+8616*x^2*y^2+16384*x^2*y+15536*x^2+282*x*y^4+47456*x*y+4166*y^4+15536*y^2+34464;
     338zeroReduce(p1-p2);
     339zeroReduce(p1-p3);
     340zeroReduce(p2-p3);
     341
     342// Ref: A. Peymandoust G. De Micheli, “Application of Symbolic Computer Algebra in High-Level Data-Flow
     343// Synthesis,” IEEE Transactions on CAD/ICAS, Vol. 22, No. 9, September 2003, pp.1154-1165.
     344
     345*/
Note: See TracChangeset for help on using the changeset viewer.