pl_cpsk2.vhd

来自「CPSK调治程序 CPSK调治程序」· VHDL 代码 · 共 31 行

VHD
31
字号
--文件名:PL_CPSK2
--功能:基于VHDL硬件描述语言,对CPSK调制的信号进行解调
--最后修改日期:2004.3.16
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       :out 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;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?