Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[SOLVED] Error- "Unknown or bad value for genvar" msg in a Xilinx IP

Status
Not open for further replies.

dpaul

Advanced Member level 5
Joined
Jan 16, 2008
Messages
1,799
Helped
317
Reputation
635
Reaction score
342
Trophy points
1,373
Location
Germany
Activity points
13,070
I cannot figure out why VCS is throwing this error. Given below is the error message and then part of the code where error occurs.

VCS error message:
Error-[V2KGEUV] Unknown or bad value for genvar
/home/dpaul/rev28462_fpga/src/top_modules/axi_interconnect_v1_06_a/ict106_protocol_conv_bank.v, 228
Elaboration time unknown or bad value encountered for generate if-statement
condition expression.
Please make sure it is elaboration time constant.

Code:
module ict106_protocol_conv_bank #
  (
  // parameter declarations come here (OVERRIDDEN by top-level parameters)
   )
  (
   // AXI signals come here
   );

  // some wire declarations

genvar slot;

generate
for (slot=0;slot<C_NUM_SLOTS;slot=slot+1) begin : gen_protocol_slot
if ((C_AXI_PROTOCOL[slot*32+:32] == P_AXILITE) || (C_AXI_PROTOCOL[slot*32+:32] == P_AXI3)) begin : gen_prot_conv
ict106_axi_protocol_converter #(
// some AXI parameters come here
) conv_inst (
// AXI port connections come here
);
// Bunch of assign statements
end
end
endgenerate

endmodule

Line 228 is:
if ((C_AXI_PROTOCOL[slot*32+:32] == P_AXILITE) || (C_AXI_PROTOCOL[slot*32+:32] == P_AXI3)) begin : gen_prot_conv

Now I give the parameter values which are SUPPOSED TO BE TAKEN during compilation:
C_NUM_SLOTS = 2
C_AXI_PROTOCOL = {1{32'h00000002}}
P_AXI3 = 32'h1;
P_AXILITE = 32'h2;

I have even manually substituted some of the parameters by their values, but the result is the same. Any hints as to how do I debug this or what is causing the error?

Note- This code snippet where the error is occuring is part of the Xilinx AXI4 Interconnect IP. I am integrating this IP in my system and so have only changed the parameters in the top-level file of the AXI interconnect.
 

The problem was entirely due to wrong parameter values being passed down from the top-level.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top