登录
首页 » VHDL » Cordic 算法实现

Cordic 算法实现

于 2022-01-31 发布 文件大小:5.96 kB
0 128
下载积分: 2 下载次数: 1

代码说明:

Cordic 算法,并用该算法实现 sin 和 cos 函数。 在这个 cordic 算法顶层下,有 4 个模块。分别为按钮脉冲检测 btnPulse,角度输入 ang,板卡显 示 disp,算法核心 cordic。 BtnPulse 按分频后的时钟间隔检测对应按钮位置,当检测到连续三次的结果依次为 0、1、1 时 发送一次按钮脉冲 pulse。pulse 被作为 ang 模块的时钟,在每个 ang 的上升沿,根据按钮的对 应位置将相应的数据进行增加或减少。 显示模块 disp 将进行运算后的对应的三角函数值对应到数码管上。其中,实现象限的功能是根 据在第二第四象限的 sin,cos 结果的绝对值与在第一象限相比是将 sin 值和 cos 值交换。而第三 象限的绝对值保持不变。因此,该程序实质上仅计算第一象限的三角函数值,位于其他象限的 在 disp 模块中改变了显示值。正负是通过判断哪种三角函数位于某个象限,通过少量组合逻辑 即可得到。 在 cordic 算法模块中,为了增加计算的精度,选择了进行 28 次迭代。而为了方便移位运算,将 角度数据长度拓展至 32 位,将 cordicPipeline 模块中的数据长度变为 52,由于在其他模块中使 用了 IEEE.STD_LOGIC_UNSIGNED,为了防止冲突,选择手动计算符号位。由于大部分运算均是 重复,因此只要在 cordic 模块中反复调用 cordicPipeline 模块即可,仅需为 cordicPipeline 模块添 加一个使能输入,当计数到 28 时使能失效,停止运算。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 此ip核是xvga视频接口控制器,主要针对xilinx公司的开发工具
    此ip核是xvga视频接口控制器,主要针对xilinx公司的开发工具-This ip is nuclear XVGA video interface controller, the main target Xilinx
    2022-01-25 16:44:58下载
    积分:1
  • 8051的Verilog
    8051的Verilog-Verilog OF 8051
    2022-06-15 04:13:18下载
    积分:1
  • stepper_motor
    control stepper motor by fpga card with vhdl program
    2012-01-08 02:34:17下载
    积分:1
  • 595_8led
    74hc595 driver 8 led
    2013-03-28 21:10:33下载
    积分:1
  • TFT_CTRL_800_480_16bit
    说明:  文件用于驱动TFT屏,分辨率800*400,平台为quartus13,芯片为cycloneIV(The file is used to drive the TFT screen with a resolution of 800*400. The platform is quartus 13 and the chip is cyclone IV.)
    2019-04-12 09:22:29下载
    积分:1
  • test
    简单的232-485通信程序!主要是串口跟485之间的通信,起到发送接收然后再另一边显示的功能!(Simple 232-485 communication program!)
    2012-09-26 19:54:40下载
    积分:1
  • High Speed dd
    (Springer Series in Advanced Microelectronics 51) Ayan Palchaudhuri, Rajat Subhra Chakraborty (auth.)-High Performance Integer Arithmetic Circuit Design on FPGA_ Architecture, Implementation and Desig
    2020-06-24 08:40:01下载
    积分:1
  • 微功率无线模块、小功率无线数传模块、远距离无线通信模块、数传电台、远距离无线通信基站以及无线通信收发器等系列产品,产品主要有无线数传模块、无线通信模块、无线通讯...
    微功率无线模块、小功率无线数传模块、远距离无线通信模块、数传电台、远距离无线通信基站以及无线通信收发器等系列产品,产品主要有无线数传模块、无线通信模块、无线通讯模块、无线收发模块、无线模块、无线射频模块等等。-micropower wireless modules, low-power wireless module, remote wireless communications modules, data-transmission stations, long-distance wireless communications base stations and wireless communications transceiver series products, the main products are wireless module, wireless communications modules, wireless communications modules, wireless transceiver module, wireless modules, RF modules and so on.
    2022-06-12 10:06:56下载
    积分:1
  • leading-zero
    对于32位寄存器前导零个数的计数,一个简单的程序(32 registers a leading zero number of counts, a simple procedure)
    2012-06-05 16:41:11下载
    积分:1
  • v-watch
    基于fpga的数字电压表的设计,包括ad转换,bcd码转换,分频,3选1模块,小数点生成模块,显示模块组成。(Based on the FPGA digital voltage meter design, including AD conversion, BCD code conversion, frequency,3 choose1module, a decimal point generating module, display module. )
    2012-05-10 01:29:23下载
    积分:1
  • 696518资源总数
  • 105895会员总数
  • 18今日下载