积分规则 网站地图 帮助中心    
嵌入式软件 单 片 机 DSP 存储器 传感控制 光电显示
嵌入式硬件 CPLD/FPGA SOPC AD/DA 接口电路 模拟设计
I C设计 通信产品 汽车电子 电源产品 消费电子 数控系统
工业控制 军工/航天 安防产品 医疗电子 计算机外设 测试测量
供应 I C
求购 公司库

  IC 求购 销售 公司 论文 DATASHEET 参考设计 论坛
当前位置: 电子技术 >> DSP >> DSP代码示例
  相关分类: 应用论文 | TI DSP | 新产品 | 算法 | 下载 | DSP代码示例 | ADI DSP | freescale DSP |
DSP读写CF卡接口程序代码
 
作者:未知   来源:互联网    点击数:791   更新时间:2007-2-7
您可以添加到网摘 让更多人关注此文章:

    

GPS C/A码发生器LFSR源代码(VHDL 语言)

library ieee;
use ieee.std_logic_1164.all;
entity LFSR_A is
generic(cycleA0:integer:=26;
        cycleA3:integer:=4;
        width:integer:=1);
 port(Clk:in std_logic;
      Enable:in std_logic;
      Fill_En:in std_logic;
      New_Fill:in std_logic_vector(width -1 downto 0);
      DelayA0;out std_logic_vector(width -1 downto 0));
end LFSR_A;
architecture LFSR_A_ARCH of LFSR_A is
signal Date_In_A:STD_LOGIC_VECTOR(width -1 downto 0);
signal DelayA3:STD_LOGIC_VECTOR(width -1 downto 0);
signal DelayA0_int:STD_LOGIC_VECTOR(width -1 downto 0);

type my_type is array(0 to cycleA0 -1) of
std_logic_vector(width -1 downto 0);
signal int_sigA0:my_type;
type my_type2 is array (0 to cycleA3 -1) of
std_logic_vector(width -1 downto 0);
signal int_sigA3:my_type2;

begin
main:process(Clk)
begin
if Clk event and Clk ='1' then
 if (Enable='1') then
  int_sigA0<=Data_In_A & int_sigA0(0 to cycleA0 -2);
   int_sigA3<=Data_In_A & int_sigA3(0 to cycleA3 -2);
 end if;
 if (Fill_En='0') then Data_In_A<=DelayA3 xor DelayA0_int;
 else Data_In_A<=New_Fill;
 end if;
end if;
end process main;

delayA0_int<=int_sigA0(cycleA0 -1);
delayA3<=int_sigA3(cycleA3 -1);
delayA0<=delayA0_int;
end LFSR_A_ARCH;

library ieee;
use ieee.std_logic_1164.all;
entity LFSR_B is
generic (cycleB0:integer:=26;
cycleB20:integer:=21;
width:integer:=1);
 port(Clk:in std_logic;
      Enable:in std_logic;
      Fill_En:in std_logic;
      New_Fill:in std_logic_vector(width -1 downto 0);
      DelayB0:out std_logic_vector(width -1 downto 0));
end LFSR_B;

architecture LFSR_B_ARCH of LFSR_B is
signal Data_In_B:std_logic_vector(width -1 downto 0);
signal DelayB20:std_logic_vector(width -1 downto 0);
signal DelayB0_int:std_logic_vector(width -1 downto 0);
type my_type is array (0 to cycleB0 -1) of
std_logic_vector(width -1 downto 0);
signal int_sigB0:my_type;
type my_type2 is array(0 to cycleB20 -1) of
std_logic_vector(width -1 downto 0);
signal int_sigB20:my_type2;

begin
main:process(Clk)
begin
if Clk event and Clk='1' then
 if (Enable='1') then
  int_sigB0<=Data_In_B & int_sigB0(0 to cycleB0 -2);
  int_sigB20<=Data_In_B & int_sigB20(0 to cycleB20 -2);
 end if;
 if (Fill_En='0') then Data_In_B<=DelayB20 xor DelayB0_int;
 else Data_In_B<=New_Fill;
 end if:
end if;
end process main;

delayB0_int<=int_sigB0(cycleB0 -1);
delayB20<=int_sigB20(cycleB20 -1);
delayB0<=delayB0_int;
end LFSR_B_ARCH;

library ieee;
use ieee.std_logic_1164.all;
entity Gold_Code is
generic (width:integer:=1);
 port(Clock:in std_logic;
      Enable:in std_logic;
      Fill_En_A:in std_logic;
      Fill_En_B:in std_logic;
      Rst:in std_logic;
      New_Fill_A:in std_logic_vector(width -1 downto 0);
      New_Fill_B:in std_logic_vector(width -1 downto 0);
      Gold_Code:out std_logic_vector(width -1 downto 0));
end Gold_Code;

architecture Gold_Code_Arch of Gold_Code is
component LFSR_A port
 (Clk:in std_logic;
  Enable:in std_logic;
  Fill_En:in std_logic;
  New_Fill:in std_logic_vector(width -1 downto 0);
  delayA0:out std_logic_vector(width -1 downto 0));
end component;
component LFSR_B port
 (Clk:in std_logic;
  Enable:in std_logic;
  Fill_En:in std_logic;
  New_Fill:in std_logic_vector(width -1 downto 0);
  delayB0:out std_logic_vector(width -1 downto 0));
end component;

signal DelayA_top:std_logic_vector(width -1 downto 0);
signal DelayB_top:std_logic_vector(width -1 downto 0);

begin
U0:LFSR_A port map (Clk=>Clock,Enable=>Enable,
                    Fill_En=>Fill_En_A,
                    New_Fill=>New_Fill_A,
                    delayA0=>delayA_top);
U1:LFSR_B port map (Clk=>Clock,Enable=>Enable,
                    Fill_En=>Fill_En_B,
                    New_Fill=>New_Fill_B,
                    delayB0=>delayB_top);
Gold_Code<=delayB xor delayA_top;
end Gold_Code_Arch;



相关文章
· 科技奥运与计算机技术的应用[425]
· Electromedical[2693]
· 患者监控[2742]
· 基于TMS320LF2407A DSP的心电监护系统研究[3187]
· 用S3C2410实现三导联远程心电监护系统[3096]
热门评论排行
·VHDL设计中电路简化问题的
·ARM嵌入式系统基础教程(N
·江苏嵌入式Linux教育培训
·ARM处理器应用开发4步骤
·锐极LINUX驱动培训班定于

文章评论
    没有任何评论
*只显示最新10条评论。评论内容只代表网友观点,与本站立场无关。更多评论
发表评论
  * 请先[登陆]再进行评论,谢谢。
评分: 1分 2分 3分 4分 5分
内容: *
发帖须知:
一.所发文章必须遵守《互联网电子公告服务管理规定》;
二.严禁发布供求代理信息,公司介绍,产品信息等广告宣传信息;
三.严禁恶意重复发帖;
四.严禁对个人,实体,民族,国家等进行漫骂,污蔑,诽谤。
 
热点新闻 [更多]
 
严冬期如何发展半导体业 扩
2008年中国集成电路市场回顾与展望
分析师:亚洲芯片厂商库存远超预期
2008年基础电子业十大事件点评
Aptina并购智多微手机软件平台设
凌力尔特公司推出用于多核处理器的&n
安森美半导体任命麦满权为韩国及南亚区
Broadcom:半导体产业依然机会
飞思卡尔推i.MX51芯 
日立芯片守卫新年倒数计时晚会
 
热门下载 [更多]
 
[ PCB设计] Protel99教程下载
[ ] 手把手学单片机20个例
[ ] 单片机做的智能台灯
[ ] 单片机入门书
[ ] linux系统移植开发文档
[ ] IC卡的读写程序
[ ] 8051单片机C语言彻底应用
[ 常用软件] 555定时器电路设计软件V1.2
[ 常用软件] 51定时器计算软件
[ ] ARM处理器应用开发4步骤
 
论坛新帖 [更多]
 
低价专业PCB打样 双面板20...
深圳市天漠科技超低价供应atm...
深圳市天漠科技超低价供应ARM...
[推荐]2.5米精度,高灵敏度...
830实验箱+电脑没有并口...
[原创]平望科技助力自服终端国...
低价专业PCB打样 双面板20...
[原创]低价专业PCB打样 双...
Bootloader for ...
【有奖调查】08-09嵌入式开...

 
赞助商 [更多]
 

ICP许可证号:[粤 05056597]
联系电话:010-82517432 82517615 传真: 010-82517615

版权所有 Copyright © 2006 嵌入式技术网