编译下面的try_main.sv rtl时出现“期待endmodule”错误。它似乎源于“t_five_bits i_comb_sig”的声明。在try_top模块中。一旦我评论出该声明,错误就消失了。
我可以知道如何解决此错误?
提前致谢:)
文件名:bit5.svh
typedef struct {
logic[2:0] three_bits
logic[1:0] two_bits
} t_five_bits;
文件名:try_main.sv
`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
答案 0 :(得分:2)
在结构成员声明之后,你遗漏了一些;
。将其更改为:
typedef struct {
logic[2:0] three_bits;
logic[1:0] two_bits;
} t_five_bits;