fightingfyp 发布于 2007-10-30 10:56:00
[求助] 程序出错了
process(clk,r,ld,ep,et) variable tmp:std_logic_vector(3 downto 0); begin if r='0' then tmp:=(others=>'0'); elsif rising_edge(clk) then if ld='0' then tmp:=d; elsif ep='1' and et='1' then if tmp:="1111" then tmp:="0000"; --32行 c<='1' ; else tmp:=tmp+1; c<='0'; end if; end if ; end if; --40行 q<=tmp; end process; 32. parse error, unexpected AFFECT, expecting THEN 40. parse error, unexpected IF, expecting PROCESS 请问怎么回事? geyiguang 发布于 2007-10-30 11:01:07
 32行执行两条语句的时候要用大括号的吧!40行缺少一个end if,你看一下你上面的if有多少,下面end if就要有多少个. fightingfyp 发布于 2007-10-30 11:12:55
还是不行啊~~我用VHDL语言编的 levi 发布于 2007-10-30 23:22:42
 if tmp:="1111" then 错了, 应该是if temp = "1111" then fightingfyp 发布于 2007-10-31 8:07:47
 ok 了 3q |