- UID
- 76092
- 性别
- 男
|
帮小弟看看这个vhdl程序吧,不知错在哪里了? 想做一个计数器,计数从0到111时,cout输出为1,当达到111时,cout变为0,继续计数。当计数到499时,清零,进入下一个周期。程序如下:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity shiyong is
port (clk,clr,en: in std_logic;
s1: out std_logic);
end shiyong;
architecture shiyongarch of shiyong is
signal count: std_logic_vector (8 downto 0);
signal cout: std_logic;
Begin
process(clk,clr)
begin
if(clr='1') then
count<="000000000";------clr=1,清零
elsif(en='1' and falling_edge(clk)) then
if (count="0001101111") then
cout<=NOT cout;------如果en=1,当count=111时,cout电平翻转
elsif(count="111110011") then
count<="000000000";------当count=499,count清零,cout翻转
else
count<=count+'1';------如果count既不是111又不是499,则加一计数
end if;
else cout<='1';
end if;
end process;
可是最后编译的时候出现一个错我,错误提示为:Unsupported feature error:signal parameter in a subprogram is not supported
请问我的程序到底错在哪里,怎么改,谢谢先!! |
|