verilog 中编译错误:port must be connected to a structural net expressionmodule counter8(clk,clr,te,le,a,tf);input clk,te,le,clr;input [7:0] a;output [7:0] tf;reg [7:0] tf,th;regth u1(le,a,th);count u2(clk,clr,te,th,tf);endmodulemodule regth(le

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 02:50:50
verilog 中编译错误:port must be connected to a structural net expressionmodule counter8(clk,clr,te,le,a,tf);input clk,te,le,clr;input [7:0] a;output [7:0] tf;reg [7:0] tf,th;regth u1(le,a,th);count u2(clk,clr,te,th,tf);endmodulemodule regth(le

verilog 中编译错误:port must be connected to a structural net expressionmodule counter8(clk,clr,te,le,a,tf);input clk,te,le,clr;input [7:0] a;output [7:0] tf;reg [7:0] tf,th;regth u1(le,a,th);count u2(clk,clr,te,th,tf);endmodulemodule regth(le
verilog 中编译错误:port must be connected to a structural net expression
module counter8(clk,clr,te,le,a,tf);
input clk,te,le,clr;
input [7:0] a;
output [7:0] tf;
reg [7:0] tf,th;
regth u1(le,a,th);
count u2(clk,clr,te,th,tf);
endmodule
module regth(le,a,thout);
input le;
input [7:0] a;
output [7:0] thout;
reg[7:0] thout;
always@(le)
begin
if(le==1) thout

verilog 中编译错误:port must be connected to a structural net expressionmodule counter8(clk,clr,te,le,a,tf);input clk,te,le,clr;input [7:0] a;output [7:0] tf;reg [7:0] tf,th;regth u1(le,a,th);count u2(clk,clr,te,th,tf);endmodulemodule regth(le
你的th在counter8中定义为reg类型,而在regth中thout是一个输出信号默认为net类型,所以你在counter8模块中将th传给regth模块的thout就会报这样的错误,模块counter8中th信号只是一个模块之间的连线,所以定义成wire类型应该就可以了.