- 1
- 2
- 3
- 4
- 5
CPSK调制与解调VHDL程序及仿真
资料介绍
--文件名: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;
部分文件列表
文件名 | 大小 |
PSK调制与解调VHDL程序及仿真.doc | 113K |
全部评论(0)