Board logo

标题: FSK解调疑问 [打印本页]

作者: zhaoqing_cc    时间: 2009-3-23 18:04     标题: FSK解调疑问

--文件名:PL_FSK2
--功能:基于VHDL硬件描述语言,对FSK调制信号进行解调
library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity PL_FSK2 is
port(clk :in std_logic; --系统时钟
start :in std_logic; --同步信号
x :in std_logic; --调制信号
y ut std_logic); --基带信号
end PL_FSK2;
architecture behav of PL_FSK2 is
signal q:integer range 0 to 11;
--分频计数器
signal f1,f2:std_logic; --寄存器
signal m:integer range 0 to 5; --计数器
begin
process(clk) --对系统时钟进行q分频
begin
if clk'event and clk='1' then xx<=x;
--在clk信上升沿时,x信号对中间信号xx赋值
if start='0' then q<=0;
--if语句完成Q的循环计数
elsif q=11 then q<=0;
else q<=q+1;
end if;
end if;
end process;
process(xx,q) --此进程完成FSK解调
begin
if q=11 then m<=0; --m计数器清零
elsif q=10 then
if m<=3 then y<='0';
--if语句通过对m大小,来判决y输出的电平
else y<='1';
end if;
elsif xx'event and xx='1'then m<=m+1;
--计xx信号的脉冲个数
end if;
end process;
end behav;
以上是代码,其中q分频的功能是什么呢?






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0