关于VHDL中WHILE LOOP的疑问
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity pwmtest is
port(clk : in std_logic;
dianshu :in std_logic_vector(16 downto 0);
wave : out std_logic);
end entity;
architecture behav of pwmtest is
begin
process(clk,dianshu)
variable n: integer;
begin
if(clk'event and clk='1') then
n:=conv_integer(dianshu);
if(n=0) then
wave <='0';
else
while (n> 0) loop*******出问题处
wave <='1';
n:=n-1;
end loop;
end if;
end if;
end process;
end behav;
********此程序较简单,但WHILE LOOP处通不过,有什么问题望各位指出,谢谢!
发表时间:2003年5月15日10:01:29