usb 发表于 2010-6-27 23:36:05

vhdl程序的功能

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]
查看完整版本: vhdl程序的功能