集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 1608|回复: 2

vhdl程序的功能

[复制链接]
usb 发表于 2010-6-27 23:36:05 | 显示全部楼层 |阅读模式
library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fsk3 is
port(clk :in std_logic;   
start :in std_logic;  
x :in std_logic;   
y
       
ut std_logic);  
end fsk3;
architecture behav of fsk3 is
signal q1:integer range 0 to 11;  
signal q2:integer range 0 to 3;   
signal f1,f2:std_logic;   
begin
process(clk)      
begin
if clk'event and clk='1' then
if start='0' then q1<=0;
elsif q1<=5 then f1<='1';q1<=q1+1;
elsif q1=11 then f1<='0';q1<=0;  
elsef1<='0';q1<=q1+1;
end if;
end if;
end process;
process(clk)        
begin
if clk'event and clk='1' then
if start='0' then q2<=0;
elsif q2<=0 then f2<='1';q2<=q2+1;
elsif q2=1 then f2<='0';q2<=0;  
else f2<='0';q2<=q2+1;
end if;
end if;
end process;
process(clk,x)      
begin
if clk'event and clk='1' then
if x='0' then y<=f1;   
else y<=f2;      
end if;
end if;
end process;
end behav;

请问这段程序的功能?
UFP 发表于 2010-6-28 00:28:42 | 显示全部楼层
这个程序的两个进程的判断分支逻辑好像都有问题。<br>
意图好像是做两个分频器以及之间的切换输出。<br>
<br>
[ 本帖最后由 xiaoyanxue 于 2006-6-9 09:49 编辑 ]
Sunlife 发表于 2015-7-4 09:59:34 | 显示全部楼层
这个程序的两个进程的判断分支逻辑好像都有问题。<br>
意图好像是做两个分频器以及之间的切换输出
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-6-21 07:12 , Processed in 0.205534 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表