URL
https://opencores.org/ocsvn/cordic_atan_iq/cordic_atan_iq/trunk
Subversion Repositories cordic_atan_iq
[/] [cordic_atan_iq/] [atan32_table.sv] - Rev 8
Compare with Previous | Blame | View Log
`ifndef _atan32_table_`define _atan32_table_// atan table for values 1, 1/2, 1/4, 1/8, 1/16...// Scale: code 2^30 = 90 deg, code 0 = 0 degpackage ConstPkg;parameter STEPS = 32;parameter real K = 0.6072529350088813;parameter bit [29:0] K_u30 = 30'h26dd3b6a;parameter bit [31:0] K_u32 = 32'h9b74eda8;// for sin and cos start calculation from vector {K_u30, 0}// modulus of vector {I, Q} = (coe_abs * K_u32) >> 32// last table value dont useparameter bit signed [31:0] atan_table[STEPS] = '{32'sh20000000, // tan = 1/2^1 = 1/232'sh12e4051e, // tan = 1/2^2 = 1/432'sh09fb385b, // tan = 1/2^3 = 1/832'sh051111d4, // tan = 1/2^4 = 1/1632'sh028b0d43, // tan = 1/2^5 = 1/3232'sh0145d7e1, // tan = 1/2^6 = 1/6432'sh00a2f61e, // tan = 1/2^7 = 1/12832'sh00517c55, // tan = 1/2^8 = 1/25632'sh0028be53, // tan = 1/2^9 = 1/51232'sh00145f2f, // tan = 1/2^10 = 1/102432'sh000a2f98, // tan = 1/2^11 = 1/204832'sh000517cc, // tan = 1/2^12 = 1/409632'sh00028be6, // tan = 1/2^13 = 1/819232'sh000145f3, // tan = 1/2^14 = 1/1638432'sh0000a2fa, // tan = 1/2^15 = 1/3276832'sh0000517d, // tan = 1/2^16 = 1/6553632'sh000028be, // tan = 1/2^17 = 1/13107232'sh0000145f, // tan = 1/2^18 = 1/26214432'sh00000a30, // tan = 1/2^19 = 1/52428832'sh00000518, // tan = 1/2^20 = 1/104857632'sh0000028c, // tan = 1/2^21 = 1/209715232'sh00000146, // tan = 1/2^22 = 1/419430432'sh000000a3, // tan = 1/2^23 = 1/838860832'sh00000051, // tan = 1/2^24 = 1/1677721632'sh00000029, // tan = 1/2^25 = 1/3355443232'sh00000014, // tan = 1/2^26 = 1/6710886432'sh0000000a, // tan = 1/2^27 = 1/13421772832'sh00000005, // tan = 1/2^28 = 1/26843545632'sh00000003, // tan = 1/2^29 = 1/53687091232'sh00000001, // tan = 1/2^30 = 1/107374182432'sh00000001, // tan = 1/2^31 = 1/214748364832'sh00000000 // tan = 1/2^32 = 1/4294967296};endpackage: ConstPkg`endif
