2014-12-03 10 views
0

try_main.sv rtl을 컴파일 할 때 "endmodule이 예상됩니다"라는 오류가 발생했습니다. 그것은 "t_five_bits i_comb_sig;"선언으로부터 뿌리 박은 것 같습니다. try_top 모듈에 있습니다. 일단 선언문을 주석 처리하면 오류가 사라집니다.Verilog 합성 오류 : include 지시문을 사용할 때 "endmodule이 필요합니다"

이 오류를 어떻게 해결할 수 있습니까? 파일 이름은

typedef struct { 
    logic[2:0] three_bits 
    logic[1:0] two_bits 
} t_five_bits; 

bit5.svh : 사전 :

파일 이름에

감사

`include "bit5.svh" 
module try_top ( 
    input logic clk, 
    input logic sigA, 
    input logic sigB, 
    ouput logic sigC); 

logic i_sigA; 
logic i_sigB; 
logic i_sigC; 
t_five_bits i_comb_sig; 

. 
. 
. 

endmodule 

답변

2

을 try_main.sv 당신은 구조체의 멤버 후 일부 ;의 누락 선언. 변경 대상 :

typedef struct { 
    logic[2:0] three_bits; 
    logic[1:0] two_bits; 
} t_five_bits; 
+0

수정 해 주셔서 감사합니다. 좋은 하루 되세요. – user3431399