高手们帮帮忙吧,谢谢
By: panzer<p>我写的一个vhdl程序,用simulator查看,发现输出没有变化</p>
<p>大虾看看哪里有问题?我是个新手</p>
4?d5jf0q:tr<p>library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;</p>
<p>entity el16 is</p>
<p> port(vid_in:in std_logic_vector(3 downto 0);
clk:in std_logic;
vs,hs,selftest:out std_logic;
vid_out:out std_logic_vector(3 downto 0));
end el16;</p>
0iq/{e-k@y d<p>architecture rtl of el16 is</p>
<p> type states is (st0,st1,st2,st3,st4);
signal current_state,next_state:states:=st0;
signal vid_temp:std_logic_vector(3 downto 0);</p>
<p>begin</p>
<p> com:process(current_state)</p>
<p>begin</p>
klx{%ta<p> case current_state is</p>
<p> when st0=>next_state<=st1;
vs<='1';
hs<='0';
selftest<='0';
when st1=>next_state<=st2;
vs<='1';
hs<='0';
selftest<='0';
when st2=>next_state<=st3;
vs<='1';
hs<='1';
selftest<='0';
when st3=>next_state<=st4;
vs<='1';
hs<='0';
selftest<='0';
vid_temp<=vid_in;
when st4=>vs<='0';
hs<='0';
selftest<='0';
vid_temp<=vid_in;
end case;
end process;</p>
b7[y2q*v$m omtu<p> clock:process(clk,current_state)
variable cnt:integer range 0 to 3;
</p>
(]-d'f#|o!v)gqixo<p>begin</p>
<p> if clk'event and clk='1' then
if current_state=st4 then
if cnt=3 then
cnt:=0;
current_state<=st1;
else
cnt:=cnt+1;
end if;
else
current_state<=next_state;
end if;
end if;
end process;
vid_out<=vid_temp;
end rtl;</p>
本文来自:设计互动 (www.ccflash.org),详细参考以上网站.
Recent Articles:
·[推荐]isplever软件flash版入门(视频)教程
·[下载][原创]xilinx ise 7.1i中文教程(最新
·[下载]ise、synplify、modelsim、quar
·[新鲜出炉]夏宇闻的《verilog数字系统设计教程》电子版
·[求助] xc9500 isp的设计问题?
·谁有xinlix spartanii的最小系统原理图!能不能
·关于一个case结构的问题的讨论
·[求助]关于频率转换器的问题(verilog hdl写的)
·[求助]实体没定义???
·菜鸟问题
·[求助]quartus使用中遇到的问题
·为什么我不能回复
·[求助]16×16乘法器的设计
·推荐便宜实用cpld/fpga学习开发板
·大哥大姐帮帮小妹
·利用cyclon ii中的高速ram的问题
·版主说明!
·高手们帮帮忙吧,谢谢
·谁有xilinx嵌入式开发套件(edk),麻烦上传到ftp上
·[原创]spartan-3开发板转让
·[推荐]isplever软件flash版入门(视频)教程
·[下载][原创]xilinx ise 7.1i中文教程(最新
·[下载]ise、synplify、modelsim、quar
·[新鲜出炉]夏宇闻的《verilog数字系统设计教程》电子版
·[求助] xc9500 isp的设计问题?
·谁有xinlix spartanii的最小系统原理图!能不能
·关于一个case结构的问题的讨论
·[求助]关于频率转换器的问题(verilog hdl写的)
·[求助]实体没定义???
·菜鸟问题
·[求助]quartus使用中遇到的问题
·为什么我不能回复
·[求助]16×16乘法器的设计
·推荐便宜实用cpld/fpga学习开发板
·大哥大姐帮帮小妹
·利用cyclon ii中的高速ram的问题
·版主说明!
·高手们帮帮忙吧,谢谢
·谁有xilinx嵌入式开发套件(edk),麻烦上传到ftp上
·[原创]spartan-3开发板转让