⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pl_cpsk.vhd

📁 CPSK调治程序 CPSK调治程序
💻 VHD
字号:
--文件名:PL_CPSK
--功能:基于VHDL硬件描述语言,对基带信号进行调制
--最后修改日期: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_CPSK is
port(clk      :in std_logic;           --系统时钟
     start    :in std_logic;           --开始调制信号
     x      :in std_logic;           --基带信号
     y      :out std_logic);         --已调制输出信号
end PL_CPSK;
architecture behav of PL_CPSK is
signal q:std_logic_vector(1 downto 0);  --2位计数器
signal f1,f2:std_logic;               --载波信号
begin
process(clk)                       --此进程主要是产生两重载波信号f1,f2
begin
if clk'event and clk='1' then 
   if start='0' then q<="00";
   elsif q<="01" then f1<='1';f2<='0';q<=q+1;
   elsif q="11" then f1<='0';f2<='1';q<="00";
   else  f1<='0';f2<='1';q<=q+1;
   end if;
end if;
end process;
process(clk,x)                        --此进程完成对基带信号x的调制        
begin
if clk'event and clk='1' then 
   if q(0)='1' then
      if x='1' then y<=f1;             --基带信号x为‘1’时,输出信号y为f1 
      else y<=f2;                   --基带信号x为‘0’时,输出信号y为f2
      end if;
   end if;
end if;
end process;
end behav;

⌨️ 快捷键说明

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