导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→关于VHDL中WHILE LOOP的疑问[mudice]

 *第12027篇: 关于VHDL中WHILE LOOP的疑问

  
楼 主:mudice 2003年5月15日10:01
 关于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处通不过,有什么问题望各位指出,谢谢!


>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:我想知道在北京搞单片机开发的,有两年工作经验的,一般工资多少?

[下一篇主题]:我想学学低通,带通,高通滤波器,请问谁有资料?(硬件太差)!先谢了