首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

CPSK解调VHDL程序

CPSK解调VHDL程序

CPSK解调VHDL程序


--文件名:PL_CPSK2
--功能:基于VHDL硬件描述语言,对CPSK调制的信号进行解调

library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity PL_CPSK2 is
port(clk       :in std_logic;                --系统时钟
     start     :in std_logic;                --同步信号
     x       :in std_logic;                --调制信号
     y       ut std_logic);              --基带信号
end PL_CPSK2;
architecture behav of PL_CPSK2 is
signal q:integer range 0 to 3;      
begin
process(clk)                              --此进程完成对CPSK调制信号的解调
begin
if clk'event and clk='1' then
   if start='0' then q<=0;
   elsif q=0 then q<=q+1;               --q=0时,根据输入信号x的电平来进行判决
      if x='1' then y<='1';   
      else y<='0';
      end if;
   elsif q=3 then q<=0;
   else  q<=q+1;
   end if;
end if;
end process;
end behav;
返回列表