Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Model Sim Error:Assuming recursive instantiation

Status
Not open for further replies.

sriramsv

Junior Member level 1
Joined
Mar 14, 2005
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,495
vsim-3036

Hi guys,

I'm getting this error in Modelsim when I try to simulate my codes:

# ** Error: (vsim-3036) Instantiation depth of '/ldpc_encoder2' is 81. Assuming recursive instantiation.
# Region: /ldpc_encoder2
# ** Error: (vsim-3036) Instantiation depth of '/ldpc_encoder2' is 82. Assuming recursive instantiation.
# Region: /ldpc_encoder2
# ** Error: (vsim-3036) Instantiation depth of '/ldpc_encoder2' is 83. Assuming recursive instantiation.
# Region: /ldpc_encoder2
# Error loading design



here is my code:


module Clock(clk);
output reg clk;
initial
begin
clk = 1'b0;
forever #5 clk = ~clk;
#500 $finish;
end
ldpc_encoder2 ld(mes, clk,s_out);
endmodule


module ldpc_encoder2(mes, clk,s_out);
input [15:0]mes;
input clk;
output [15:0]s_out;

//wire [15:0]s_in;
wire [15:0]q;
wire [15:0]p;
Clock c(clk);
D d_ff(.mes(mes),
.clk(clk),
.d_out(q));

SP sp(.s_in(q),
.clk(clk),
.s_out(p));
endmodule


module D(mes,clk,d_out);
input [15:0]mes;
input clk;
output reg [15:0]d_out;
wire [15:0]q;
assign q=d_out;
always @(posedge clk)
begin
d_out <= mes;

end

endmodule



module SP(s_in,clk,s_out);
input [15:0]s_in;
input clk;
output [15:0]s_out;
reg [15:0]p;


always @(posedge clk)
begin
p = {p[14:0],s_in};

end
assign s_out = p;
endmodule



Can anyone please suggest me what went wrong. I'm not able to fig it out.

Thanks

Sriram
 

gliss

Advanced Member level 2
Joined
Apr 22, 2005
Messages
692
Helped
75
Reputation
150
Reaction score
16
Trophy points
1,298
Activity points
5,892
assuming recursive instantiation.

I think the problem is because you are instantiating the Clock module in ldpc_encoder2 and instantiating ldpc_endcoder2 in Clock. I'm guessing Clock should be the top level so If you comment out line 23:

//clock c(clk);

It will compile and simulate without errors.

Also, your $finish call should be in another block, one different than the one with the #forever statement, or else it wont ever stop:

Code:
always @(posedge clk)
begin
    #500 $finish;
end
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top