📄 readme
字号:
cordic.c: reference C model To use compile it using gcc cordic.c -o -lm cordic Then type cordic and press enter, to get 'how to use it' message Follow the instructionspoint2bin.c: gives fixed point binary corresponding to a 'decimal real number N', such that 0<N<1.0 Again compile it using gcc point2bin.c -lm -o point2bin The type 'point2bin' and press enter to get further instructionsbin2point.c : inversof point2bincordic.vhd: VHDL RTL for finding sin/cosine of an angle, theta, such that 0<= theta <= 90. The design has NOT been tested for out of range thetacordic_tb.vhd: VHDL testbench for cordic.vhd fun_pkg.vhd: Defines some functions which are used by cordic.vhdThe Algorithm takes 14 clock cycles to output the result.The Inputs to the design areclkrstn : active low resetangle: Angle of which sin/cos is desired, a fixed point number Example: if the sin/cos for say 40 Degree is desired, then angle = fixed point representation of 40/256 i.e(0.15625) fixed point representation may be found corresponding to 0.15625 by using 'point2bin 15625' which will yeild 00101000000000000000000000000010 Where point2bin is executable obtained by 'gcc point2bin.c -lm -o point2bin' and 15625 is the number following decimal point. Another Example: Angle = 5 Degrees, = 5/256 = .01953125 fixed point rep = point2bin 01953125 = 00000101000000000000000000000010 The o/p is 32 bit, but the design takes a 25 bit input, so you may axe 7 msbs from thisangle_valid: This must be put to '1' for at least one clock cycle to start the design. It is edge sensitive. It should not be pulsed again before receipt of a corresponding 'ready' signal.For starting new calculation, this signal has to be pulsed with pulse widht of at least one clock cycles. The Outputs from the design are: ready: signals that sin/cos value are valid on outputs sinout and cosout
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -