UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor exgreyfox
Visitor
14,191 Views
Registered: ‎04-08-2009

ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

Guys Im trying to simulate the following code with ISim:

 

 

module Clamp_Shift_Hardware(FP_input, FP_input_OR, clamp, shift_amount, after_shift);
input [31:0] FP_input;
output FP_input_OR;
output clamp;
output [2:0] shift_amount;
output [7:0] after_shift;
reg [7:0] after_shift;
assign FP_input_OR = FP_input[29] | FP_input[28] | FP_input[27] | FP_input[26] | FP_input[25];
assign clamp = FP_input_OR && FP_input[30];
assign shift_amount[2:0]  = FP_input[25:23];
always@(shift_amount)
begin
case(shift_amount)
3'b000: after_shift = {7'b0000001, FP_input[22]};
3'b001: after_shift = {6'b000001, FP_input[22:21]};
3'b010: after_shift = {5'b00001, FP_input[22:20]};
3'b011: after_shift = {4'b0001, FP_input[22:19]};
  3'b100: after_shift = {3'b001, FP_input[22:18]};
3'b101: after_shift = {2'b01, FP_input[22:17]};
3'b110: after_shift = {1'b1, FP_input[22:16]};
3'b111: after_shift = 8'b00000001;  
endcase
end
endmodule
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
module Instruction_Hardware_v(FP_input_1, FP_input_2, FP_input_3, after_shift_1, after_shift_2, after_shift_3, 
                              FP_input_OR_1, FP_input_OR_2, FP_input_OR_3, clamp_1, clamp_2, clamp_3, x, shift_amount_1, shift_amount_2, shift_amount_3);
input [31:0] FP_input_1;
input [31:0] FP_input_2;
input [31:0] FP_input_3;
output FP_input_OR_1;
   output FP_input_OR_2;
output FP_input_OR_3;
output [7:0] after_shift_1;
output [7:0] after_shift_2;
output [7:0] after_shift_3;
output [2:0] shift_amount_1;
output [2:0] shift_amount_2;
output [2:0] shift_amount_3;
output clamp_1;
output clamp_2;
output clamp_3;
output x;
Clamp_Shift_Hardware(FP_input_1, FP_input_OR_1, clamp_1, shift_amount_1, after_shift_1);
Clamp_Shift_Hardware(FP_input_2, FP_input_OR_2, clamp_2, shift_amount_2, after_shift_2);
Clamp_Shift_Hardware(FP_input_3, FP_input_OR_3, clamp_3, shift_amount_3, after_shift_3);
Pack(after_shift_1, after_shift_2, after_shift_3, x);
endmodule
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
module Pack(a, b, c, x);
input  [7:0] a;
input  [7:0] b;
input  [7:0] c;
output [31:0] x;
assign x[7:0] = a[7:0];
assign x[15:8] = b[7:0];
assign x[23:16] = c[7:0];
endmodule
I am using the following Test Bench code:
module Test_Bench;
// Inputs
reg [31:0] FP_input_1;
reg [31:0] FP_input_2;
reg [31:0] FP_input_3;
// Outputs
wire [7:0] after_shift_1;
wire [7:0] after_shift_2;
wire [7:0] after_shift_3;
wire FP_input_OR_1;
wire FP_input_OR_2;
wire FP_input_OR_3;
wire clamp_1;
wire clamp_2;
wire clamp_3;
wire x;
wire [2:0] shift_amount_1;
wire [2:0] shift_amount_2;
wire [2:0] shift_amount_3;
// Instantiate the Unit Under Test (UUT)
Instruction_Hardware_v uut (
.FP_input_1(FP_input_1), 
.FP_input_2(FP_input_2), 
.FP_input_3(FP_input_3), 
.after_shift_1(after_shift_1), 
.after_shift_2(after_shift_2), 
.after_shift_3(after_shift_3), 
.FP_input_OR_1(FP_input_OR_1), 
.FP_input_OR_2(FP_input_OR_2), 
.FP_input_OR_3(FP_input_OR_3), 
.clamp_1(clamp_1), 
.clamp_2(clamp_2), 
.clamp_3(clamp_3), 
.x(x), 
.shift_amount_1(shift_amount_1), 
.shift_amount_2(shift_amount_2), 
.shift_amount_3(shift_amount_3)
);
initial begin
// Initialize Inputs
FP_input_1 = 32'b01000010110111010000000000000000;
FP_input_2 = 32'b01011100111110010000000000000000;
FP_input_3 = 32'b01011111111010000000000000000000;
// Wait 100 ns for global reset to finish
#100;
        
// Add stimulus here
end
      
endmodule
This is the error which I receive: Unable to elaborate instantiated module Clamp_Shift_Hardware

 

0 Kudos
1 Solution

Accepted Solutions
Visitor exgreyfox
Visitor
18,255 Views
Registered: ‎04-08-2009

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

I fixed the problem, in the main function where I was calling my clamp shift hardware 3 times i forgot to include instance identifiers like this: 

 

 

Clamp_Shift_Hardware A1(FP_input_1, FP_input_OR_1, clamp_1, shift_amount_1, after_shift_1);
Clamp_Shift_Hardware A2(FP_input_2, FP_input_OR_2, clamp_2, shift_amount_2, after_shift_2);
Clamp_Shift_Hardware A3(FP_input_3, FP_input_OR_3, clamp_3, shift_amount_3, after_shift_3);

 

0 Kudos
6 Replies
Instructor
Instructor
14,168 Views
Registered: ‎08-14-2007

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

Which version of ISE are you using?  I have seen in some cases that you need to

coerce the tools to include modules other than the uut to be compiled for

simulation.  One thing that helps is to change the file association for

the Clamp_Shift_Hardware module to "All" instead of just "Simulation",  If

that doesn't work you can brute force it (this worked in older versions

of ISE) by adding the module code at the end of the testbench itself,

i.e. just append the source file for Clamp_Shift_Hardware to the end

of the testbench.

 

HTH,

Gabor

-- Gabor
0 Kudos
Xilinx Employee
Xilinx Employee
14,150 Views
Registered: ‎08-15-2007

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

Hello,

 

Check the "fuse.log" report as there should have been earlier errors with the module that resulted in elaboration of the module to fail.  

 

If the errors are not clear, attach the fuse.log report so we can take a look.

Eddie
0 Kudos
Visitor exgreyfox
Visitor
14,132 Views
Registered: ‎04-08-2009

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

I tried adding the clamp shift hardware module to the end of the test bench but still no luck. Here is the fuse.log file:

 

 

 

Running: C:\Xilinx\11.1\ISE\bin\nt\unwrapped\fuse.exe -ise C:/Documents and Settings/Stan/Desktop/PAK_Instruction/PAK_Instruction.ise -intstyle ise -incremental -lib unisims_ver -lib unimacro_ver -lib xilinxcorelib_ver -o C:/Documents and Settings/Stan/Desktop/PAK_Instruction/Instruction_Hard_TestBench_isim_beh.exe -prj C:/Documents and Settings/Stan/Desktop/PAK_Instruction/Instruction_Hard_TestBench_beh.prj Instruction_Hard_TestBench glbl 
Number of CPUs detected in this system: 2
Turning on mult-threading, number of parallel sub-compilation jobs: 4 
Determining compilation order of HDL files
Parsing Verilog file "C:/Documents and Settings/Stan/Desktop/PAK_Instruction/PAK_v.v" into library work
Parsing Verilog file "C:/Documents and Settings/Stan/Desktop/PAK_Instruction/Instruction_Hard_TestBench.v" into library work
Parsing Verilog file "C:/Xilinx/11.1/ISE/verilog/src/glbl.v" into library work
Starting static elaboration
WARNING:HDLCompiler:604 - "C:/Documents and Settings/Stan/Desktop/PAK_Instruction/PAK_v.v" Line 69: Module instantiation should have an instance name
WARNING:HDLCompiler:604 - "C:/Documents and Settings/Stan/Desktop/PAK_Instruction/PAK_v.v" Line 70: Module instantiation should have an instance name
WARNING:HDLCompiler:604 - "C:/Documents and Settings/Stan/Desktop/PAK_Instruction/PAK_v.v" Line 71: Module instantiation should have an instance name
Completed static elaboration
Fuse Memory Usage: 57012 KB
Fuse CPU Usage: 155 ms
ERROR:Simulator:793 - Unable to elaborate instantiated module Clamp_Shift_Hardware

 

0 Kudos
Visitor exgreyfox
Visitor
18,256 Views
Registered: ‎04-08-2009

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

I fixed the problem, in the main function where I was calling my clamp shift hardware 3 times i forgot to include instance identifiers like this: 

 

 

Clamp_Shift_Hardware A1(FP_input_1, FP_input_OR_1, clamp_1, shift_amount_1, after_shift_1);
Clamp_Shift_Hardware A2(FP_input_2, FP_input_OR_2, clamp_2, shift_amount_2, after_shift_2);
Clamp_Shift_Hardware A3(FP_input_3, FP_input_OR_3, clamp_3, shift_amount_3, after_shift_3);

 

0 Kudos
Visitor sp1tsnaz
Visitor
6,752 Views
Registered: ‎06-30-2015

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution

I am getting the same problem..

could you please explain your solution.

0 Kudos
Moderator
Moderator
6,740 Views
Registered: ‎04-17-2011

Re: ISim Simulator Unable to elaborate instantiated module <module> PLEASE HELP

Jump to solution
@sp1tsnaz : Please create a new post as this is a pretty old post ~ 5 yrs old and provide more details of the issue with logs or testcase .
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos