2017-03-27 7 views
0

자일링스에서 다음 코드를 실행하려고하는데 여러 오류가 발생합니다.자일링스에서 다음 코드를 실행하려고하지만 여러 오류가 발생했습니다.

코드 :

Library IEEE; 
use IEEE.STD_LOGIC_1164.ALL; 
use IEEE.STD_LOGIC_ARITH.ALL; 
use IEEE.STD_LOGIC_UNSIGNED.ALL; 
use work.rng.all; 

entity mutation is 
    port(
     mut:in std_logic; 
     pop_size:in integer range 0 to 15:=10; 
     mem_mutated,bits_mutated:out arr 
     ); 
end mutation; 

architecture Behavioral of mutation is 
begin 
    process(mut) 
     Variable s1,s4:integer:=1 ; 
     Variable s2:integer range 0 to 15; 
     Variable s3:integer range 0 to 1000:=5; 
     variable s5:integer range 0 to 1000:= 8; 
     variable ind_no, bit_mut:integer; 
     variable mut_ind, bit_pos:arr; 
    begin 
     s2:= pop_size; 
     if mut=’1’ then 
      for i in 1 to mut_bits loop 
       randg(s1,s2,s3,ind_no); 
       mut_ind(i):=ind_no; 
       s3:= s3+ 2; 
       randg(s1,s5,s4,bit_mut); 
       bit_pos(i):= bit_mut; 
       s4:=s4 + 1; 
      end loop; 
      mem_mutated<= mut_ind; 
      bits_mutated<= bit_pos; 
     end if; 
    end process; 
end Behavioral; 

다음은 오류 인 실행 코드에서 :

ERROR:HDLCompiler:104 - "D:\mutation\mutation.vhd" Line 6: Cannot find in library . Please ensure that the library was compiled, and that a library and a use clause are present in the VHDL file. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 9: is not declared. ERROR:HDLCompiler:854 - "D:\mutation\mutation.vhd" Line 7: Unit ignored due to previous errors. ERROR:HDLCompiler:374 - "D:\mutation\mutation.vhd" Line 11: Entity is not yet compiled. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 14: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 15: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 16: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 17: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 18: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 19: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 21: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 23: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 24: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 25: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 26: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 27: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 28: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 29: is not declared. ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 31: is not declared.

나는 이러한 오류를 제거하기 위해 무엇을 할 수 있는가?

+0

사용중인 프로그램을 이해하는 것은 불가능합니다. 그러나 일반적으로 프로그램을 다시 설치하는 것으로 충분합니다. – Leos313

답변

2

첫 번째 use IEEE.STD_LOGIC_ARITH.ALL; < = 사용하지 마십시오. 오류

에 의해

다음 오류

ERROR:HDLCompiler:104 - "D:\mutation\mutation.vhd" Line 6: Cannot find <rng> in library <work>. Please ensure that the library was compiled, and that a library and a use clause are present in the VHDL file. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 24: <randg> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 27: <randg> is not declared. 

는 분명히 아직 rng를 컴파일하지 않은 ^. 또는 도서관을 전환했습니다. 존재하지 않는 구성 요소를 인스턴스화 할 수 없습니다.

ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 9: <arr> is not declared. 

^엔티티 mutation의 출력은 형태의 arr이지만,이 형식은 무엇인가? 정의 된 위치는 어디입니까?

ERROR:HDLCompiler:854 - "D:\mutation\mutation.vhd" Line 7: Unit <mutation> ignored due to previous errors. 

ERROR:HDLCompiler:374 - "D:\mutation\mutation.vhd" Line 11: Entity <mutation> is not yet compiled. 

^너무 많은 오류가 계속 ...

ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 14: <integer> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 15: <integer> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 16: <integer> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 17: <integer> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 18: <integer> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 21: <s2> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 26: <s3> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 29: <s4> is not declared. 

는 ^이 이전 오류로 인해 발생합니다. 다른 사람들이 고치면 그들은 갈 것입니다.

ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 23: <mut_bits> is not declared. 

^오류가 말한다 그냥 뭐 : mut_bits가 어디 선언되지 않았습니다. arr

ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 25: <mut_ind> is not declared. 
ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 28: <bit_pos> is not declared. 

^

mut_ind 알 수 및 bit_pos 선언 할 수 없습니다.

ERROR:HDLCompiler:69 - "D:\mutation\mutation.vhd" Line 31: <mem_mutated> is not declared. 

^mem_mutated 구성 요소의 입력 포트이지만, 아무런 신호가 정의되지 않는다.