verilog 中编译错误:port must be connected to a structural net exp

问题描述:

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
1个回答 分类:综合 2014-10-23

问题解答:

我来补答
你的th在counter8中定义为reg类型,而在regth中thout是一个输出信号默认为net类型,所以你在counter8模块中将th传给regth模块的thout就会报这样的错误,模块counter8中th信号只是一个模块之间的连线,所以定义成wire类型应该就可以了.
 
 
展开全文阅读
剩余:2000
上一页:合外力做功,